Encoding method, decoding method, code stream, encoder, decoder, and storage medium

By deriving an EIP model including at least two sets of filtering parameters at the encoding and decoding ends, intra-frame prediction of video blocks is performed, solving the problem of inaccurate filter representation in EIP technology and improving encoding and decoding performance.

WO2026007093A1PCT designated stage Publication Date: 2026-01-08GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/103734
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2026-01-08

AI Technical Summary

Technical Problem

In existing video coding standards, interpolation-based intra-frame prediction (EIP) technology leads to a decrease in encoding and decoding performance when the filter representation of the relationship between pixels is inaccurate.

Method used

At the encoding and decoding ends, intra-frame prediction of the current block is performed by deriving an EIP model that includes at least two sets of filtering parameters, thereby improving prediction accuracy.

Benefits of technology

It improves encoding and decoding performance by using at least two sets of filtering parameters to more accurately represent the relationship between reconstructed regions and adjacent reconstructed regions, thereby improving the accuracy of intra-frame prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024103734_08012026_PF_FP_ABST
    Figure CN2024103734_08012026_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses an encoding method, a decoding method, a code stream, an encoder, a decoder, and a storage medium. The decoding method comprises: parsing a first syntax element; when the first syntax element indicates that an EIP mode is used for a current block, deriving an EIP model of the current block, wherein the EIP model comprises at least two groups of filter parameters; and performing intra prediction on the current block on the basis of the at least two groups of filter parameters, so as to obtain a predicted value of the current block. In this way, the encoding and decoding performance can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Coding method, code stream, encoder, decoder and storage medium TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of video coding technology, and in particular to a coding method, a code stream, an encoder, a decoder and a storage medium. BACKGROUND

[0002] With the increasing demand for video display quality, high-resolution videos such as high-definition and ultra-high-definition videos have emerged. However, high-resolution videos usually have more information, and thus require more bandwidth. To reduce the bandwidth requirement, video coding standards involving video compression have been introduced.

[0003] In a video coding standard, an extrapolation intra prediction (EIP) technology can derive a relationship between a current pixel and a neighboring reconstructed pixel according to a reconstructed region, which is represented in the form of an extrapolation filter. After obtaining the extrapolation filter, the current block can be effectively predicted according to the filter.

[0004] However, since the relationship between pixels is represented by a filter in the EIP technology, when the relationship between pixels represented by the filter is not close to the real relationship, the accuracy of prediction using the EIP technology is poor, thereby reducing the coding performance.

[0005] SUMMARY

[0006] Embodiments of the present application provide a coding method, a code stream, an encoder, a decoder and a storage medium, which can improve the coding performance.

[0007] The technical solutions of embodiments of the present application can be implemented as follows:

[0008] In a first aspect, the embodiments of the present application provide a decoding method applied to a decoder, and the method comprises:

[0009] parsing a first syntax element;

[0010] in a case where the first syntax element indicates that an EIP mode is used for a current block, deriving an EIP model of the current block; wherein the EIP model comprises at least two groups of filter parameters;

[0011] performing intra prediction on the current block according to the at least two groups of filter parameters to obtain a prediction value of the current block.

[0012] In a second aspect, the embodiments of the present application provide an encoding method applied to an encoder, and the method comprises:

[0013] determine a value of a first syntax element in a case that the current block uses the EIP mode;

[0014] determine an EIP model used by the current block; wherein the EIP model comprises at least two sets of filter parameters;

[0015] perform intra prediction on the current block according to the at least two sets of filter parameters to obtain a prediction value of the current block;

[0016] encode the current block according to the prediction value of the current block and the value of the first syntax element.

[0017] In a third aspect, an embodiment of the present application provides a code stream, which is generated by bit coding according to the encoding method in the second aspect.

[0018] In a fourth aspect, an embodiment of the present application provides an encoder, which comprises a first determining unit, a second determining unit, a prediction unit and an encoding unit, wherein:

[0019] the first determining unit is configured to determine a value of a first syntax element in a case that the current block uses the EIP mode;

[0020] the second determining unit is configured to determine an EIP model used by the current block; wherein the EIP model comprises at least two sets of filter parameters;

[0021] the prediction unit is configured to perform intra prediction on the current block according to the at least two sets of filter parameters to obtain a prediction value of the current block;

[0022] the encoding unit is configured to encode the current block according to the prediction value of the current block and the value of the first syntax element.

[0023] In a fifth aspect, an embodiment of the present application provides an encoder, which comprises a first memory and a first processor, wherein:

[0024] the first memory is configured to store a computer program capable of running on the first processor;

[0025] the first processor is configured to execute the steps of the encoding method in the second aspect when running the computer program.

[0026] In a sixth aspect, an embodiment of the present application provides a decoder, which comprises a parsing unit, a derivation unit and a prediction unit; wherein:

[0027] the parsing unit is configured to parse a first syntax element;

[0028] The derivation unit is configured to derive an EIP model of the current block when the first syntax element indicates that the current block uses the EIP mode, wherein the EIP model comprises at least two groups of filter parameters.

[0029] The prediction unit is configured to perform intra prediction on the current block according to the at least two groups of filter parameters to determine a prediction value of the current block.

[0030] In a seventh aspect, an embodiment of the present application provides a decoder, comprising a second memory and a second processor, wherein:

[0031] The second memory is configured to store a computer program capable of running on the second processor.

[0032] The second processor is configured to execute steps of the decoding method according to the first aspect when running the computer program.

[0033] In an eighth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement steps of the decoding method according to the first aspect or steps of the encoding method according to the second aspect.

[0034] In a ninth aspect, an embodiment of the present application provides a computer program product, which comprises a computer program or instructions, and the computer program or instructions are executed by a processor to implement steps of the decoding method according to the first aspect or steps of the encoding method according to the second aspect.

[0035] The embodiment of the present application provides a coding method, a code stream, an encoder, a decoder and a storage medium. At the encoding end, in the case that it is determined that the current block uses the EIP mode, the value of the first syntax element is determined, the EIP model used by the current block is determined; wherein the EIP model comprises at least two groups of filter parameters, the current block is intra-predicted according to the at least two groups of filter parameters, the prediction value of the current block is obtained, and the current block is encoded according to the prediction value of the current block and the value of the first syntax element. At the decoding end, the first syntax element is parsed, and in the case that the first syntax element indicates that the current block uses the EIP mode, the EIP model of the current block is derived; wherein the EIP model comprises at least two groups of filter parameters, the current block is intra-predicted according to the at least two groups of filter parameters, and the prediction value of the current block is obtained. In this way, in the case that the current block uses the EIP mode, the EIP model comprising at least two groups of filter parameters is derived, and the at least two groups of filter parameters are used to intra-predict the current block. Compared with the case that one group of filter parameters is used to intra-predict the current block, the at least two groups of filter parameters can more accurately represent the relationship between the reconstructed region and the adjacent reconstructed region, so that the prediction value obtained by using the at least two groups of filter parameters to intra-predict the current block is more accurate, and the coding performance is improved. BRIEF DESCRIPTION OF DRAWINGS

[0036] Fig. 1 is a constituent block diagram schematic view of an encoder provided by the embodiment of the present application;

[0037] Fig. 2 is a constituent block diagram schematic view of a decoder provided by the embodiment of the present application;

[0038] Fig. 3A is a schematic view one of a shape of an optional 15-tap difference filter provided by the embodiment of the present application;

[0039] Fig. 3B is a schematic view two of a shape of an optional 15-tap difference filter provided by the embodiment of the present application;

[0040] Fig. 3C is a schematic view three of a shape of an optional 15-tap difference filter provided by the embodiment of the present application;

[0041] Fig. 4A is a schematic view one of an optional L-shaped reconstructed region sliding provided by the embodiment of the present application;

[0042] Fig. 4B is a schematic view two of an optional L-shaped reconstructed region sliding provided by the embodiment of the present application;

[0043] Fig. 4C is a schematic view three of an optional L-shaped reconstructed region sliding provided by the embodiment of the present application;

[0044] Fig. 5A is a schematic view one of an optional upper reconstructed region sliding provided by the embodiment of the present application;

[0045] FIG. 5B is a schematic diagram II of the optional up-reconstructed region sliding according to an embodiment of the present application;

[0046] FIG. 5C is a schematic diagram III of the optional up-reconstructed region sliding according to an embodiment of the present application;

[0047] FIG. 6A is a schematic diagram I of the optional left-reconstructed region sliding according to an embodiment of the present application;

[0048] FIG. 6B is a schematic diagram II of the optional left-reconstructed region sliding according to an embodiment of the present application;

[0049] FIG. 6C is a schematic diagram III of the optional left-reconstructed region sliding according to an embodiment of the present application;

[0050] FIG. 7 is a schematic diagram of the optional diagonal direction interpolation filtering according to an embodiment of the present application;

[0051] FIG. 8 is a schematic diagram of the optional template region according to an embodiment of the present application;

[0052] FIG. 9A is a schematic diagram I of the optional EIP filter on the template region according to an embodiment of the present application;

[0053] FIG. 9B is a schematic diagram II of the optional EIP filter on the template region according to an embodiment of the present application;

[0054] FIG. 9C is a schematic diagram III of the optional EIP filter on the template region according to an embodiment of the present application;

[0055] FIG. 10A is a schematic diagram I of the optional reconstructed region according to an embodiment of the present application;

[0056] FIG. 10B is a schematic diagram II of the optional reconstructed region according to an embodiment of the present application;

[0057] FIG. 10C is a schematic diagram III of the optional reconstructed region according to an embodiment of the present application;

[0058] FIG. 11A is a schematic diagram I of the combination of the optional filter shape and the L-shaped reconstructed region according to an embodiment of the present application;

[0059] FIG. 11B is a schematic diagram II of the combination of the optional filter shape and the L-shaped reconstructed region according to an embodiment of the present application;

[0060] FIG. 11C is a schematic diagram III of the combination of the optional filter shape and the L-shaped reconstructed region according to an embodiment of the present application;

[0061] FIG. 12A is a schematic diagram I of the combination of the optional filter shape and the up-reconstructed region according to an embodiment of the present application;

[0062] FIG. 12B is a schematic diagram II of a combination of a shape of a filter and an upper reconstruction region according to an embodiment of the present application;

[0063] FIG. 12C is a schematic diagram III of a combination of a shape of a filter and an upper reconstruction region according to an embodiment of the present application;

[0064] FIG. 13A is a schematic diagram I of a combination of a shape of a filter and a left reconstruction region according to an embodiment of the present application;

[0065] FIG. 13B is a schematic diagram II of a combination of a shape of a filter and a left reconstruction region according to an embodiment of the present application;

[0066] FIG. 13C is a schematic diagram III of a combination of a shape of a filter and a left reconstruction region according to an embodiment of the present application;

[0067] FIG. 14 is a schematic diagram of a prediction of an interpolation filter according to an embodiment of the present application;

[0068] FIG. 15A is a schematic diagram of a chroma reconstruction pixel according to an embodiment of the present application;

[0069] FIG. 15B is a schematic diagram of a luma reconstruction pixel according to an embodiment of the present application;

[0070] FIG. 16 is a schematic diagram of a network architecture of a video coding according to an embodiment of the present application;

[0071] FIG. 17 is a schematic diagram of a flow of a decoding method according to an embodiment of the present application;

[0072] FIG. 18 is a schematic diagram of a flow of an encoding method according to an embodiment of the present application;

[0073] FIG. 19A is a schematic diagram I of a shape of a filter according to an embodiment of the present application;

[0074] FIG. 19B is a schematic diagram II of a shape of a filter according to an embodiment of the present application;

[0075] FIG. 19C is a schematic diagram III of a shape of a filter according to an embodiment of the present application;

[0076] FIG. 20A is a schematic diagram I of a size of a reconstruction region according to an embodiment of the present application;

[0077] FIG. 20B is a schematic diagram II of a size of a reconstruction region according to an embodiment of the present application;

[0078] FIG. 20C is a schematic diagram III of a size of a reconstruction region according to an embodiment of the present application;

[0079] FIG. 21 is a schematic diagram of a component structure of an encoder according to an embodiment of the present application;

[0080] FIG. 22 is a schematic diagram of a hardware structure of an encoder according to an embodiment of the present application;

[0081] FIG. 23 is a schematic diagram of a component structure of a decoder according to an embodiment of the present application;

[0082] FIG. 24 is a schematic diagram of a hardware structure of a decoder according to an embodiment of the present application;

[0083] FIG. 25 is a schematic diagram of a component structure of a codec system according to an embodiment of the present application. DETAILED DESCRIPTION

[0084] In order to enable a person skilled in the art to more fully understand the features and technical content of the embodiments of the present application, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings, which are only used for reference and are not intended to limit the embodiments of the present application.

[0085] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terminology used in the present application is for the purpose of describing the embodiments of the present application only and is not intended to limit the present application.

[0086] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0087] It should also be noted that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific order of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0088] Before the embodiments of the present application are further described in detail, the terms and terms involved in the embodiments of the present application are explained, which are applicable to the following explanations:

[0089] Joint Video Experts Team (JVET)

[0090] Enhanced Compression Model (ECM)

[0091] Intra Template Matching Prediction (Intra TMP)

[0092] Block Vector (BV)

[0093] Sum of Absolute Difference (SAD)

[0094] Sum of Absolute Transformed Difference (SATD)

[0095] Coding Tree Unit (CTU)

[0096] Coding Unit (CU)

[0097] Sequence Parameter Set (SPS)

[0098] Intra Block Copy (IBC)

[0099] Decoder intra mode derivation (DIMD)

[0100] Extrapolation intra prediction (EIP)

[0101] FIG. 1 is a constituent block diagram of an encoder provided by an embodiment of the present application. As shown in FIG. 1, the encoder 100 can include a transform and 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 transform and inverse quantization unit 106, a filter control analysis unit 107, a filter unit 108, an encoding unit 109, and a decoded image buffer unit 110, etc. The filter 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 raw video signal, a video coding block can be obtained by the division of a coding tree unit (CTU), and then the residual pixel information obtained after the intra- or inter-frame prediction is transformed by the transform and quantization unit 101 on the video coding block, including transforming the residual information from the pixel domain to the transform domain, and quantizing the obtained transform coefficients to further reduce the bit rate; the intra-estimation unit 102 and the intra-prediction unit 103 are used for intra-frame prediction of the video coding block; in particular, 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 video coding block; the motion compensation unit 104 and the motion estimation unit 105 are used to perform inter-frame prediction encoding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information; the motion estimation performed by the motion estimation unit 105 is a process of generating a motion vector that can estimate the motion of the video coding block, and then the motion compensation is performed by the motion compensation unit 104 based on the motion vector determined by the motion estimation unit 105; after the intra-prediction mode is determined, 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 sends the calculated determined motion vector data to the encoding unit 109; in addition, the inverse transform and inverse quantization unit 106 is used for the reconstruction of the video coding block, reconstructing the residual block in the pixel domain, which removes the blocking artifact by the filter control analysis unit 107 and the filtering unit 108, and then adds the reconstructed residual block to a predictive block in one of the frames of the decoded image buffer unit 110 to generate a reconstructed video coding block; the encoding unit 109 is used to encode various encoding parameters and quantized transform coefficients, and in the CABAC-based encoding algorithm, the context content can be based on the adjacent coding block, which can be used to encode the information indicating the determined intra-prediction mode, and output the bitstream of the video signal; and the decoded image buffer unit 110 is used to store the reconstructed video coding block for prediction reference. As the video image encoding proceeds, new reconstructed video coding blocks are continuously generated, which are all stored in the decoded image buffer unit 110.

[0102] FIG. 2 is a block diagram of a decoder according to an embodiment of the present application. As shown in FIG. 2, the decoder 200 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra prediction unit 203, a motion compensation unit 204, a filtering unit 205, and a decoded picture buffer unit 206. The decoding unit 201 can implement header information decoding and CABAC decoding. The filtering unit 205 can implement deblocking filtering and SAO filtering. After the video signal is encoded by the encoder 100 of FIG. 1, a bitstream of the video signal is output. The bitstream is input into the decoder 200. The decoding unit 201 decodes the bitstream to obtain decoded transform coefficients. The inverse transform and inverse quantization unit 202 processes the decoded transform coefficients to generate a residual block in the pixel domain. The intra prediction unit 203 generates prediction data of a current video decoding block based on a 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 parsing motion vectors and other associated syntax elements, and uses the prediction information to generate a predictive block of the video decoding block being decoded. The decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 202 and the corresponding predictive block generated by the intra prediction unit 203 or the motion compensation unit 204. The decoded video signal is filtered by the filtering unit 205 to remove blocking artifacts and improve video quality. The decoded video block is stored in the decoded picture buffer unit 206, which stores reference pictures for subsequent intra prediction or motion compensation, and also outputs the video signal, i.e., the recovered original video signal.

[0103] It should be noted that the method according to the embodiments of the present application is mainly applied to the intra estimation unit 102 and the intra prediction unit 103 of FIG. 1, and the intra prediction unit 203 of FIG. 2. That is, the embodiments of the present application can be applied to an encoder, a decoder, or both, but are not limited herein.

[0104] It should be further noted that when the embodiments of the present application are applied to the encoder 100, the "current block" can refer to a current block to be encoded (also referred to as an "encoding block") in a video image. When the embodiments of the present application are applied to the decoder 200, the "current block" can refer to a current block to be decoded (also referred to as a "decoding block") in a video image.

[0105] For EIP, EIP refers to a technique of obtaining interpolation filter coefficients from the reconstructed pixels around the current block for intra prediction of the current block. The implementation of the EIP technique can be divided into two parts: obtaining interpolation filter coefficients (or referred to as filters, models, coefficients, etc.) and predicting the current block based on the filters.

[0106] In the obtaining of the filter coefficients, one way of obtaining the filter coefficients is to derive the coefficients corresponding to each input for a filter of a given shape in a given reconstructed region. FIG. 3A is a schematic diagram of one optional shape of a 15-tap difference interpolation filter according to an embodiment of the present application. As shown in FIG. 3A, the difference interpolation filter is of a 4x4 shape, the grid filled part represents the position of the input of the interpolation filter, and the white filled part represents the position of the output of the interpolation filter. FIG. 3B is a schematic diagram of another optional shape of a 15-tap difference interpolation filter according to an embodiment of the present application. As shown in FIG. 3B, the difference interpolation filter is of a 2x8 shape, the grid filled part represents the position of the input of the interpolation filter, and the white filled part represents the position of the output of the interpolation filter. FIG. 3C is a schematic diagram of another optional shape of a 15-tap difference interpolation filter according to an embodiment of the present application. As shown in FIG. 3C, the difference interpolation filter is of an 8x2 shape, the grid filled part represents the position of the input of the interpolation filter, and the white filled part represents the position of the output of the interpolation filter.

[0107] In addition, the three interpolation filters in FIGS. 3A-3C can be combined by sliding in a defined L-shaped reconstructed region. FIG. 4A is a schematic diagram of one optional sliding on an L-shaped reconstructed region according to an embodiment of the present application. As shown in FIG. 4A, the 4x4 shape interpolation filter can obtain training samples in one sliding mode by sliding, and further obtain a set of filter coefficients. FIG. 4B is a schematic diagram of another optional sliding on an L-shaped reconstructed region according to an embodiment of the present application. As shown in FIG. 4B, the 4x4 shape interpolation filter can obtain training samples in one sliding mode by sliding, and further obtain a set of filter coefficients. FIG. 4C is a schematic diagram of another optional sliding on an L-shaped reconstructed region according to an embodiment of the present application. As shown in FIG. 4C, the 4x4 shape interpolation filter can obtain training samples in one sliding mode by sliding, and further obtain a set of filter coefficients.

[0108] The three interpolation filters in FIGS. 3A-3C are obtained by sliding in the defined upper reconstruction region, and correspondingly, FIG. 5A is a schematic diagram of an optional upper reconstruction region sliding according to an embodiment of the present application. As shown in FIG. 5A, the 8x2 shaped interpolation filter is slid to obtain the training samples in a sliding mode, and then a set of filter coefficients is obtained. FIG. 5B is a schematic diagram of another optional upper reconstruction region sliding according to an embodiment of the present application. As shown in FIG. 5B, the 8x2 shaped interpolation filter is slid to obtain the training samples in a sliding mode, and then a set of filter coefficients is obtained. FIG. 5C is a schematic diagram of a third optional upper reconstruction region sliding according to an embodiment of the present application. As shown in FIG. 5C, the 8x2 shaped interpolation filter is slid to obtain the training samples in a sliding mode, and then a set of filter coefficients is obtained.

[0109] The three interpolation filters in FIGS. 3A-3C are obtained by sliding in the defined left reconstruction region, and correspondingly, FIG. 6A is a schematic diagram of an optional left reconstruction region sliding according to an embodiment of the present application. As shown in FIG. 6A, the 2x8 shaped interpolation filter is slid to obtain the training samples in a sliding mode, and then a set of filter coefficients is obtained. FIG. 6B is a schematic diagram of another optional left reconstruction region sliding according to an embodiment of the present application. As shown in FIG. 6B, the 2x8 shaped interpolation filter is slid to obtain the training samples in a sliding mode, and then a set of filter coefficients is obtained. FIG. 6C is a schematic diagram of a third optional left reconstruction region sliding according to an embodiment of the present application. As shown in FIG. 6C, the 2x8 shaped interpolation filter is slid to obtain the training samples in a sliding mode, and then a set of filter coefficients is obtained.

[0110] Thus, nine combinations can be obtained, and each combination can obtain a set of interpolation filter coefficients. The process of solving each set of interpolation filter coefficients is as follows: sliding the selected interpolation filter on the selected region, constructing a set of autocorrelation coefficient matrices and a set of cross-correlation coefficient vectors, and further solving the interpolation filter coefficients by constructing a linear equation set from the autocorrelation coefficient matrices and the cross-correlation coefficient vectors.

[0111] In the above FIGS. 4A-6C, the L-shaped reconstruction region contains the reconstructed pixels in the top-left, left, bottom-left, top and top-right, the upper reconstruction region contains the reconstructed pixels in the top-left, top and top-right, and the left reconstruction region contains the reconstructed pixels in the top-left, left and bottom-left.

[0112] In the above FIGS. 4A-6C, N is a variable, and in the specific implementation process, it is a predefined value related to the size of the current block to be predicted.

[0113] In addition to the above method of deriving the filter in the reconstructed area, the EIP technique can also use a method of inheriting the filter used by the already coded block to obtain the filter for predicting the current block.

[0114] To predict the current block, one way is to use a given interpolation filter to predict from the top-left corner of the current block to be predicted to the bottom-right corner in a certain order. The specific prediction formula can be to linearly weight a plurality of neighboring pixel values to calculate the prediction value of the current pixel:

[0115] wherein pred (x,y) is the prediction value of the current block at position (x, y), c i is the i-th coefficient of the filter, the index of the coefficient is from 0 to 14, is a neighboring pixel value used to calculate the current pixel value, when t is in the reconstructed area, the reconstructed value is used as the input of the interpolation filter, and when t is in the predicted block, the already predicted value is used as the input. offsetXi i and offsetYi i are offset values relative to the current position (x, y).2 B-1 is a constant term (or called bias term, Bias, etc.), and B is the number of bits of the pixel value. To obtain the prediction value of the current pixel, the prediction values of other positions of the current block can be used, and therefore the interpolation filter can construct all the prediction values of the current block in a certain order. An example is to construct all the prediction values of the current block from the top-left corner to the bottom-right corner in raster scan order from left to right and from top to bottom. Another example is diagonal line.

[0116] FIG. 7 is a schematic diagram of an optional interpolation filter in a diagonal direction according to an embodiment of the present application. As shown in FIG. 7, the prediction values of all point positions on the diagonal line can be obtained in parallel, and all the prediction values of the current block can be constructed from the top-left diagonal line to the bottom-right diagonal line. In terms of implementation, the predicted points on the same diagonal line can be predicted in parallel. In some embodiments, whether to use the EIP mode, the shape of the EIP filter, the reconstructed area for obtaining the filter coefficients, etc. can be controlled according to the corresponding syntax elements, so that the EIP prediction can be implemented at the encoding and decoding ends through the above steps.

[0117] For the EIP merge mode of the EIP prediction, in addition to the method of deriving the filter coefficients in the reconstructed area, the interpolation filter can also be obtained by inheriting the interpolation filter of the already decoded block to predict the current block. One implementation is to construct a merge interpolation filter model candidate list (merge EIP list), which contains one or more of the following three aspects:

[0118] 1. Interpolation filter model information used by the decoded block

[0119] 2. Interpolation filter shape and interpolation filter coefficients

[0120] 3. Information of the conventional intra prediction mode derived by the gradient histogram of the decoded block

[0121] Where, similar to the merge mode of inter prediction, or the cross-component merge mode of intra chroma prediction, the following one or more interpolation filter models can be included in the merge interpolation filter model list:

[0122] a) Neighboring interpolation filter model, which refers to the interpolation filter model used by the block in the neighboring reference row and column position of the current block to be predicted.

[0123] b) Non-neighboring interpolation filter model, which refers to the interpolation filter model used by the block in the non-neighboring reference row and column position of the current block to be predicted.

[0124] c) Historical interpolation filter model, which refers to the interpolation filter model used by the block that has been decoded before the current block in the decoding order, and the interpolation filter model is stored in a buffer.

[0125] d) Temporal interpolation filter model, which refers to the interpolation filter model used by the block in the reference frame.

[0126] In video coding, the EIP model used for prediction of the current block can be selected by transmitting the index of the candidate list. Further, for this candidate list, the EIP models in the list can be reordered from small to large error between the prediction value on the template and the sample value of the reconstructed region using template matching technology. Assuming that the probability of the current block using the candidate model with relatively large error is less than the probability of the current block using the candidate model with relatively small error, only the model with relatively small error is retained to determine a relatively small candidate list, so that when the interpolation filter model in the merge list is selected, the index of the mode in a relatively small merge list can be represented by fewer code words.

[0127] For the reordering of the EIP model in the merge mode in the EIP prediction, FIG. 8 is a schematic diagram of an optional template region according to an embodiment of the present application. As shown in FIG. 8, after the candidate model is obtained, the template region is needed for reordering the model. The template region is a number of rows (template height) above the current block and a number of columns (template width) on the left side of the current block. The template height / width can be changed according to the shape of the current block. For example, a larger template height / width is used for a larger block. The template height and the template width can also be different.

[0128] The model in the candidate list is used one by one to make a prediction on the upper template region and the left template region. The prediction can be made in a predefined direction, such as a diagonal direction, a horizontal direction, a vertical direction, etc.

[0129] FIG. 9A is a schematic diagram of an optional EIP filter on a template region according to an embodiment of the present application. As shown in FIG. 9A, a 4x4 interpolation filter slides on the template region. FIG. 9B is a schematic diagram of another optional EIP filter on a template region according to an embodiment of the present application. As shown in FIG. 9B, an 8x2 interpolation filter slides on the template region. FIG. 9C is a schematic diagram of another optional EIP filter on a template region according to an embodiment of the present application. As shown in FIG. 9B, a 2x8 interpolation filter slides on the template region.

[0130] The calculation method of the prediction value generated by the interpolation filter on the template region includes the following two methods:

[0131] The first method is the same as the method in the current block to be predicted. That is, when the interpolation filter is used to predict the positions other than the top-left corner of the left and upper template regions, the input of the interpolation filter uses the prediction value on the template region. This method has the advantage of being able to better predict the real prediction value on the template region. However, this method has the disadvantage of having a pixel dependency, because the prediction value of the current pixel needs to be used as the input of the interpolation filter. For example, when the prediction is made in a diagonal order, the prediction value of the current pixel on the template region needs to use the prediction value of the previous diagonal line, i.e., there is a diagonal dependency.

[0132] The second method is that the template region has been reconstructed, and all the reconstructed pixel values can be used as the input of the interpolation filter. This method has the advantage of being easy to parallelize, because all the positions on the template region can be calculated in parallel. However, this method has the disadvantage of having a low template matching accuracy, because the method is different from the prediction method in the current block to be predicted.

[0133] According to the difference between the prediction value and the sample value of the interpolation filter in the combined interpolation filter model list on the template region as the cost, the interpolation filters in the list are sorted from small to large, and the sorted list is taken as the final candidate list. The index of the candidate list is coded and parsed from the bitstream, which is used to indicate the selected interpolation filter mode. The interpolation filter model used for prediction of the current block is obtained from the reordered list.

[0134] In the related art, as shown in FIGS. 3A-3C, there are three 15-tap filter shapes, for convenience of description and reference in the following, FIG. 3A represents EIP_FILTER_S, FIG. 3B represents EIP_FILTER_H, and FIG. 3C represents EIP_FILTER_V.

[0135] FIG. 10A is a schematic diagram of an optional reconstruction region according to an embodiment of the present application. As shown in FIG. 10A, the L-shaped reconstruction region can be represented as EIP_AL_A_L (reconstruction region composed of reconstruction pixels of AL: Above Left, A: Above, and L: Left).

[0136] According to the defined EIP filter shape and the reconstruction region for obtaining the coefficients, there are 3x3=9 combinations of filter shape and reconstruction region for obtaining the coefficients:

[0137] FIG. 11A is a schematic diagram of an optional combination of filter shape and L-shaped reconstruction region according to an embodiment of the present application. As shown in FIG. 11A, the EIP filter shape is 4x4, and this combination can be represented as {EIP_AL_A_L, EIP_FILTERS}.

[0138] FIG. 11B is a schematic diagram of an optional combination of filter shape and L-shaped reconstruction region according to an embodiment of the present application. As shown in FIG. 11B, the EIP filter shape is 8x2, and this combination can be represented as {EIP_AL_A_L, EIP_FILTER_V}.

[0139] Figure 11C is a schematic diagram illustrating a combination of a shape of an EIP filter and a L-shaped reconstruction region according to an embodiment of the present application. As shown in Figure 11C, the shape of the EIP filter is 2x8. This combination can be denoted as {EIP AL A L, EIP FILTER H}.

[0140] Figure 12A is a schematic diagram illustrating a combination of a shape of an EIP filter and an above reconstruction region according to an embodiment of the present application. As shown in Figure 12A, the shape of the EIP filter is 4x4. This combination can be denoted as {EIP AL A, EIP FILTERS}.

[0141] Figure 12B is a schematic diagram illustrating a combination of a shape of an EIP filter and an above reconstruction region according to an embodiment of the present application. As shown in Figure 12B, the shape of the EIP filter is 8x2. This combination can be denoted as {EIP AL A, EIP FILTER V}.

[0142] Figure 12C is a schematic diagram illustrating a combination of a shape of an EIP filter and an above reconstruction region according to an embodiment of the present application. As shown in Figure 12C, the shape of the EIP filter is 2x8. This combination can be denoted as {EIP AL A, EIP FILTER H}.

[0143] Figure 13A is a schematic diagram illustrating a combination of a shape of an EIP filter and a left reconstruction region according to an embodiment of the present application. As shown in Figure 13A, the shape of the EIP filter is 4x4. This combination can be denoted as {EIP AL L, EIP FILTERS}.

[0144] Figure 13B is a schematic diagram illustrating a combination of a shape of an EIP filter and a left reconstruction region according to an embodiment of the present application. As shown in Figure 13B, the shape of the EIP filter is 8x2. This combination can be denoted as {EIP AL L, EIP FILTER V}.

[0145] Figure 13C is a schematic diagram illustrating a combination of a shape of an EIP filter and a left reconstruction region according to an embodiment of the present application. As shown in Figure 13C, the shape of the EIP filter is 2x8. This combination can be denoted as {EIP AL L, EIP FILTER H}.

[0146] In the related art, for 4x16, 16x4, 4x32 and 32x4 blocks, 2 kinds of EIP combinations are allowed to be used, as shown in Table 1 below:

[0147] Table 1

[0148] For other 4xN, Nx4 and 8x32, 32x8 blocks, 3 EIP combinations are allowed, as shown in Table 2 below:

[0149] Table 2

[0150] For 8xN and Nx8 blocks, 5 EIP combinations are allowed, as shown in Table 3 below:

[0151] Table 3

[0152] For other shaped blocks, 9 EIP combinations are allowed, as shown in Table 4 below:

[0153] Table 4

[0154] The decoder parses the bitstream, and when parsing the syntax elements of the intra coding mode of the luminance coding unit, parses whether the interpolation filtering prediction mode is used. If the interpolation filtering mode is used, the number of interpolation filtering modes allowed to be used by the current block is further obtained according to the size and shape of the current block. As described in the third section, when the current block is 4x16, 16x4, 4x32 or 32x4, 2 interpolation filtering modes are allowed to be used; when the current block is other 4xN, Nx4 or 8x32, 32x8 shaped, 3 interpolation filtering modes are allowed to be used; when the current block is other 8xN or Nx8 shaped, 5 interpolation filtering modes are allowed to be used; and when the current block is 16x16, 16x32, 32x16 or 32x32, 9 interpolation filtering modes are allowed to be used.

[0155] The following Table 5 is the related syntax elements:

[0156] Table 5

[0157] In the above Table 5, cu_eip_flag indicates the enabling identification of the coding unit level interpolation filtering technology, and is 1 for using the interpolation filtering technology for the current luminance block, and is 0 for not using. If the syntax element does not exist in the bitstream, it is defaulted to 0.

[0158] eip_merge_flag indicates the enabling identification of the coding unit level merging interpolation filtering technology, and is 1 for using the merging interpolation filtering technology for the current luminance block, and is 0 for not using. If the syntax element does not exist in the bitstream, it is defaulted to 0.

[0159] eip_merge_idx indicates the index of the merging interpolation filtering list when the merging interpolation filtering technology is used. The index is used to obtain the selected interpolation filtering model from the list. If the syntax element does not exist in the bitstream, it is defaulted to 0.

[0160] eip_mode_idx represents the index value of the selected combination, when the current block only has one combination available, the syntax element does not need to be coded, and if the syntax element does not exist in the bitstream, it is defaulted to 0.

[0161] The decoder determines the position of the current block and the parsed prediction mode, if it is the interpolation filter prediction mode, the interpolation filter combination used is obtained according to the corresponding identifier, the reconstruction region and the interpolation filter shape under the combination are used to obtain the coefficients of the interpolation filter, the interpolation filter is used to predict in the current block in the order from the top left to the bottom right according to the diagonal direction, and the prediction value needs to be limited within the corresponding bit precision, for example, under 10-bit precision, the calculation method of the prediction r position is as follows,

[0162] wherein, The input coefficient of the interpolation filter at the current r position, whose position is p different from r n , p n represents the position difference between the nth input of the 15-tap interpolation filter and the current output position. When the r+p n position is located outside the prediction block (as shown in FIG. 15), the reconstruction value is used as the interpolation filter input, when the r+p n position is located inside the prediction block (as shown in FIG. 14), the prediction value is used as the interpolation filter input.

[0163] FIG. 14 is a schematic diagram of an optional interpolation filter prediction provided by an embodiment of the present application, as shown in FIG. 14, the input positions of the first row and the first column of the interpolation filter and the input positions of the fourth row and the first column are two input positions of the current prediction point (the output position of the fourth row and the fourth column), the point of the input position of the first row and the first column is located on the reconstruction region, so the reconstruction value is used as the input, the point of the input position of the fourth row and the first column is located inside the prediction block, so the prediction value of the point is used as the input.

[0164] In the related art, the regularization of the filter coefficient derivation can adopt the following manner:

[0165] The interpolation filter can be derived from the reconstruction region, and one derivation manner (or called training of the interpolation filter) is to construct a set of linear equations and solve according to the Gaussian elimination method. For example, the EIP interpolation filter has N inputs, N is 15, one of the input values is a constant bias, and there is 1 output. The interpolation filter is moved in the reconstruction region to obtain 15 input values and 1 output value corresponding to the position. The 15 input values and 1 output value are 1 sample. The ith sample can be denoted as (a i,0 ,ai,1 ,…,a i,13 ,bias,y i ). By traversing all samples in the reconstructed region, say m samples, we can get a linear equation system:

[0166] which can be written in the form of matrix operation, where:

[0167] y=[y1,…,y m ] T

[0168] and multiply by A T , we get:

[0169] Solving the equation, we get the EIP interpolation filter coefficients as:

[0170] The robustness of the filter can be increased by L2 regularization, for example, let as:

[0171] where λ is the regularization parameter, and the implementation of L2 regularization is to add a diagonal matrix to A T . If the i-th input of the filter is bias, we can let the value of λI at (I, i) be zero (i.e., no regularization is applied to the bias term).

[0172] Adaptive regularization parameter for filter coefficient derivation: Based on the regularization technique described above for EIP coefficient derivation, the regularization parameter can be adjusted adaptively. The regularization parameter λ can be a constant value related to the number of taps of the EIP interpolation filter, for example, 128x15, where 128 is a predefined constant and 15 is the number of taps of the interpolation filter (or 15-1=14 if the bias term is subtracted). One method of adaptively adjusting the parameter λ is to select different predefined constant values according to the current number of samples (or the current block size, the size of the reconstructed region used for training, etc.). For example, if the number of samples is less than 2048, then λ=192x15; otherwise, λ=128x15.

[0173] In related technologies, the Cross-component Linear Model (CCLM) chroma intra prediction technique is as follows:

[0174] The technique assumes that there is a linear relationship between the luma component and the chroma component of the image, and thus can derive the parameters of the linear relationship based on some of the reconstructed luma and chroma pixels. The chroma block is then predicted based on the linear model and the corresponding reconstructed luma pixels of the current chroma block. For example, the predicted value of the chroma block can be:

[0175] Pred C [x,y] = a x Rec L ′[x,y] + β

[0176] where Predc[x,y] represents the predicted value of the current chroma block, RecL represents the reconstructed luma pixels of the current block, and parameters a and β are derived from the reconstructed pixels around the current block. One way to derive a and β is to first down-sample the reconstructed luma pixels so that they match the distribution of the chroma pixels. For example, in 4:2:0 color format, let RecL' be equal to:

[0177] Rec′ L [x,y] = (2 x Rec L [2x,2y] + 2 x Rec L [2x,2y+1] + Rec L [2x-1,2y]

[0178] + Rec L [2x+1,2y] Rec L [2x-1,2y+1] + Rec L [2x+1,2y+1] + 4) >> 3

[0179] For a chroma block of size NxN, take 2N neighboring chroma reconstructed pixels and down-sampled luma reconstructed pixels. FIG. 15A shows an exemplary chroma reconstructed pixel according to an embodiment of the present application, and FIG. 15B shows an exemplary down-sampled luma reconstructed pixel according to an embodiment of the present application. In FIG. 15A, the circles identify the neighboring chroma reconstructed pixels used to compute the linear relationship. In FIG. 15B, the circles identify the down-sampled luma reconstructed pixels used to compute the linear relationship.

[0180] The following can be obtained:

[0181] where RecC(i) and RecL'(i) represent the neighboring chroma reconstructed pixels and the down-sampled luma reconstructed pixels, and I represents the total number of pixels involved.

[0182] The multi-model linear mode (MMLM) is as follows:

[0183] The MMLM technique proposes that more than one linear model can be used to represent the relationship between the luma and chroma in a coding block. In this technique, the neighboring luma pixels and the neighboring chroma pixels of the current block are divided into M groups by a rule, and each group is used as a training set to derive a linear model (i.e. derive a specific a and b for a specific group). The luma pixels of the current block are divided into M groups using the same grouping rule, and the corresponding linear model is applied to obtain the chroma prediction value. One embodiment is that M equals to 2, and let Threshold be the average value of the neighboring luma pixels of the current block. When RecL' in the sample (RecC and RecL') is less than or equal to Threshold, the sample belongs to the first group; otherwise, the sample belongs to the second group. The chroma prediction value of the current block can be represented as:

[0184] The EIP technique can derive the relationship between the current pixel and the neighboring reconstructed pixels according to the reconstructed region, and the relationship is represented in the form of an interpolation filter. After obtaining the interpolation filter, the current block can be effectively predicted according to the EIP filter.

[0185] However, the EIP technique always represents the relationship between pixels by one EIP filter, and in some cases, for example, different relationships exist between pixels in different pixel value intervals, the EIP technique in the related art cannot effectively represent, thereby the accuracy of the prediction value is poor, and the coding and decoding performance is reduced.

[0186] Based on this, the embodiment of the present application provides an encoding method, in the case of determining that the current block uses the EIP mode, determining the value of the first syntax element, determining the EIP model used by the current block, the EIP model including at least two groups of filter parameters, performing intra prediction on the current block according to the at least two groups of filter parameters to obtain the prediction value of the current block, and encoding the current block according to the prediction value of the current block and the value of the first syntax element. The embodiment of the present application also provides a decoding method, parsing the first syntax element, in the case of the first syntax element indicating that the current block uses the EIP mode, deriving the EIP model of the current block, the EIP model including at least two groups of filter parameters, performing intra prediction on the current block according to the at least two groups of filter parameters to obtain the prediction value of the current block.

[0187] Thus, when the current block uses the first intra-prediction mode, if the type of EIP model used by the current block is determined to be the first type, at least two sets of filtering parameters can be determined based on the first type of EIP model. In other words, the first type of EIP model can determine at least two sets of filtering parameters. Therefore, using these at least two sets of filtering parameters to perform intra-prediction on the current block, compared with using one set of filtering parameters to perform intra-prediction on the current block, can more accurately represent the relationship between the reconstructed region and the adjacent reconstructed region. This makes the predicted value obtained by using at least two sets of filtering parameters to perform intra-prediction on the current block more accurate, thereby improving the encoding and decoding performance.

[0188] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0189] Figure 16 is a schematic diagram of a video encoding and decoding network architecture provided in an embodiment of this application. As shown in Figure 16, the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. The electronic devices can be various types of devices with video encoding and decoding capabilities, such as mobile phones, tablets, personal computers, personal digital assistants, navigators, digital phones, video phones, televisions, sensing devices, servers, etc., and this embodiment of the application does not limit the scope of the application.

[0190] This application provides a network architecture for a video encoding / decoding system that includes decoding and encoding methods. The decoder or encoder in this application can be the aforementioned electronic device. That is, the electronic device in this application has video encoding / decoding capabilities and generally includes a video / image encoder (referred to as an encoder) and a video / image decoder (referred to as a decoder).

[0191] In one embodiment of this application, FIG17 is a schematic flowchart of a decoding method provided in this application embodiment. As shown in FIG17, the method may include:

[0192] S1701, parsing the first syntax element;

[0193] S1702, if the first syntax element indicates that the current block uses the EIP mode, derive the EIP model of the current block;

[0194] S1703, perform intra-frame prediction on the current block based on at least two sets of filtering parameters to obtain the predicted value of the current block.

[0195] It should be noted that in the embodiments of the present application, the method is applied to a decoder. Based on the composition structure of the decoder 200 shown in FIG. 2, the decoding method is mainly applied to the intra prediction part (identified by a bold frame) in FIG. 2. Wherein, when the current block uses intra prediction, this mainly proposes an optimization scheme for determining the filtering coefficient of the EIP technology in the intra prediction, so as to improve the compression efficiency.

[0196] It should also be noted that in the embodiments of the present application, some indication information in the form of syntax elements or flag can be written in the code stream. In this way, by analyzing the value of the syntax element in the code stream, the EIP mode used by the current block can be determined, and the EIP model of the current block can be derived. Exemplarily, the first syntax element can be used to indicate whether the current block uses the EIP mode.

[0197] That is, by the first syntax element, it is determined that the current block uses the EIP mode, at this time, the EIP model of the current block is derived, here the shape of the neighboring reconstructed area of the current block and the shape of the EIP filter of the current block can be determined by determining the combination index of the current block first, and then the EIP model including at least two groups of filtering parameters is determined based on the shape of the neighboring reconstructed area of the current block and the shape of the EIP filter of the current block.

[0198] Among them, the EIP model includes at least two groups of filtering parameters; it can be seen that, unlike the EIP model including one group of filtering parameters, in the embodiments of the present application, the EIP model of the current block includes at least two groups of filtering parameters, then at least two groups of filtering parameters can be used for intra prediction of the current block, so that a suitable group of filtering parameters can be determined according to the current block to predict the current block, so as to obtain the prediction value of the current block.

[0199] In order to derive the EIP model of the current block, in some embodiments, S1702 can include:

[0200] In the case that the first syntax element indicates that the current block uses the EIP mode, the second syntax element is parsed;

[0201] In the case that the second syntax element indicates that the current block does not use the EIP mode of the merge mode, the EIP model of the current block is derived.

[0202] It can be understood that after parsing the first syntax element to determine that the current block uses the EIP mode, the second syntax element is parsed, and based on the second syntax element, it can be known whether the current block uses the EIP mode of the merge mode. In the embodiments of the present application, in the case that the second syntax element indicates that the current block does not use the EIP mode of the merge mode, the EIP model of the current block is derived.

[0203] That is, in the embodiments of the present application, in the case that it is determined that the current block uses the EIP mode, it is further determined whether the current block uses the merge mode of the EIP mode, so as to derive the EIP model in the case that the merge mode is not used. It can be seen that the EIP model including at least two sets of filter parameters can be determined in the case that the merge mode of the EIP mode is not used.

[0204] In this way, in the decoding process, in the case that the non-merge mode of the EIP mode is used, the EIP model including at least two sets of filter parameters can be determined by derivation, which is used for the prediction of the current block, and the prediction accuracy in the non-merge mode of the EIP mode can be improved.

[0205] In order to derive the EIP model of the current block in the non-merge mode of the EIP mode, in some embodiments, S1702 can include:

[0206] In the case that the second syntax element indicates that the current block does not use the merge mode of the EIP mode, a third syntax element is parsed.

[0207] It can be understood that, in the case that the current block uses the EIP mode but does not use the merge mode of the EIP mode, the third syntax element is parsed, wherein the third syntax element is used to indicate whether the current block uses the first type of EIP model; that is, by parsing the third syntax element, it can be known whether the current block uses the first type of EIP model, and here the first type refers to the type of the EIP model including at least two sets of filter parameters, and in addition, the current block can use the second type of EIP model in addition to the first type of EIP model, and here the second type refers to the type of the EIP model including one set of filter parameters.

[0208] In this way, by parsing the third syntax element, it can be known whether the current block uses the first type of EIP model, so as to determine whether the current block uses the multi-filter EIP model, so that the multi-filter EIP mode can be selected in time in the coding process to improve the accuracy of the intra prediction.

[0209] In order to obtain at least two sets of filter parameters of the EIP model of the current block, in some embodiments, S1702 can further include:

[0210] A fourth syntax element is parsed to obtain a first index of the first type of EIP model;

[0211] Based on the first index, the at least two sets of filter parameters are determined; or,

[0212] Based on the preset shape of the reconstructed region adjacent to the current block and the preset shape of the EIP filter, the at least two sets of filter parameters are determined.

[0213] It can be understood that, in a case where the parsed third syntax element indicates that the current block uses the first type of EIP model, the fourth syntax element is further parsed, where the fourth syntax element is used to indicate a first index of the first type of EIP model used by the current block; that is, through the fourth syntax element, the index of the first type of EIP model used by the current block, denoted as the first index, can be known.

[0214] Based on the first index, the EIP combination can be found, so that at least two sets of filter parameters of the EIP model of the current block can be derived.

[0215] In addition, in addition to determining the at least two sets of filter parameters based on the first index, the at least two sets of filter parameters can also be determined based on a preset shape of a reconstructed region adjacent to the current block and a preset shape of an EIP filter, where the preset shape of the reconstructed region adjacent to the current block and the preset shape of the EIP filter can be determined in advance based on a size of the current block, and can also be set for the filtering EIP mode, which is not limited herein.

[0216] In this way, in the decoding process, by sequentially parsing the third syntax element and the fourth syntax element, at least two sets of filter parameters of the EIP model of the current block can be derived, or the at least two sets of filter parameters of the EIP model of the current block can be determined based on a preset shape of a reconstructed region adjacent to the current block and a preset shape of an EIP filter, which helps to achieve the purpose of predicting the current block through the multiple sets of filter parameters, thereby improving the prediction accuracy.

[0217] In addition to deriving the EIP model of the current block by using the above-mentioned manner of parsing the third syntax element and the fourth syntax element, in some embodiments, in a case where the second syntax element indicates that the current block does not use the EIP mode of the merge mode, the EIP model of the current block is derived, including:

[0218] In a case where the second syntax element indicates that the current block does not use the EIP mode of the merge mode, the fourth syntax element is parsed to obtain a first index of the EIP model used by the current block;

[0219] Based on the first index of the EIP model used by the current block, it is determined that the EIP model used by the current block is the first type of EIP model, and based on the first index, at least two sets of filter parameters are determined.

[0220] It can be understood that the combination mode of the current block not using the EIP mode is known through the second syntax element, at this time, the fourth syntax element is parsed, and the fourth syntax element includes: the type of the EIP model used by the current block, and the index of the EIP model used by the current block, wherein the fourth syntax element is used to indicate whether the current block uses the first type of EIP model, and the first index of the first type of EIP model used by the current block; that is, it is known through the fourth syntax element that the current block uses the first type of EIP model, and the index of the first type of EIP model used is the first index. It can be understood that in the fourth syntax element, the current block using the first type of EIP model can not be explicitly indicated, but the first index of the first type of EIP model obtained by parsing the fourth syntax element can be used to implicitly indicate that the current block uses the first type of EIP model.

[0221] The first index can be referred to as a combination index, based on which the EIP model of the current block and at least two sets of filter parameters of the model can be derived.

[0222] In this way, in the encoding process, the first index can be known by parsing the fourth syntax element, and the EIP model of the current block and at least two sets of filter parameters of the model can be derived, so that the prediction of the current block by multiple filter parameters can be realized through one syntax element, and the prediction efficiency is improved.

[0223] In order to derive the EIP model of the current block based on the first index, in some embodiments, based on the first index, at least two sets of filter parameters are determined, including:

[0224] Based on the first index, the shape of the reconstructed region adjacent to the current block and / or the shape of the EIP filter of the current block are determined;

[0225] Based on the shape of the reconstructed region adjacent to the current block and / or the shape of the EIP filter of the current block, at least two sets of filter parameters are determined.

[0226] It can be understood that after the first index is obtained, by searching the available EIP combination, the shape of the reconstructed region corresponding to the first index and / or the shape of the EIP filter can be obtained, which is used as the shape of the reconstructed region adjacent to the current block and / or the shape of the EIP filter of the current block, and then the size of the reconstructed region adjacent to the current block is determined, here, the size of the reconstructed region can be determined based on the size of the current block, wherein the sizes of the two can be the same or different, and here, the embodiments of the present application do not make specific limitation.

[0227] After the shape and size of the reconstructed region neighboring the current block are determined and the shape of the EIP filter of the current block is determined, at least two sets of filter parameters can be determined based on the shape of the reconstructed region neighboring the current block and the shape of the EIP filter of the current block, so as to derive the EIP model of the current block.

[0228] Of course, at least two sets of filter parameters can also be determined based on the shape of the reconstructed region neighboring the current block or the shape of the EIP filter of the current block, for example, at least two sets of filter parameters can be determined based on the shape of the reconstructed region neighboring the current block and a preset shape of the EIP filter.

[0229] In this way, the shape of the reconstructed region neighboring the current block and / or the shape of the EIP filter of the current block can be determined by the first index, and at least two sets of filter parameters of the EIP model of the current block are derived, which lays the foundation for realizing multi-filter prediction.

[0230] In order to derive the EIP model of the current block based on the shape of the reconstructed region neighboring the current block and the shape of the EIP filter of the current block, in some embodiments, at least two sets of filter parameters are determined based on the shape of the reconstructed region neighboring the current block and the shape of the EIP filter of the current block, including:

[0231] The training sample of the EIP filter of the current block is determined according to the shape of the reconstructed region neighboring the current block and the shape of the EIP filter of the current block.

[0232] The training sample of the EIP filter of the current block is divided into at least two sets of training samples, and at least two sets of filter parameters corresponding to the at least two sets of training samples are determined, so as to obtain the at least two sets of filter parameters.

[0233] In the case of determining the shape of the reconstructed region neighboring the current block and knowing the size of the current block, the size of the reconstructed region neighboring the current block can be determined, and after the size of the reconstructed region neighboring the current block is determined, the EIP filter of the current block is slid on the reconstructed region neighboring the current block, so that the training sample of the EIP filter of the current block can be obtained, and the number of training samples is related to the number of sliding times.

[0234] After obtaining the training sample of the EIP filter of the current block, the training sample needs to be grouped, which can be divided into at least two sets of training samples, and the filter parameters corresponding to each set of training samples in the at least two sets of training samples are derived, so as to obtain the at least two sets of filter parameters.

[0235] Thus, the training samples of the current block can be derived by the shape of the reconstructed region adjacent to the current block and the shape of the EIP filter of the current block, at least two groups of training samples can be obtained by grouping, and at least two groups of filter parameters can be obtained, and the EIP model can be derived by grouping, so that the obtained EIP model can contain the relationship between different pixels, which helps to improve the prediction accuracy.

[0236] In some embodiments, the at least two groups of filter parameters correspond to the same shape of the EIP filter, that is, the at least two groups of filter parameters for the same EIP model can be obtained from the same shape of the EIP filter, of course, can also be obtained from different shapes of the EIP filter, here, the embodiments of the present application do not make specific limitation.

[0237] In order to realize the grouping of the training samples, in some embodiments, the at least two groups of training samples include a first group of training samples and a second group of training samples.

[0238] The training samples are divided into at least two groups of training samples, including:

[0239] According to the sample values of the reconstructed region adjacent to the current block or the preset reconstructed region adjacent to the current block, the threshold value of the EIP filter of the current block is determined.

[0240] According to the sample value of the input position of the training sample, the reference value corresponding to the training sample is determined.

[0241] The training samples with the reference value greater than the threshold value of the EIP filter of the current block are divided into a group to obtain the first group of training samples.

[0242] The training samples with the reference value less than or equal to the threshold value of the EIP filter of the current block are divided into a group to obtain the second group of training samples.

[0243] It can be understood that, taking the training samples divided into two groups of training samples as an example, in the above grouping, the threshold value of the EIP filter of the current block can be determined according to the reconstructed region adjacent to the current block, or the threshold value of the EIP filter of the current block can be determined according to the sample values of the preset reconstructed region adjacent to the current block, here, the embodiments 4A-4C of the present application do not make specific limitation.

[0244] In the above, according to the reconstructed region adjacent to the current block to determine the threshold value of the EIP filter of the current block, the mean of the sample values of the reconstructed region adjacent to the current block can be taken as the threshold value of the EIP filter of the current block, and the median of the sample values of the reconstructed region adjacent to the current block can also be taken as the threshold value of the EIP filter of the current block, here, the embodiments of the present application do not make specific limitation.

[0245] In the above determining the threshold of the EIP filter of the current block according to the sample value of the preset reconstructed region adjacent to the current block, the preset reconstructed region can be the L-shaped reconstructed region in FIG. 10A, the upper reconstructed region in FIG. 11B, or the left reconstructed region in FIG. 11C, which is not limited in the embodiments of the present application.

[0246] In addition to determining the threshold of the EIP filter of the current block, the reference value of the training sample corresponding to the training sample is also determined according to the sample value of the input position of the training sample. After the threshold of the EIP filter of the current block and the reference value of each training sample are determined, the reference value of each training sample is compared with the threshold of the EIP filter of the current block. When the reference value is greater than the threshold of the EIP filter of the current block, the training sample corresponding to the reference value is added to the first group of training samples. When the reference value is less than or equal to the threshold of the EIP filter of the current block, the training sample corresponding to the reference value is added to the second group of training samples. In this way, the grouping of the training samples is realized.

[0247] In this way, by comparing the reference value of each training sample with the threshold of the EIP filter of the current block, the grouping of the training samples is realized. The grouping manner makes the training samples with the reference values falling into the same range into one group, so that the sample values of the input positions of the training samples in the same group are closer, and the prediction using the filter parameters determined by the training samples is more accurate.

[0248] For the above preset reconstructed region, in some embodiments, the preset reconstructed region adjacent to the current block is the L-shaped reconstructed region, the upper reconstructed region, or the left reconstructed region adjacent to the current block.

[0249] The L-shaped reconstructed region includes one or more of the following: the upper-left reconstructed region adjacent to the current block, the left reconstructed region adjacent to the current block, the lower-left reconstructed region adjacent to the current block, the lower-right reconstructed region adjacent to the current block, the upper reconstructed region adjacent to the current block, and the upper-right reconstructed region adjacent to the current block.

[0250] That is, the preset reconstructed region can be the L-shaped reconstructed region in FIG. 10A. Since the range of the L-shaped reconstructed region is larger than that of the upper reconstructed region and the left reconstructed region, the threshold of the EIP filter of the current block obtained is more referential, which is helpful to more accurately realize the grouping of the training samples.

[0251] In order to obtain the reference value of each training sample, in some embodiments, the reference value of the training sample corresponding to the training sample is determined according to the sample value of the input position of the training sample of the current block, including:

[0252] Determining the sample value of the input position used to calculate the reference value;

[0253] The reference value corresponding to the training sample is determined according to the sample value of the input position used for calculating the reference value.

[0254] It can be understood that for each training sample, all values of the sample value of the input position of each training sample can be known, and the sample value of the input position used for calculating the reference value can be obtained from the all values, wherein the sample value of the input position used for calculating the reference value can be all values of the sample value or part of the sample value, and herein, embodiments of the present application do not make specific limitations.

[0255] For example, taking the 4x4 EIP filter as an example, for one of the training samples, the sample value of the input position of the training sample is the value except the sample value of the 4th row and the 4th column, and herein, according to the sample value of the input position of the training sample, all values of the sample value of the input position of the training sample can be used to determine the reference value corresponding to the training sample, or part of the sample value of the input position of the training sample can be used to determine the reference value, for example, the sample value of the 4th row and the 3rd column is used as the reference value. In addition, the mean value of all input position sample values can also be used as the reference value.

[0256] In this way, the reference value corresponding to the training sample can be determined, which is helpful for grouping the training samples, so as to obtain at least two groups of filter parameters, and realize the prediction of the multi-filter EIP mode.

[0257] In some embodiments, the sample value of the input position used for calculating the reference value comprises:

[0258] The sample value of the input position used for calculating the reference value is determined according to the shape of the EIP filter of the current block.

[0259] It can be understood that the EIP filter can be divided into approximately three shapes, which are 4x4, 8x2 and 2x8, and herein, for different shapes of the EIP filter, the sample value of the input position used for calculating the reference value is different, for example, for the 4x4 shape of the EIP filter, the sample value of the 3rd row and the 4th column and the sample value of the 4th row and the 3rd column are determined as the sample value used for calculating the reference value, for the 8x2 shape of the EIP filter, the sample value of the 2nd row and the 7th column is determined as the sample value used for calculating the reference value, and for the 2x8 shape of the EIP filter, the sample value of the 7th row and the 2nd column is determined as the sample value used for calculating the reference value.

[0260] Thus, the shape of the EIP filter based on the current block is determined to obtain the sample value of the input position for calculating the reference value, so that the sample value of the input position for calculating the reference value is different for different shapes of the EIP filter, a more reasonable reference value is determined for different shapes of the EIP filter, and grouping is facilitated.

[0261] In order to derive the EIP model of the current block according to at least two groups of training samples, in some embodiments, the filter parameters corresponding to the at least two groups of training samples are determined respectively to obtain at least two groups of filter parameters, including:

[0262] Based on the first group of training samples, the first group of filter coefficients is determined;

[0263] Based on the second group of training samples, the second group of filter coefficients is determined.

[0264] It can be understood that, taking the above-mentioned division into the first group of training samples and the second group of training samples as an example, the autocorrelation coefficient matrix and the cross-correlation coefficient vector can be obtained based on the first group of training samples, so that the first group of filter coefficients is determined, and similarly, the autocorrelation coefficient matrix and the cross-correlation coefficient vector can be obtained based on the second group of training samples, so that the second group of filter coefficients is determined.

[0265] The at least two groups of filter parameters include: the first group of filter coefficients, the second group of filter coefficients, the threshold of the EIP filter of the current block, the shape of the EIP filter of the current block, and the identifier of the EIP filter of the current block; that is, after the first group of filter coefficients and the second group of filter coefficients are determined, the threshold of the EIP filter of the current block and the shape of the EIP filter of the current block determined previously are taken together with the second group of filter coefficients as the at least two groups of filter parameters, and in addition, the first type of identifier can also be determined as the at least two groups of filter parameters.

[0266] Thus, by solving each group of training samples to obtain each group of filter coefficients, the at least two groups of filter parameters can be determined, and thus the EIP model of the current block is determined, which lays a foundation for realizing the prediction of the EIP mode of the multi-filter of the current block.

[0267] After the EIP model of the current block is derived, in order to realize the prediction of the current block, in some embodiments, the current block is intra-predicted according to the at least two groups of filter parameters to determine the prediction value of the current block, including:

[0268] According to the position of the to-be-predicted sample of the current block and the shape of the EIP filter of the current block, the position of the input sample of the EIP filter of the current block is determined;

[0269] According to the position of the input sample of the EIP filter of the current block, the sample value of the EIP filter of the current block is determined.

[0270] determining a reference value of an input sample of the EIP filter of the current block according to the sample value of the EIP filter of the current block;

[0271] in a case where the reference value of the input sample of the EIP filter of the current block is greater than a threshold value of the EIP filter of the current block, performing intra prediction on a value of a to-be-predicted sample of the current block according to a first set of filter coefficients to obtain a prediction value of the to-be-predicted sample of the current block;

[0272] in a case where the reference value of the input sample of the EIP filter of the current block is less than or equal to the threshold value of the EIP filter of the current block, performing intra prediction on the value of the to-be-predicted sample of the current block according to a second set of filter coefficients to obtain the prediction value of the to-be-predicted sample of the current block.

[0273] It can be understood that in the prediction of the current block, the position of the to-be-predicted sample of the current block can be known, and in addition, the shape of the EIP filter of the current block is known, the output position of the EIP filter is taken as the position of the to-be-predicted sample of the current block, so that the position of the input sample of the EIP filter of the current block can be determined, and after the position of the input sample of the EIP filter of the current block is determined, the sample value at the position of the input sample of the EIP filter of the current block can be taken as the sample value of the EIP filter of the current block.

[0274] In the determination of the reference value of the input sample of the EIP filter of the current block based on the sample value of the EIP filter of the current block, the reference value of the input sample of the EIP filter of the current block can be determined based on all values of the sample value of the EIP filter of the current block, or the reference value of the input sample of the EIP filter of the current block can be determined based on part of the values of the sample value of the EIP filter of the current block, which is not limited herein.

[0275] It should be noted that the above-mentioned manner of determining the reference value of the input sample of the EIP filter of the current block is similar to the above-mentioned manner of determining the reference value of the training sample, which is not repeated here.

[0276] After determining the reference value of the input sample of the EIP filter of the current block, the reference value is compared with the threshold value of the EIP filter of the current block, so that in the case that the reference value of the input sample of the EIP filter of the current block is greater than the threshold value of the EIP filter of the current block, the value of the to-be-predicted sample of the current block is predicted by using the first filter coefficient, so as to obtain the prediction value of the to-be-predicted sample of the current block, and in the case that the reference value of the input sample of the EIP filter of the current block is less than or equal to the threshold value of the EIP filter of the current block, the value of the to-be-predicted sample of the current block is predicted by using the second filter coefficient, so as to obtain the prediction value of the to-be-predicted sample of the current block, so that the prediction value of the current block can be obtained.

[0277] In this way, the filter coefficient used for prediction is determined by comparing the reference value of the input sample of the EIP filter of the current block with the threshold value of the EIP filter of the current block, so that the appropriate filter coefficient is selected for each to-be-predicted sample of the current block, and the prediction accuracy is improved.

[0278] In addition to the above-mentioned manner of performing intra prediction in the non-merge mode using the EIP mode, the intra prediction can also be performed in the merge mode using the EIP mode, and in some embodiments, the method further includes:

[0279] In the case that the first syntax element indicates that the current block uses the EIP mode, the second syntax element is parsed;

[0280] In the case that the second syntax element indicates that the current block uses the merge mode of the EIP mode, the EIP model of the current block is determined.

[0281] It can be understood that in the case that the first syntax element indicates that the current block uses the EIP mode, the second syntax element is parsed, and in the case that the second syntax element indicates that the current block uses the merge mode of the EIP mode, the EIP model of the current block is determined.

[0282] In this way, it can be known from the second syntax element that the merge mode is used and the EIP model of the current block in the merge mode can be determined, so that the prediction in the multi-filter EIP mode in the merge mode is realized, and the prediction accuracy is improved.

[0283] In order to determine the EIP model of the current block in the merge mode, in some embodiments, in the case that the second syntax element indicates that the current block uses the merge mode of the EIP mode, the EIP model of the current block is derived, including:

[0284] In the case that the second syntax element indicates that the current block uses the merge mode of the EIP mode, a first candidate list of the current block is determined;

[0285] A fifth syntax element is parsed;

[0286] determining, based on the fifth syntax element, a second index of the first type of EIP model used by the current block from the first candidate list;

[0287] determining the EIP model of the current block based on the second index.

[0288] It can be understood that for the merge mode in the EIP mode, the first candidate list of the current block needs to be determined, after the first candidate list is constructed, the fifth syntax element is parsed, based on the fifth syntax element, the second index of the first type of EIP model used by the current block can be determined from the first candidate list, and the EIP model of the current block can be determined by using the index.

[0289] In this way, the prediction using the multi-filter EIP mode in the merge mode can be realized, thereby improving the prediction accuracy.

[0290] In some embodiments, the at least two sets of filter parameters include at least two sets of filter coefficients, a threshold value of the EIP filter, a shape of the EIP filter, and an identifier of the EIP filter. That is, the at least two sets of filter parameters in the EIP model of the current block determined above can include at least two sets of filter coefficients, and can also include a threshold value of the EIP model, a shape of the EIP filter, and an identifier of the EIP filter, which is used to indicate the type of the EIP filter, wherein the at least two sets of filter parameters are obtained from the decoded information of the decoded block by inheritance.

[0291] In order to construct the first candidate list of the current block in the merge mode, in some embodiments, the first candidate list of the current block is determined, including:

[0292] obtaining model information of the candidate model, the model information including one or more of at least two sets of filter coefficients, a threshold value of the EIP filter, a shape of the EIP filter, a number of EIP filters, and an identifier of the EIP filter;

[0293] constructing the second candidate list based on the model information of the candidate model;

[0294] reordering the models in the second candidate list to obtain the first candidate list.

[0295] It can be understood that in the process of decoding the current block, after determining that the current block uses the merge mode of the EIP mode, the first candidate list is constructed for the current block. In the construction of the first candidate list of the current block, the candidate model of the current block is first obtained from the decoding information of the current block, wherein the candidate model includes one or more of the following: the EIP model adjacent to the current block, the EIP model non-adjacent to the current block, the EIP model of the history of the current block, and the EIP model of the time domain of the current block; in this way, the candidate model of the current block can be determined.

[0296] It should be noted that for the current block, the encoding information of the current block is stored, which can include the above-mentioned EIP model used by the current block. The EIP model used by the current block is saved to the history EIP model list.

[0297] The candidate model can include a second type of EIP model.

[0298] After the candidate model is determined, based on the model information of the candidate model, a second candidate list can be constructed, and in order to facilitate the selection of the model, the models in the second candidate list need to be reordered, so that the first candidate list is obtained.

[0299] In this way, the first candidate list with the reordering result can be obtained, which facilitates the acquisition of at least two sets of filter parameters of the EIP model in the merge mode, so as to realize the multi-filter EIP prediction in the merge mode.

[0300] In order to eliminate the redundant models in the first candidate list, in some embodiments, based on the model information of the candidate model, the second candidate list is constructed, including:

[0301] The candidate model whose model information satisfies the first condition is selected from the candidate model and added to the second candidate list.

[0302] It can be understood that the models in the candidate model can be compared with the first condition in turn, and when the first condition is met, it is added to the second candidate list, and if the first condition is not met, it is not added to the second candidate list, wherein the first condition includes one or more of the following:

[0303] The identifier of the EIP filter is different from the identifier of the EIP filter of the current model in the second candidate list;

[0304] The threshold value of the EIP filter is different from any threshold value of the EIP filter of the current model in the second candidate list;

[0305] Any filter coefficient of the EIP filter is different from any filter coefficient of the EIP filter of the current model in the second candidate list.

[0306] That is, the selected model in the candidate model is compared with all models in the second candidate list, when the identifier of the selected model EIP filter is different from the identifier of the EIP filter of the current model in the second candidate list, and the threshold of the selected model EIP filter is different from any threshold of the EIP filter of the current model in the second candidate list, and any filter coefficient of the selected model EIP filter is different from any filter coefficient of the EIP filter of the current model in the second candidate list, it is added to the second candidate list.

[0307] The entire candidate list is traversed in the above manner to obtain the first candidate list.

[0308] In this way, by the above manner, the same model does not appear in the obtained first candidate list, so that the models in the first candidate list are different from each other, which is beneficial to selecting a suitable EIP model for prediction in the merge mode, and improves the prediction efficiency.

[0309] In order to improve the prediction efficiency in the merge mode, in some embodiments, the models in the second candidate list are reordered to obtain the first candidate list, including:

[0310] In the case that the type of the model in the second candidate list is the first type, the template region is intra-predicted based on at least two groups of filter parameters of the model in the second candidate list by using a template matching technology, to obtain a prediction value of the template region under the model in the second candidate list;

[0311] According to the prediction value of the template region under the model in the second candidate list and the sample value of the template region, the cost of each model in the second candidate list is determined;

[0312] According to the cost of each model, the models in the second candidate list are reordered to obtain the first candidate list.

[0313] It can be understood that, according to the position of the to-be-predicted sample of the current template region and the shape of the current candidate EIP filter, the position of the input sample of the current candidate EIP filter is determined;

[0314] According to the position of the input sample of the current candidate EIP filter, the sample value of the current candidate EIP filter is determined;

[0315] According to the sample value of the current candidate EIP filter, the reference value of the input sample of the current candidate EIP filter is determined;

[0316] In a case where the reference value of the input sample of the current candidate EIP filter is greater than the threshold value of the current candidate EIP filter, the value of the to-be-predicted sample of the current template region is intra-predicted according to the first group of filter coefficients in the at least two groups of filter coefficients of the current candidate EIP filter, to obtain a predicted value of the to-be-predicted sample of the current template region;

[0317] In a case where the reference value of the input sample of the current candidate EIP filter is less than or equal to the threshold value of the current candidate EIP filter, the value of the to-be-predicted sample of the current template region is intra-predicted according to the second group of filter coefficients in the at least two groups of filter coefficients of the current candidate EIP filter, to obtain a predicted value of the to-be-predicted sample of the current template region. Similarly, the template matching technology is performed, and for the model in the second candidate list, when the model is of the first type, the template matching technology is used to intra-predict the template region based on the at least two groups of filter parameters of the model, so that the predicted value of the template region under the model can be obtained.

[0318] Then, the cost of the model is obtained according to the predicted value of the template region under the model and the reconstructed value of the template region. It should be noted that if the second candidate list includes a model of the second type, the cost of the template region under the model of the second type is calculated in the related art.

[0319] After obtaining the cost of each model in the second candidate model, the models in the second candidate model are reordered using the cost of each model, so that the first candidate list can be obtained.

[0320] The at least two groups of filter parameters of the model are obtained from the candidate model in the coding information of the current block, and are inherited information.

[0321] In this way, the above-mentioned template matching technology can be used to reorder the models in the second candidate list, so that the first candidate list can be obtained, which is beneficial to determining a suitable EIP model for intra-prediction in the merge mode.

[0322] In some embodiments, in order to implement intra-prediction of the current block in the merge mode, the at least two groups of filter parameters are used to intra-predict the current block to obtain a predicted value of the current block, including:

[0323] According to the position of the to-be-predicted sample of the current block and the shape of the EIP filter of the current block, the position of the input sample of the EIP filter of the current block is determined;

[0324] According to the position of the input sample of the EIP filter of the current block, the sample value of the EIP filter of the current block is determined;

[0325] determining a reference value of an input sample of the EIP filter of the current block according to a sample value of the EIP filter of the current block;

[0326] in a case that the reference value of the input sample of the EIP filter of the current block is greater than the threshold value of the EIP filter of the current block, performing intra prediction on a value of the to-be-predicted sample of the current block according to the first group of filter coefficients in the at least two groups of filter coefficients to obtain a prediction value of the to-be-predicted sample of the current block;

[0327] in a case that the reference value of the input sample of the EIP filter of the current block is less than or equal to the threshold value of the filter of the current block, performing intra prediction on the value of the to-be-predicted sample of the current block according to the second group of filter coefficients in the at least two groups of filter coefficients to obtain the prediction value of the to-be-predicted sample of the current block.

[0328] It can be understood that in the prediction of the current block, the position of the to-be-predicted sample of the current block is determined first, and after the at least two groups of filter parameters are determined, the shape of the EIP filter of the current block can be obtained. The output position of the EIP filter of the current block is coincided with the position of the to-be-predicted sample of the current block by using the shape of the EIP filter of the current block and the position of the to-be-predicted sample of the current block, and the input position of the EIP filter of the current block can be determined as the position of the input sample of the EIP filter of the current block.

[0329] After the position of the input sample of the EIP filter of the current block is known, the value corresponding to the position of the input sample of the EIP filter of the current block can be determined as the sample value of the EIP filter of the current block. Then, the reference value of the input sample of the EIP filter of the current block is determined based on all or part of the sample values of the EIP filter of the current block.

[0330] In a case that the reference value of the input sample of the EIP filter of the current block is greater than the threshold value of the EIP filter of the current block, the value of the to-be-predicted sample of the current block is intra predicted by using the first filter coefficient, so as to obtain the prediction value of the to-be-predicted sample of the current block; in a case that the reference value of the input sample of the EIP filter of the current block is less than or equal to the threshold value of the filter of the current block, the value of the to-be-predicted sample of the current block is intra predicted by using the second filter coefficient, so as to obtain the prediction value of the to-be-predicted sample of the current block.

[0331] The shape of the EIP filter of the current block, the threshold value of the EIP filter of the current block, the first filter coefficient and the second filter coefficient are all obtained from the at least two groups of filter parameters, and the at least two groups of filter parameters are obtained from the first candidate list.

[0332] In this way, the multi-filter EIP prediction in the merge mode is realized, the at least two groups of filter parameters of the model in the inheritance candidate list are used to realize the multi-filter EIP prediction, and the prediction efficiency is improved.

[0333] For the determination of the filter coefficient, the regularization parameter can be determined in a manner of regularization parameter. In some embodiments, the method further comprises:

[0334] The regularization parameter determined by the current block in deriving the first type of EIP model is different from the regularization parameter determined by the current block in deriving the second type of EIP model.

[0335] It can be understood that, for the current block, the regularization parameter determined in deriving the first type of EIP model can be referred to as the first regularization parameter, and the regularization parameter determined in deriving the second type of EIP model can be referred to as the second regularization parameter; wherein the second type of EIP model includes a group of filter parameters. That is, the first type can be referred to as a multi-filter EIP model, and the second type can be referred to as a single-filter EIP model.

[0336] Here, the first regularization parameter is different from the second regularization parameter, that is, the different types of EIP models are used, so that the regularization parameters corresponding to different types are different.

[0337] Here, different rules are used to determine the regularization parameter for the first type of EIP model and the second type of EIP model.

[0338] For the first type of EIP model, in order to determine the regularization parameter, in some embodiments, the method further comprises:

[0339] According to the number of groups of at least two groups of filter parameters, the regularization parameter is determined.

[0340] It can be understood that the regularization parameter can be determined according to the number of groups of at least two groups of filter parameters, that is, the regularization parameter is related to the number of groups of at least two groups of filter parameters, or in other words, the number of filters of the EIP filter mode, so that the determined filter coefficient is more accurate.

[0341] In addition, in order to determine the regularization parameter for the first type of EIP model, in some embodiments, the method further comprises:

[0342] According to the number of training samples of the current block obtained, the regularization parameter is determined.

[0343] It can be understood that the regularization parameter can be determined according to the number of training samples of the current block, that is, the regularization parameter is related to the number of training samples of the current block, for example, based on the interval in which the number of training samples of the current block falls, the corresponding parameter is determined as the regularization parameter. In this way, the determined filter coefficient is more accurate.

[0344] To achieve the control of the multi-filter EIP mode, in some embodiments, the method further comprises:

[0345] parsing a sixth syntax element.

[0346] It can be understood that the sixth syntax element is parsed, and the sixth syntax element is used to indicate whether the third syntax element is decoded, that is, by parsing the sixth syntax element, it can be known whether the third syntax element is decoded, so as to achieve the control of the EIP mode through the higher-level syntax.

[0347] Further, in order to achieve the decoding of the third syntax element, in some embodiments, the method further comprises:

[0348] According to the relationship between the size parameter of the current block and the preset size parameter, it is determined whether the third syntax element is decoded.

[0349] It can be understood that here, according to the relationship between the size parameter of the current block and the preset size parameter, for example, it is determined whether the height of the current block is greater than the preset height, if it is greater, the decoding of the third element is performed, otherwise, the decoding of the third syntax element is not performed.

[0350] In this way, by setting the preset size parameter to meet the condition, the decoding of the third syntax element is achieved, which is beneficial to achieve the control of the EIP mode.

[0351] Further, in order to achieve the decoding of the third syntax element, in some embodiments, the method further comprises:

[0352] According to the decoded syntax element of the decoded neighboring block of the current block, it is determined whether the third syntax element is decoded.

[0353] It can be understood that here, according to the type identifier of the EIP model used by the coded block of the current block, the type identifier of the EIP model is used to indicate the type of the EIP model, if it is the first type, it is determined that the third syntax element is decoded, if it is the second type, the third syntax element is not decoded.

[0354] In this way, by obtaining the type identifier of the EIP model used by the decoded neighboring block of the current block, the decoding of the third syntax element is achieved, which is beneficial to achieve the control of the EIP mode.

[0355] For the first type of EIP model, in some embodiments, the size of the adjacent reconstruction region determined by the first type of EIP model is different from the size of the reconstruction region of the current block determined by the second type of EIP model. The adjacent reconstruction region is used to derive the filter coefficient.

[0356] It can be understood that, when the first type of EIP model is used for the current block, the size of the corresponding reconstruction region is determined, i.e., the first size, and when the second type of EIP model is used for the current block, the size of the reconstruction region is determined, i.e., the second size, wherein the second type of EIP model includes a set of filter parameters. That is, the second type of EIP model is a single filter.

[0357] Here, the first size is different from the second size.

[0358] For example, the first size can be a preset multiple of the minimum value of the height of the current block and the width of the current block, wherein the preset multiple is not equal to 1, and the second size can be the minimum value of the height of the current block and the width of the current block.

[0359] In order to distinguish the index value of the first type of EIP model from the index value of the second type of EIP model, in some embodiments, the method further includes:

[0360] In the case where the third syntax element or the fourth syntax element indicates that the current block uses the second type of EIP model, the seventh syntax element is parsed; wherein the seventh syntax element is used to indicate the index of the EIP model used by the current block; the second type of EIP model includes a set of filter parameters.

[0361] It can be understood that, for the case where the first type of EIP model is used for the current block, the fourth syntax element is parsed to obtain the index value of the EIP model, and for the case where the second type of EIP model is used for the current block, the seventh syntax element is parsed to obtain the index value of the EIP model, wherein the search range of the index value of the EIP model in the fourth syntax element is different from the search range of the index value of the EIP model in the seventh syntax element. The above search range can be an EIP combination.

[0362] That is, in the decoding process, after the index value is obtained, the index value needs to be searched in the search range, and here, the search range of the index value corresponding to the fourth syntax element is different from the search range of the index value corresponding to the seventh syntax element.

[0363] In order to realize the control of the multi-filter EIP mode, in some embodiments, the method further includes:

[0364] The sixth syntax element is parsed;

[0365] At least two sets of filter parameters are determined based on the sixth syntax element and the first index.

[0366] It can be understood that the sixth syntax element is parsed, wherein the sixth syntax element is used to indicate whether the available EIP combination contains a combination corresponding to the EIP model of the first type; then the EIP combination is determined based on the sixth syntax element, and then the EIP model is determined from the EIP combination based on the first index, and at least two sets of filter parameters of the EIP model are determined.

[0367] The embodiment of the present application provides a decoding method. When it is determined that a current block uses a first intra prediction technology and the current block does not use a merge mode of the first intra prediction technology by parsing a code stream, a first candidate list of the current block is determined, and then mode information of the current block, such as a template region and a shape of a filter, can be determined according to the first candidate list and a mode index in the code stream; and then a coefficient of the filter in a filter parameter can be determined according to the mode information and a regularization parameter, so that the generalization ability is improved, and the coefficient of the filter can be better applied to prediction of the current block. Thus, prediction of the current block according to the coefficient of the filter and the shape of the filter can improve prediction accuracy of the current block, so that compression efficiency can be improved, and in turn, coding and decoding performance can be improved.

[0368] In another embodiment of the present application, FIG. 18 is a flowchart of an encoding method provided by the embodiment of the present application. The encoding method is applied to an encoder. Based on the constituent structure of the encoder 100 shown in FIG. 1, the encoding method is mainly applied to an intra prediction part (indicated by a bold frame) in FIG. 1. As shown in FIG. 18, the encoding method can include the following steps.

[0369] S1801, determining a value of a first syntax element in a case where it is determined that a current block uses an EIP mode;

[0370] S1802, determining an EIP model used by the current block;

[0371] S1803, performing intra prediction on the current block according to at least two sets of filter parameters to obtain a prediction value of the current block;

[0372] S1804, encoding the current block according to the prediction value of the current block and the value of the first syntax element.

[0373] In the embodiment of the present application, in the process of encoding the current block by the encoder, if it is determined that the current block uses the EIP mode, the value of the first syntax element is determined, so that the decoding side can obtain that the current block uses the EIP mode by parsing the first syntax element.

[0374] determining an EIP model used by the current block, wherein the EIP model comprises at least two sets of filter parameters, that is, the EIP model used by the current block is the first type of EIP model, namely, the current block uses multiple filters to perform prediction, and then performing intra prediction on the current block according to the at least two sets of filter parameters to obtain a prediction value of the current block. It should be noted that the prediction manner of the current block at the encoding side is similar to that at the decoding side, which will not be described herein.

[0375] After obtaining the prediction value, a residual value of the current block can be determined based on the prediction value of the current block and the original value of the current block, and the value of the first syntax element and the residual value are encoded, and the obtained encoded bits are written into the bitstream. Specifically, some indication information in the form of syntax elements or flag can be written into the bitstream. In this way, by analyzing the value of the syntax element in the bitstream, the EIP mode used by the current block can be determined, and the EIP mode of the current block can be derived. Exemplarily, the first syntax element can be used to indicate whether the EIP mode is used by the current block.

[0376] The EIP model comprises at least two sets of filter parameters. It can be seen that, different from the EIP model comprising one set of filter parameters, in the embodiment of the present application, the EIP model of the current block comprises at least two sets of filter parameters, and then the at least two sets of filter parameters are used to perform intra prediction on the current block, so that a suitable set of filter parameters can be determined according to the current block to perform prediction on the current block, and thus the prediction value of the current block is obtained.

[0377] To determine the value of the second syntax element, in some embodiments, the method further comprises:

[0378] In the case where the current block uses the EIP mode and the case where it is determined that the current block does not use the merge mode of the EIP mode, the value of the second syntax element is determined.

[0379] It can be understood that, in the case where the current block uses the EIP mode and the case where it is determined that the current block does not use the merge mode of the EIP mode, the value of the second syntax element is determined, and by determining the value of the second syntax element, the decoding side can analyze the second syntax element to obtain that the current block uses the EIP mode and the current block does not use the merge mode of the EIP mode.

[0380] In this way, the same prediction manner as the encoding side is achieved at the decoding side.

[0381] To determine the third syntax element, in some embodiments, the method further comprises:

[0382] determining a first type of EIP model used by the current block;

[0383] determine the value of the third syntax element based on the determined first type of EIP model used by the current block;

[0384] determine the first index of the first type of EIP model used by the current block;

[0385] determine the value of the fourth syntax element based on the determined first index.

[0386] It can be understood that after determining the first type of EIP model used by the current block, the value of the third syntax element is determined based on the first type of EIP model used by the current block, so that the decoding side knows that the first type of EIP model is used by the current block after parsing the third syntax element.

[0387] The encoding side determines the first index of the first type of EIP model used by the current block. Here, after determining the first type of EIP model used by the current block, the first index of the first type of EIP model used by the current block can be known, and the index is the value in the combination index corresponding to the first type of EIP model.

[0388] Based on the first index, the value of the fourth syntax element is determined, so that the decoding side knows the first index of the first type of EIP model used by the current block after parsing the fourth syntax element, thereby obtaining the first type of EIP model.

[0389] In addition to determining the third syntax element and the fourth syntax element described above, the prediction of the multi-filter EIP mode can also be realized by determining the fourth syntax element at the encoding side. In some embodiments, the method further comprises:

[0390] determine the first type of EIP model used by the current block and the first index of the first type of EIP model used by the current block;

[0391] determine the value of the fourth syntax element based on the first type of EIP model used by the current block and the first index.

[0392] It can be understood that if the first type of EIP model used by the current block and the first index thereof are determined, the value of the fourth syntax element can be determined based on the first type of EIP model used by the current block and the first index. In this way, the decoding side can know the type and index value of the EIP model used by the current block after parsing the fourth syntax element, that is, the type of the EIP model used by the current block can be known without the third syntax element. The prediction of the multi-filter EIP mode is realized by using one syntax element, which improves the prediction efficiency.

[0393] In some embodiments, determining the EIP model used by the current block comprises:

[0394] determining a first index of an EIP model used by the current block;

[0395] based on the first index, determining a shape of a reconstructed region neighboring the current block and a shape of an EIP filter of the current block;

[0396] deriving the EIP model used by the current block based on the shape of the reconstructed region neighboring the current block and the shape of the EIP filter of the current block.

[0397] In some embodiments, deriving the EIP model used by the current block based on the shape of the reconstructed region neighboring the current block and the shape of the EIP filter of the current block comprises:

[0398] determining training samples for deriving the EIP filter of the current block according to the shape of the reconstructed region neighboring the current block and the shape of the EIP filter of the current block;

[0399] dividing the training samples into at least two groups of training samples;

[0400] deriving the EIP model used by the current block according to the at least two groups of training samples.

[0401] In some embodiments, the at least two groups of training samples comprise a first group of training samples and a second group of training samples;

[0402] dividing the training samples into at least two groups of training samples comprises:

[0403] determining a threshold value of the EIP filter of the current block according to sample values of the reconstructed region neighboring the current block or a preset reconstructed region neighboring the current block;

[0404] determining a reference value of a training sample according to a sample value at an input position of the training sample;

[0405] dividing the training samples into a group of training samples whose reference values are greater than the threshold value of the EIP filter of the current block to obtain a first group of training samples;

[0406] dividing the training samples into a group of training samples whose reference values are less than or equal to the threshold value of the EIP filter of the current block to obtain a second group of training samples.

[0407] In some embodiments, the preset reconstructed region neighboring the current block is an L-shaped reconstructed region, an upper reconstructed region or a left reconstructed region.

[0408] In some embodiments, deriving the EIP model used by the current block according to the at least two groups of training samples comprises:

[0409] determining a first group of filter coefficients based on the first group of training samples;

[0410] determining a second group of filter coefficients based on the second group of training samples;

[0411] The second set of filter parameters comprises: the first set of filter coefficients, the second set of filter coefficients, a threshold of the EIP filter of the current block, and a shape of the EIP filter of the current block.

[0412] In some embodiments, the determining the prediction value of the current block according to the at least two sets of filter parameters comprises:

[0413] According to the position of the to-be-predicted sample of the current block and the shape of the EIP filter of the current block, the position of the input sample of the EIP filter of the current block is determined.

[0414] According to the position of the input sample of the EIP filter of the current block, the sample value of the EIP filter of the current block is determined.

[0415] According to the sample value of the EIP filter of the current block, the reference value of the input sample of the EIP filter of the current block is determined.

[0416] In a case where the reference value of the input sample of the EIP filter of the current block is greater than the threshold of the EIP filter of the current block, the value of the to-be-predicted sample of the current block is intra-predicted according to the first set of filter coefficients to obtain the prediction value of the to-be-predicted sample of the current block.

[0417] In a case where the reference value of the input sample of the EIP filter of the current block is less than or equal to the threshold of the EIP filter of the current block, the value of the to-be-predicted sample of the current block is intra-predicted according to the second set of filter coefficients to obtain the prediction value of the to-be-predicted sample of the current block.

[0418] In order to determine the value of the second syntax element, in some embodiments, the method further comprises:

[0419] In a case where the current block uses the EIP mode and a case where the current block uses the merge mode of the EIP mode, the value of the second syntax element is determined.

[0420] It can be understood that, in a case where the current block uses the EIP mode and a case where the current block uses the merge mode of the EIP mode, the value of the second syntax element is determined, and by determining the value of the second syntax element, the second syntax element is parsed at the decoding side to obtain that the current block uses the EIP mode and the current block does not use the merge mode of the EIP mode.

[0421] In this way, the same prediction mode as the encoding side is implemented at the decoding side.

[0422] In order to determine the value of the fifth syntax element, in some embodiments, the method further comprises:

[0423] In a case where the current block uses the merge mode of the EIP mode, a first candidate list of the current block is determined;

[0424] A second index of the first type of EIP model used by the current block is determined from the first candidate list;

[0425] Based on the second index, a value of the fifth syntax element is determined;

[0426] Based on the second index, the EIP model used by the current block is determined.

[0427] It can be understood that, in a case where the current block uses the merge mode of the EIP mode, similar to the encoding end, in determining the first candidate list of the current block, the second index of the first type of EIP model used by the current block is determined from the first candidate list, and here, details are not repeated.

[0428] After the second index is determined, the value of the fifth syntax element can be determined based on the second index, so that the decoding end can obtain the second index of the EIP model used by the current block in parsing the fifth syntax element.

[0429] In some embodiments, the at least two groups of filter parameters include: at least two groups of filter coefficients of the current block, a threshold value of the EIP filter of the current block, a shape of the EIP filter of the current block, and an identifier of the EIP filter of the current block.

[0430] In some embodiments, determining the first candidate list of the current block includes:

[0431] The candidate model of the current block is obtained from the encoding information of the current block; wherein the candidate model includes one or more of the following: an EIP model adjacent to the current block, an EIP model non-adjacent to the current block, an EIP model of the history of the current block, and an EIP model of the time domain of the current block;

[0432] In a case where the type of the candidate model is the first type, at least two groups of filter parameters in the candidate model, a threshold value of the filter in the candidate model, a shape of the filter in the candidate model, a number of filters in the candidate model, and an identifier of the filter in the candidate model are determined as the model information of the candidate model;

[0433] Based on the model information of the candidate model, a second candidate list is constructed;

[0434] The models in the second candidate list are reordered to obtain the first candidate list.

[0435] In some embodiments, based on the model information of the candidate model, the second candidate list is constructed, including:

[0436] The model information of the candidate model satisfying the first condition is selected from the candidate models and added to a second candidate list; wherein the first condition comprises one or more of the following:

[0437] The identifier of the EIP filter is different from the identifier of the EIP filter of the current model in the second candidate list;

[0438] The threshold of the EIP filter is different from any threshold of the EIP filter of the current model in the second candidate list;

[0439] Any filter coefficient of the EIP filter is different from any filter coefficient of the EIP filter of the current model in the second candidate list.

[0440] In some embodiments, the models in the second candidate list are reordered to obtain the first candidate list, comprising:

[0441] In the case that the type of the model in the second candidate list is the first type, the template region is intra-predicted based on at least two groups of filter parameters of the model in the second candidate list using a template matching technology to obtain the prediction value of the template region under the model in the second candidate list;

[0442] According to the prediction value of the template region under the model in the second candidate list and the sample value of the template region, the cost of each model in the second candidate list is determined;

[0443] According to the cost of each model, the models in the second candidate list are reordered to obtain the first candidate list.

[0444] In some embodiments, the current block is intra-predicted according to the at least two groups of filter parameters to obtain the prediction value of the current block, comprising:

[0445] According to the position of the to-be-predicted sample of the current block and the shape of the EIP filter of the current block, the position of the input sample of the EIP filter of the current block is determined;

[0446] According to the position of the input sample of the EIP filter of the current block, the sample value of the EIP filter of the current block is determined;

[0447] According to the sample value of the EIP filter of the current block, the reference value of the input sample of the EIP filter of the current block is determined;

[0448] In the case that the reference value of the input sample of the EIP filter of the current block is greater than the threshold of the EIP filter of the current block, the value of the to-be-predicted sample of the current block is intra-predicted according to the first group of filter coefficients in the at least two groups of filter coefficients to obtain the prediction value of the to-be-predicted sample of the current block;

[0449] In a case where the reference value of the input sample of the EIP filter of the current block is less than or equal to the threshold value of the filter of the current block, the value of the to-be-predicted sample of the current block is intra-predicted according to the second group of filter coefficients in the at least two groups of filter coefficients to obtain the prediction value of the to-be-predicted sample of the current block.

[0450] In some embodiments, the method further includes:

[0451] The regularization parameter determined by the current block using the first type of EIP model is different from the regularization parameter determined by the current block using the second type of EIP model.

[0452] The second type of EIP model includes a group of filter parameters.

[0453] In some embodiments, the method further includes:

[0454] The regularization parameter is determined according to the number of groups of the at least two groups of filter parameters.

[0455] In some embodiments, the method further includes:

[0456] The regularization parameter is determined according to the number of training samples of the current block obtained.

[0457] In order to determine the value of the sixth syntax element, in some embodiments, the first type of EIP model used by the current block is determined, including:

[0458] The first type of EIP model used by the current block is determined, and the value of the sixth syntax element is determined.

[0459] It can be understood that here, when the first type of EIP model used by the current block is determined, that is, the current block uses the multi-filter type, the value of the sixth syntax element is determined, so that the decoding side can obtain whether to decode the syntax element of whether to use the first type of EIP model when parsing the sixth syntax element.

[0460] In some embodiments, the method further includes:

[0461] Whether to encode the third syntax element is determined according to the relationship between the size parameter of the current block and the preset size.

[0462] In some embodiments, the method further includes:

[0463] Whether to encode the third syntax element is determined based on the type of the EIP model used by the decoded neighboring block of the current block.

[0464] In some embodiments, the method further includes:

[0465] The size of the reconstructed region determined by the first type of EIP model is different from the size of the reconstructed region of the current block determined by the second type of EIP model.

[0466] The second type of EIP model includes a set of filter parameters.

[0467] To determine the value of the seventh syntax element, in some embodiments, the method further includes:

[0468] determining that the current block uses the second type of EIP model and a third index of the second type of EIP model used by the current block;

[0469] determining the value of the seventh syntax element based on that the current block uses the second type of EIP model and the third index.

[0470] It can be understood that after determining that the current block uses the second type of EIP model and the third index of the second type of EIP model used by the current block, the second type of EIP model includes a set of filter parameters, and the value of the seventh syntax element is determined based on that the current block uses the second type of EIP model and the third index. Thus, at the decoding side, parsing the seventh syntax element can obtain that the EIP model used by the current block is the second type, and the index value of the EIP model.

[0471] The search range of the index value of the EIP model in the fourth syntax element is different from the search range of the index value of the EIP model in the seventh syntax element; that is, the combined index corresponding to the second type of EIP is different from the combined index of the first type of EIP model.

[0472] In some embodiments, encoding the current block according to the prediction value of the current block and the value of the first syntax element includes:

[0473] obtaining a residual value of the current block according to the prediction value of the current block;

[0474] encoding the value of one or more syntax elements and the residual value of the current block, and writing the obtained coding bits into a bitstream.

[0475] After obtaining the first syntax element, the second syntax element, the third syntax element, the fourth syntax element, the fifth syntax element, the sixth syntax element, the seventh syntax element, and the residual value, the one or more syntax elements and the residual value can be encoded, and the obtained coding bits are written into a bitstream.

[0476] The embodiment of the application provides a coding method, in the case that it is determined that a current block uses a first intra prediction mode, determining available EIP models of the current block, at least one EIP model in the available EIP models is of a first type, the first type is used for indicating that filtering parameters determined by the available EIP models are at least two groups, performing intra prediction on the current block according to filtering parameters corresponding to the available EIP models, obtaining a prediction value of the current block under the available EIP models, determining a cost of the current block under the available EIP models according to an original value of the current block and the prediction value of the current block under the available EIP models, determining a value of a first syntax element and a value of a second syntax element according to the cost of the current block under the available EIP models, the first syntax element is used for indicating whether the current block uses the first intra prediction mode, and the second syntax element is used for indicating whether a type of an EIP model used by the current block is the first type, encoding the value of the first syntax element and the value of the second syntax element, and writing obtained coding bits into a bitstream. When the current block uses the first intra prediction mode, and when it is determined that the type of the EIP model used by the current block is the first type, at least two groups of filtering parameters can be determined according to the EIP model of the first type, that is, the EIP model belonging to the first type can determine at least two groups of filtering parameters, and then the at least two groups of filtering parameters are used to perform intra prediction on the current block. Compared with using one group of filtering parameters to perform intra prediction on the current block, using the at least two groups of filtering parameters can more accurately represent the relationship between the reconstructed region and the adjacent reconstructed region, so that the prediction value obtained by using the at least two groups of filtering parameters to perform intra prediction on the current block is more accurate, and thus the coding and decoding performance is improved.

[0477] In another embodiment of the application, based on the coding method of the foregoing embodiment, the technical scheme of the embodiment of the application is mainly as follows: using the EIP technology of multiple filters. The idea is similar to the MMLM technology. One is that multiple interpolation filters can be derived by grouping training samples; and two is that different interpolation filters can be selected when predicting a current block (or a template of the current block) based on the same grouping rule. By adaptively selecting among the multiple interpolation filters, the coding efficiency of the EIP is improved.

[0478] In a specific embodiment, the detailed scheme of the embodiment of the application includes the following:

[0479] First, grouping of training samples:

[0480] The EIP technique can derive the interpolation filter based on the reconstructed region. For a given shape of filter, as shown in FIGS. 4A-6C, it can slide over the given reconstructed region, and at each possible sliding position, it can obtain a training sample, which contains N (N is 15 in the example) input pixel values and 1 output pixel value. After traversing all possible positions, it can obtain all training samples, and thus solve the interpolation filter of the EIP. The training samples can be divided into M groups, and thus derive M interpolation filters. One grouping rule is to define a reference value for any sample at a position, and compare the reference value with a threshold to group. The reference value can be a pixel value or a value calculated from multiple pixel values (e.g., mean value of n pixels, gradient value, etc.).

[0481] It is noted that the reference value for different shapes of filters can be calculated from different pixels or the same pixels. It can involve 1 or more input pixels. For example, the reference value is the mean value of all input pixels. The setting of input pixel values involved in the reference value can be predefined or selected by a high-level syntax element

[0482] Exemplarily, FIG. 19A is a schematic diagram of one optional shape of filter provided in the embodiments of the present application, as shown in FIG. 19A, the pixel values at the positions corresponding to the circles are used to determine which group the filter belongs to, and the mean value of the pixel values at the positions corresponding to the two circles in FIG. 19A is used as the reference value for determining which group the current EIP belongs to. Similarly, FIG. 19B is a schematic diagram of another optional shape of filter provided in the embodiments of the present application, as shown in FIG. 18B, the pixel values at the positions corresponding to the circles are used as the reference value for determining which group the current EIP belongs to. FIG. 19C is a schematic diagram of another optional shape of filter provided in the embodiments of the present application, as shown in FIG. 18C, the pixel values at the positions corresponding to the circles are used as the reference value for determining which group the current EIP belongs to.

[0483] Each filled-in square in FIGS. 19A-19C indicates an input position for prediction by the EIP mode, and the unfilled-in square indicates an output position for prediction by the EIP mode, and the circle represents a pixel used to calculate the reference value. In FIG. 19A, the 4x4 filter uses the pixel at the position relative to the current position (0, -1) and (-1, 0) to calculate the reference value; in FIG. 19B, the 8x2 filter uses the pixel at the position (-1, 0) to calculate the reference value; and in FIG. 19C, the 2x8 filter uses the pixel at the position (0, -1) to calculate the reference value.

[0484] The threshold value can be the mean value of the pixels in a certain region, for example, the three reconstruction regions shown in FIGS. 4A-6C. The mean value of all pixel values in a given reconstruction region can be calculated as the threshold value. In addition, which reconstruction region is used can be determined by a syntax element of the current block. Different reconstruction regions can result in different threshold values, and the corresponding grouping methods can also be different. One implementation to reduce complexity is to use the same region to determine the threshold value regardless of which reconstruction region is used to derive the EIP filter for the current block. For example, the mean value of the pixels in the L-shaped reconstruction region can be used as the threshold value, where the shape of the EIP filter (filterShape) has already been determined when grouping the samples.

[0485] When traversing the training samples, the reference value of a sample can be obtained and compared with the threshold value. According to the result, the sample can be added to the training sample set of the corresponding group. In one implementation, M is equal to 2, and the sample is divided into two groups. The threshold value threshold is equal to the mean value of the pixel values in the current reconstruction region. The output pixel of the current sample is located at (x, y), and the reference value ref is:

[0486] If ref≤threshold, the current sample belongs to the first group, otherwise, the current sample belongs to the second group.

[0487] Second, application of multiple filters:

[0488] According to the above grouping rule, M sets of training sample sets can be obtained. The shape of the EIP filter for each set of training sample sets is determined. In one implementation, the filter shapes corresponding to the M sets of training sample sets are the same. The shape of the EIP filter for the current block can be determined by a syntax element. For each set of training sample sets, a set of autocorrelation coefficient matrices and a set of cross-correlation coefficient vectors can be constructed, and the interpolation filter coefficients can be further obtained by solving the linear equation system constructed by the autocorrelation coefficient matrices and the cross-correlation coefficient vectors.

[0489] The M filters obtained can be used for prediction of the current block. When predicting a pixel located at (x, y), the same grouping method as that for the training samples is used to select the filter of the corresponding group to calculate the prediction value. For example, using the same method as the above grouping method, M is equal to 2, and the filters filter1 and filter2 are derived. The threshold value threshold is equal to the mean value of the pixel values in the current reconstruction region, and the reference value ref is:

[0490] The prediction value can be represented as:

[0491] where c 1_i and c 2_icoefficients of filter filter1 and filter filter2, respectively, (offsetX 1_i , offsetY 1_i ) represents the offset value of the i-th input of filter1 relative to the current position (x, y). (offsetX 2_i , offsetY 2_i ) represents the offset value of the i-th input of filter2 relative to the current position (x, y).

[0492] After introducing the multi-filter method in the present example, the EIP filter (or referred to as EIP model) can be a combination of multiple EIP filter coefficients, the shape of the EIP filter, the threshold of the EIP filter, etc. For example, the EIP model is represented as {c1[0, N-1], c2[0, N-1], filterShape, threshold, bMmEip}, or has different filterShape, wherein c1[0, N-1] is the filter coefficient of filter1, filterShape is the shape of filter1 and filter2, c2[0, N-1] is the filter coefficient of filter2, threshold is the threshold for determining whether to use filter1 or filter2, and bMmEip is whether the current EIP model belongs to the multi-filter. If bMmEip is true, then during prediction, it is determined whether to use filter1 or filter2 according to the reference value of the current position; if bMmEip is false, then during prediction, filter1 is used.

[0493] Third, multi-filter and EIP merge mode:

[0494] After introducing the multi-filter method in the present example, after the current block is encoded using the multi-filter EIP mode, the information of the multi-filter can be saved for use in subsequent encoding blocks. For example, for constructing the candidate list in the EIP merge mode.

[0495] Among them, the additional EIP model information: on the basis of the related art, one or more of the following information can be additionally saved: additional M-1 sets of filter coefficients; 1 or more threshold information (for selecting a filter during prediction), additional filter shape, indication of whether the current EIP model belongs to a multi-filter, number of filters contained in the current EIP model, etc.

[0496] In addition, determining whether the EIP models are the same: based on the above additional filter information. When determining whether the EIP models are the same (for example, when constructing the candidate list in the merge mode, checking whether the candidates are the same, or in other words, whether the list is redundant), one or more of the following determinations can be additionally added:

[0497] When the identification of whether the EIP model belongs to multi-filter is different, the two EIP models are different;

[0498] When both are multi-filter, the i-th threshold value is different, the two EIP models are different;

[0499] When both are multi-filter, any coefficient of the i-th filter is different, the two EIP models are different;

[0500] The EIP prediction of multi-filter can be combined with the merge mode of EIP. One way of combination is:

[0501] The existing EIP merge mode related syntax elements are not changed;

[0502] When constructing the merge list, obtaining the interpolation filter model of adjacent, non-adjacent, and time domain, if the block at the position uses the EIP prediction of multi-filter, it can be added as the EIP model candidate of multi-filter;

[0503] When maintaining the history cache model list of EIP, if the current coding block uses the EIP prediction of multi-filter, the EIP model of multi-filter is updated in the history cache model list of EIP;

[0504] When constructing the merge list, obtaining the history cache model candidate of EIP, the candidates are sequentially obtained from the above-mentioned history cache model list of EIP, which may be the EIP model of multi-filter or the EIP model of single filter.

[0505] When the merge list is reordered, if the current candidate is the EIP model of multi-filter, the corresponding filter is adaptively selected from the EIP model of multi-filter to obtain the prediction value according to the threshold threshold in the candidate EIP model and the reference value ref at the time of prediction, which is the same as the prediction process of the application of multi-filter.

[0506] After determining the EIP model of the current block in combination with reordering, EIP merge index, etc., if the current block selects the EIP model of multi-filter, the corresponding filter is adaptively selected from the EIP model of multi-filter to obtain the prediction value according to the threshold threshold in the EIP model and the reference value ref at the time of prediction, which is the same as the prediction process of the application of multi-filter.

[0507] Fourth, multi-filter and EIP regularization:

[0508] As described above, the regularization of EIP coefficient derivation can increase the robustness of interpolation filter in the interpolation filter coefficient solving process by regularization method. For example, the solving process is:

[0509] Adjustment is:

[0510] The regularization parameter λ can be a constant value related to the current number of samples (or the current block size, the size of the reconstruction area for training, etc.). Under the multi-filter interpolation filter prediction method, the derivation of the number of samples of a certain filter is more uncertain than the single filter case. Therefore, an improved method for EIP regularization is to set another regularization parameter λ when deriving any filter coefficient of the multi-filter interpolation filter prediction (or the coefficient of the partial filter of the multi-filter interpolation filter prediction). That is, the value of λ is also related to the number of filters involved in EIP prediction (whether it is a multi-filter, the number of multi-filters, etc.). For example:

[0511] When deriving the filter coefficient of the single-filter interpolation filter prediction, if the number of samples is less than 2048, λ = 192x15; otherwise, λ = 128x15. When deriving the filter coefficient of the multi-filter interpolation filter prediction, the regularization parameter λ is:

[0512] Here, sampleNumber is the number of samples when deriving the interpolation filter coefficient.

[0513] On the basis of the background technical solution, the multi-filter interpolation filter prediction mode is added. In the current block is not the merge interpolation filter prediction mode, the coding whether is the multi-filter mark bit.

[0514] The syntax elements are shown in Table 6 as follows:

[0515] Table 6

[0516] For the above Table 6, wherein, cu_eip_flag identifies the enabling identification of the coding unit level interpolation filter technology, 1 represents using the interpolation filter technology for the current luminance block, 0 does not use, if the syntax element does not exist in the code stream, it is defaulted to 0.

[0517] eip_merge_flag identifies the enabling identification of the coding unit level merge interpolation filter technology, 1 represents using the merge interpolation filter technology for the current luminance block, 0 does not use, if the syntax element does not exist in the code stream, it is defaulted to 0.

[0518] eip_merge_idx identifies the index of the merge interpolation filter list when using the merge interpolation filter technology, which is used to obtain the selected interpolation filter model from the list, if the syntax element does not exist in the code stream, it is defaulted to 0.

[0519] mm_eip_flag is a flag indicating the enabling of the multi-filter based interpolation filter prediction technique at the coding unit level, and is equal to 1 if the multi-filter based interpolation filter prediction technique is used for the current luma block, and is equal to 0 otherwise, and is not present in the bitstream by default.

[0520] eip_mode_idx is an index of the selected combination, and is not present in the bitstream by default if there is only one combination available for the current block.

[0521] Based on the multi-filter based EIP mode, the decoding process can include the following steps:

[0522] In S2001, cu_eip_flag of the current block is decoded. If cu_eip_flag is true, it is further determined whether it is the merge-based interpolation filter mode. If eip_merge_flag is true, it indicates that the current block is in the merge-based interpolation filter mode, and eip_merge_idx is further decoded to indicate the index of the EIP model of the current block in the merge candidate list. If eip_merge_flag is false, it indicates that the current block is in the reconstruction region-based interpolation filter mode, and mm_eip_flag and eip_mode_idx are further decoded. If mm_eip_flag is true, it indicates that the current block uses the multi-filter based interpolation filter prediction, and the EIP model of the multi-filter is derived under the selected EIP combination. If mm_eip_flag is false, it indicates that the current block uses the single-filter based interpolation filter prediction, and the EIP model of the single-filter is derived under the selected EIP combination. eip_mode_idx is used to indicate the selected EIP combination of the current block, which includes the reconstruction region used for deriving the filter coefficients and the shape of the filter. The available EIP combinations corresponding to different block sizes are the same as those in the above-mentioned EIP related technology.

[0523] In S2002, if eip_merge_flag is false and mm_eip_flag is false, the EIP model derivation process of the current block is the same as that in the EIP related technology.

[0524] In S2003, if eip_merge_flag is false and mm_eip_flag is true, the reconstruction region used for deriving the filter coefficients and the shape of the filter of the current block are determined according to eip_mode_idx.

[0525] S2004, derive the multi-filter EIP model of the current block. First, traverse the L-shaped template region of the current block to calculate the mean value of all pixels in the region as the threshold threshold; according to the selected reconstruction region used by the filter coefficient derivation filter, slide the selected shape filter on the reconstruction region, and at each possible sliding position, a training sample can be obtained, which contains N (N is 14) input pixels and 1 output pixel. Calculate the reference value ref of the sample:

[0526] ref = (t(x-1, y) + t(x, y-1) + 1) » 1

[0527] Divide the sample into M groups (M is 2), if refthreshold, the current sample belongs to the first group, otherwise, the current sample belongs to the second group. Another implementation of ref calculation in sample grouping: ref calculation is independent of filterShape.

[0528] Solve the two sample sets respectively to obtain two corresponding filters filter1 and filter2. Determine the EIP model information of the current block as {c1[0, N-1], c2[0, N-1], filterShape, threshold, bMmEip = true}. Based on the EIP model, complete the prediction of the current block, and the in-block prediction value pred(x, y) is:

[0529] S2005, if eip_merge_flag is true, build a merge candidate list. The construction process of the multi-filter EIP merge mode involves the contents of the list, which can contain a multi-filter EIP model or a single-filter EIP model. The candidate list can be reordered according to the template error. According to eip_merge_idx, determine the selected EIP model of the current block {c1[0, N-1], c2[0, N-1], filterShape, threshold', bMmEip'}, here threshold' and bMmEip' represent the corresponding values obtained by inheritance. Based on the EIP model, complete the prediction of the current block, and the in-block prediction value pred(x, y) is:

[0530] ref = (t(x-1, y) + t(x, y-1) + 1) » 1

[0531] S2006, according to the above steps, complete the prediction of the current block, and then use the same way as the existing EIP technology to complete the inverse quantization and inverse transform of the coefficient block to obtain the residual block of the current block, and combine the prediction block to complete the reconstruction of the current block. Save and update the EIP model information used by the current block to the history cache model list of EIP.

[0532] Based on the above multi-filter based EIP mode, the encoding process can include the following steps:

[0533] S2007, encode the current block, determine that the current block is encoded using the interpolation filter prediction mode;

[0534] S2008, derive the EIP model under all available EIP combinations of the current block, including the multi-filter based EIP model and the single-filter based EIP model, the derivation process is consistent with S2003 and S2004; build a candidate list under the EIP merge mode and complete reordering, the process is consistent with S2005;

[0535] S2009, set eip_merge_flag to false and mm_eip_flag to false, traverse all possible EIP combinations, encode the corresponding eip_mode_idx, complete the prediction of the current block according to the corresponding EIP model, the prediction process is consistent with S2003. The SATD cost or RDO cost of the current encoding mode can be calculated according to the encoding and prediction results. If the RDO cost is calculated, the residual block is obtained according to the prediction block of the current block and the original block of the current block, and is converted into a coefficient block through the steps of transformation, quantization, etc. and is encoded. The inverse quantization and inverse transformation obtain the reconstructed block of the current block. The RDO cost is calculated according to all encoding information and the distortion of the reconstructed block. The transformation and inverse transformation processes are the same as those of the existing EIP technology.

[0536] S2010, set eip_merge_flag to false and mm_eip_flag to true, traverse all possible EIP combinations, encode the corresponding eip_mode_idx, complete the prediction of the current block according to the corresponding EIP model, the prediction process is consistent with S2003. The SATD cost of the current encoding mode can be calculated according to the encoding and prediction results, or the RDO cost is calculated as in S2009;

[0537] S2011, set eip_merge_flag to true, traverse all the merge list candidates, encode the corresponding eip_merge_idx, complete the prediction of the current block according to the corresponding EIP model, the prediction process is consistent with step 3. The SATD cost of the current encoding mode can be calculated according to the encoding and prediction results, or the RDO cost is calculated as in S2009;

[0538] S2012, compare the SATD cost or RDO cost of the above interpolation filter encoding modes, and the SATD cost or RDO cost of other available intra prediction methods, select the best intra prediction method, and complete the encoding of the current block.

[0539] The present example proposes a method of using multiple filters under the interpolation filter prediction technology, including the acquisition and application of multiple filters. The coding efficiency of interpolation filter prediction is improved. The test results of the present scheme on the ECM-13.0 test software are shown in Table 7 as follows:

[0540] Table 7

[0541] For the above coding process, the following alternative scheme 1 can be used:

[0542] The syntax element mm_eip_flag can be controlled by sequence level, frame level, CTU level syntax elements. For example, the sequence level sps_mm_eip_enable_flag flag indicates whether to decode mm_eip_flag. Whether to code mm_eip_flag can be related to the size, width, height, and position of the current block. It can be related to the flag bits (such as cu_eip_flag, eip_merge_flag, mm_eip_flag) of the coded blocks. For example, mm_eip_flag is decoded only when there is at least one coded block adjacent to the current block. If not decoded, mm_eip_flag is set to 0 by default. For example, the syntax elements are shown in Table 8 as follows:

[0543] Table 8

[0544] The following alternative scheme 2 can also be used:

[0545] The reconstruction region size of the interpolation filter prediction of the multiple filters used to derive the filter coefficients can be different from that of the single filter (i.e., the syntax element mm_eip_flag simultaneously indicates whether it is a multiple filter and the size of the reconstruction region). For example, based on Table 6 above, the EIP combination is determined according to eip_mode_idx to determine the type of the reconstruction region EIP_AL_A_L, EIP_AL_A, or EIP_AL_L:

[0546] In addition, FIG. 20A is a schematic diagram of an optional reconstruction region size, FIG. 20B is a schematic diagram of an optional reconstruction region size, and FIG. 20C is a schematic diagram of an optional reconstruction region size, as shown in FIGS. 20A-20C, when mm_eip_flag is false, Tw=Th=min(blockWidth, blockHeight). When mm_eip_flag is true, Tw=Th=min(blockWidth, blockHeight)*2.

[0547] The following alternative scheme 3 can also be used:

[0548] The value range of eip_mode_idx is different (the possible EIP combinations are different) for MM and NOT_MM (for some sizes of current block, the interpolation filter prediction using multiple filters and the interpolation filter prediction using single filter are possible).

[0549] Table 9

[0550] That is, the value range of syntax element mm_eip_mode_idx and eip_mode_idx can be different.

[0551] The following alternative 4 can also be adopted:

[0552] The shape of EIP filter, the reconstruction area to get the coefficients, whether it is multiple filters, and other information are combined as possible EIP combination candidates, and the EIP combination selected by the current block is determined according to the syntax element eip_mode_idx, so as to determine the interpolation filter shape of the current block, the reconstruction area to get the coefficients, and whether it is multiple filters.

[0553] For example, the interpolation filter prediction using multiple filters is denoted as MM_FILTER, and the interpolation filter prediction using single filter is denoted as NOT_MM_FILTER. The filter shape can be denoted as EIP_FILTER_S, EIP_FILTER_H, and EIP_FILTER_V, and the reconstruction area to get the coefficients can be denoted as EIP_AL_A_L, EIP_AL_L, and EIP_AL_A. There can be 2x3x3=18 kinds of EIP combinations in total. For 4x16, 16x4, 4x32, and 32x4 blocks, 4 kinds of EIP combinations are allowed, as shown in the following table 10:

[0554] Table 10

[0555] For other 4xN, Nx4, and 8x32, 32x8 blocks, 6 kinds of EIP combinations are allowed, as shown in the following table 11:

[0556] Table 11

[0557] For 8xN and Nx8 blocks, 10 kinds of EIP combinations are allowed, as shown in the following table 12:

[0558] Table 12

[0559] For other shape blocks, 18 kinds of EIP combinations are allowed, as shown in the following table 13:

[0560] Table 13

[0561] The selected EIP combination is determined based on eip_mode_idx, thus determining whether the current block uses multi-filtered interpolation filter prediction. There is no need to pass mm_eip_flag. The selected EIP combination is shown in Table 14 as follows:

[0562] Table 14

[0563] An alternative solution 5 can be employed:

[0564] The EIP combination is extended to (interpolation filter shape, reconstruction region shape used for derivation, whether multi-filtered), and different EIP combination lists can be selected according to SPS flag. The difference between different EIP combination lists is whether multi-filtered EIP combination candidates are included. For example, a sequence level syntax element sps_mm_eip_enable_flag is coded. When the current block size is 4x16, if sps_mm_eip_enable_flag is false, the EIP combinations allowed to be used by the current block are shown in Table 15 as follows:

[0565] Table 15

[0566] If sps_mm_eip_enable_flag is true, the EIP combinations allowed to be used by the current block are shown in Table 16 as follows:

[0567] Table 16

[0568] In the embodiments of the present application, an interpolation filter prediction based on multiple filters is proposed, a grouping method of multiple filters is given, and multiple filters can be derived by grouping samples in a reconstructed area; the current block template and the prediction in the current block can be completed based on the multiple filters; a reference value can be obtained from the input value of the filter; a threshold value can be obtained from the pixel value of the reconstructed area, and an implementation scheme of the multiple filter method on the existing interpolation filter prediction scheme is given. When the first intra prediction mode is used for the current block, and the type of the EIP model used by the current block is determined to be the first type, at least two groups of filter parameters can be determined according to the EIP model of the first type, that is, the EIP model belonging to the first type can determine at least two groups of filter parameters, and then the at least two groups of filter parameters are used to perform intra prediction on the current block. Compared with using one group of filter parameters to perform intra prediction on the current block, using at least two groups of filter parameters can more accurately represent the relationship between the reconstructed area and the adjacent reconstructed area, so that the prediction value obtained by using at least two groups of filter parameters to perform intra prediction on the current block is more accurate, and the coding performance is improved.

[0569] In still another embodiment of the present application, based on the same inventive concept as the foregoing embodiments, FIG. 21 is a schematic diagram of the composition structure of an encoder provided in the embodiments of the present application. As shown in FIG. 21, the encoder 210 includes a first determination unit 2101, a second determination unit 2102, a prediction unit 2103, and an encoding unit 2104, wherein:

[0570] The first determination unit 2101 is configured to determine the value of the first syntax element when it is determined that the current block uses the EIP mode.

[0571] The second determination unit 2102 is configured to determine the EIP model used by the current block; wherein the EIP model includes at least two groups of filter parameters.

[0572] The prediction unit 2103 is configured to perform intra prediction on the current block according to the at least two groups of filter parameters to obtain the prediction value of the current block.

[0573] The encoding unit 2104 is configured to encode the current block according to the prediction value of the current block and the value of the first syntax element.

[0574] It can be understood that in the embodiments of the present application, the "unit" can be a part of circuit, a part of processor, a part of program or software, etc., and of course can also be a module, and can also be non-modular. Moreover, the constituent parts in the embodiments can be integrated in one processing unit, or each unit can exist physically independently, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function module.

[0575] In still another embodiment of the present application, Fig. 22 is a schematic diagram of a hardware structure of an encoder provided by an embodiment of the present application. As shown in Fig. 22, the encoder 220 can include a first communication interface 2201, a first memory 2202 and a first processor 2203; each component is coupled together through a first bus system 2204. It can be understood that the first bus system 2204 is used to realize the connection communication between the components. The first bus system 2204 includes not only a data bus, but also a power supply bus, a control bus and a status signal bus. However, in order to clearly illustrate, all kinds of buses are marked as the first bus system 2204 in Fig. 22. Wherein:

[0576] The first communication interface 2201 is configured to receive and send signals in the process of transceiving information with other external network elements;

[0577] The first memory 2202 is configured to store a computer program capable of running on the first processor 2203;

[0578] The first processor 2203 is configured to execute the following when running the computer program:

[0579] In a case where it is determined that the current block uses the EIP mode, determining a value of a first syntax element, determining an EIP model used by the current block; wherein the EIP model includes at least two sets of filter parameters, performing intra prediction on the current block according to the at least two sets of filter parameters to obtain a prediction value of the current block, and encoding the current block according to the prediction value of the current block and the value of the first syntax element.

[0580] It is to be appreciated that the first memory 2202 in the embodiments of the application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Where the nonvolatile memory is a Read-Only Memory (ROM), Programmable ROM (PROM), Erasable PROM (EPROM), Electrically EPROM (EEPROM), or flash memory. The volatile memory can be a Random Access Memory (RAM), which is used as an external cache. By way of example, and not limitation, many forms of RAM are available, for example, Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The first memory 1402 of the system and method described herein are intended to include, without being limited to, these and any other suitable types of memory.

[0581] The first processor 2203 can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of hardware or the instruction in the form of software in the first processor 2203. The first processor 2203 described above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the first memory 2202, and the first processor 2203 reads the information in the first memory 2202, and combines the hardware to complete the steps of the above method.

[0582] It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be realized in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for executing functions described in the present application or a combination thereof. For software implementation, the technology described in the present application can be realized by modules (such as processes, functions, etc.) for executing functions described in the present application. The software code can be stored in the memory and executed by the processor. The memory can be implemented in the processor or outside the processor.

[0583] Optionally, as another embodiment, the first processor 2203 is further configured to execute the method according to any one of the preceding embodiments when the computer program is run.

[0584] The embodiment provides an encoder, wherein when it is determined that the current block uses the EIP mode, the value of the first syntax element is determined, the EIP model used by the current block is determined; wherein the EIP model comprises at least two groups of filter parameters, the current block is intra-predicted according to the at least two groups of filter parameters to obtain a prediction value of the current block, and the current block is encoded according to the prediction value of the current block and the value of the first syntax element. In this way, when the current block uses the EIP mode, the EIP model comprising the at least two groups of filter parameters is derived, and the at least two groups of filter parameters are used to intra-predict the current block. Compared with using one group of filter parameters to intra-predict the current block, using the at least two groups of filter parameters can more accurately represent the relationship between the reconstructed region and the adjacent reconstructed region, so that the prediction value obtained by using the at least two groups of filter parameters to intra-predict the current block is more accurate, and thus the coding and decoding performance is improved.

[0585] In still another embodiment of the present application, based on the same inventive concept as the preceding embodiments, Fig. 23 is a schematic diagram of the composition structure of a decoder provided by the embodiment of the present application. As shown in Fig. 23, the decoder 2301 comprises an analysis unit 2301, a derivation unit 2301 and a prediction unit 2302, wherein;

[0586] The analysis unit 2301 is configured to analyze the first syntax element.

[0587] The derivation unit 2302 is configured to derive the EIP model of the current block when the first syntax element indicates that the current block uses the EIP mode; wherein the EIP model comprises at least two groups of filter parameters.

[0588] The prediction unit 2303 is configured to intra-predict the current block according to the at least two groups of filter parameters to determine a prediction value of the current block.

[0589] It can be understood that in the embodiment, the "unit" can be a part of circuit, a part of processor, a part of program or software, etc., and of course can be a module, and can also be non-modular. Moreover, the components in the embodiment can be integrated in one processing unit, or can be physically present as individual units, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function module.

[0590] In still another embodiment of the present application, Fig. 24 is a schematic diagram of a hardware structure of a decoder provided by the embodiment of the present application. As shown in Fig. 24, the decoder 240 can include a second communication interface 2401, a second memory 2402 and a second processor 2403; each component is coupled together through a second bus system 2404. It can be understood that the second bus system 2404 is used to realize the connection communication between the components. The second bus system 2404 includes not only a data bus, but also a power bus, a control bus and a status signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the second bus system 2404 in Fig. 24. Among them:

[0591] The second communication interface 2401 is configured to receive and send signals in the process of transceiving information with other external network elements;

[0592] The second memory 2402 is configured to store a computer program capable of running on the second processor 2403;

[0593] The second processor 2403 is configured to execute the following when running the computer program:

[0594] parsing a first syntax element, and in a case where the first syntax element indicates that the current block uses an EIP mode, deriving an EIP model of the current block; wherein the EIP model includes at least two sets of filter parameters, and the current block is intra-predicted according to the at least two sets of filter parameters to determine a prediction value of the current block.

[0595] It can be understood that the hardware function of the second memory 2402 is similar to that of the first memory 2202, and the hardware function of the second processor 2403 is similar to that of the first processor 2203; here is not described in detail.

[0596] The embodiment provides a decoder, which parses a first syntax element, and in a case where the first syntax element indicates that the current block uses an EIP mode, derives an EIP model of the current block; wherein the EIP model includes at least two sets of filter parameters, and the current block is intra-predicted according to the at least two sets of filter parameters to determine a prediction value of the current block. In this way, when the current block uses the EIP mode, the EIP model including at least two sets of filter parameters is derived, and the current block is intra-predicted by using the at least two sets of filter parameters. Compared with intra-predicting the current block by using one set of filter parameters, using the at least two sets of filter parameters can more accurately represent the relationship between the reconstructed region and the adjacent reconstructed region, so that the prediction value obtained by intra-predicting the current block by using the at least two sets of filter parameters is more accurate, and the coding and decoding performance is improved.

[0597] In still another embodiment of the present application, FIG. 25 is a schematic diagram of a composition structure of a coding system provided by an embodiment of the present application. As shown in FIG. 25, the coding system 250 can include an encoder 2501 and a decoder 2502.

[0598] In an embodiment of the present application, the encoder 2501 can be the encoder described in any of the foregoing embodiments, and the decoder 2502 can be the decoder described in any of the foregoing embodiments.

[0599] In some embodiments, an embodiment of the present application further provides a computer readable storage medium, having stored thereon a computer program. The computer program is executed by a processor (for example, the first processor or the second processor) to implement the method described in any of the foregoing embodiments.

[0600] In some embodiments, an embodiment of the present application further provides a computer program product, including a computer program or instructions. The computer program or instructions are executed by a processor (for example, the first processor or the second processor) to implement the method described in any of the foregoing embodiments.

[0601] In some embodiments, an embodiment of the present application further provides a computer program, which is executed by a processor (for example, the first processor or the second processor) to implement the method described in any of the foregoing embodiments.

[0602] Those of ordinary skill in the art can be aware that units and algorithm steps of each example described in combination with embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0603] Those of ordinary skill in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the foregoing method embodiments, which will not be described here in detail.

[0604] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.

[0605] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place or can be distributed to a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0606] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.

[0607] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of software products. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0608] It should be noted that in the present application, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the processes, methods, articles or apparatuses including a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or apparatuses. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or apparatus including the element.

[0609] The above-mentioned sequence numbers of the embodiments of the present application are only for description, and do not represent advantages or disadvantages of the embodiments.

[0610] The methods disclosed in the several method embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments.

[0611] The features disclosed in the several product embodiments provided by the present application can be combined arbitrarily without conflict to obtain new product embodiments.

[0612] The features disclosed in the several method or device embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments or device embodiments.

[0613] The above merely describes the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims. Industrial applicability

[0614] In the embodiments of the present application, in the case of determining that the current block uses the EIP mode, the value of the first syntax element is determined, and the EIP model used by the current block is determined; wherein the EIP model includes at least two sets of filter parameters, the current block is intra-predicted according to the at least two sets of filter parameters to obtain the prediction value of the current block, and the current block is encoded according to the prediction value of the current block and the value of the first syntax element. At the decoding end, the first syntax element is parsed, and in the case of the first syntax element indicating that the current block uses the EIP mode, the EIP model of the current block is derived; wherein the EIP model includes at least two sets of filter parameters, and the current block is intra-predicted according to the at least two sets of filter parameters to obtain the prediction value of the current block. In this way, when the current block uses the EIP mode, the EIP model including at least two sets of filter parameters is derived, and the at least two sets of filter parameters are used to intra-predict the current block. Compared with using one set of filter parameters to intra-predict the current block, using at least two sets of filter parameters can more accurately represent the relationship between the reconstructed region and the adjacent reconstructed region, so that the prediction value obtained by using at least two sets of filter parameters to intra-predict the current block is more accurate, and thus the coding and decoding performance is improved.

Claims

1. A decoding method applied to a decoder, the method comprising: parsing a first syntax element; deriving an EIP model of a current block in a case that the first syntax element indicates that the current block uses an EIP mode; wherein the EIP model comprises at least two sets of filter parameters; and performing intra prediction on the current block according to the at least two sets of filter parameters to obtain a prediction value of the current block. The deriving the EIP model of the current block in the case that the first syntax element indicates that the current block uses the EIP mode comprises: parsing a second syntax element in the case that the first syntax element indicates that the current block uses the EIP mode; and deriving the EIP model of the current block in a case that the second syntax element indicates that the current block does not use a merge mode of the EIP mode. The deriving the EIP model of the current block in the case that the second syntax element indicates that the current block does not use the merge mode of the EIP mode comprises: parsing a third syntax element in the case that the second syntax element indicates that the current block does not use the merge mode of the EIP mode; wherein the third syntax element is used to indicate whether the current block uses a first type of EIP model. The deriving the EIP model of the current block in the case that the second syntax element indicates that the current block does not use the merge mode of the EIP mode further comprises: parsing a fourth syntax element to obtain a first index of the first type of EIP model; determining the at least two sets of filter parameters based on the first index; or determining the at least two sets of filter parameters based on a preset shape of a reconstructed region adjacent to the current block and a preset shape of an EIP filter.

2. The method of claim 1, wherein, The deriving the EIP model of the current block in the case that the second syntax element indicates that the current block does not use the merge mode of the EIP mode comprises: parsing a fourth syntax element to obtain a first index of an EIP model used by the current block based on the second syntax element indicating that the current block does not use the merge mode of the EIP mode; determining that the EIP model used by the current block is the first type of EIP model based on the first index of the EIP model used by the current block, and determining the at least two sets of filter parameters based on the first index. The determining the at least two sets of filter parameters based on the first index comprises: determining a shape of a reconstructed region adjacent to the current block and / or a shape of an EIP filter of the current block based on the first index; and determining the at least two sets of filter parameters based on the shape of the reconstructed region adjacent to the current block and / or the shape of the EIP filter of the current block. The determining the at least two sets of filter parameters based on the shape of the reconstructed region adjacent to the current block and the shape of the EIP filter of the current block comprises: determining a training sample of the EIP filter of the current block according to the shape of the reconstructed region adjacent to the current block and the shape of the EIP filter of the current block; and determining the at least two sets of filter parameters based on the training sample of the EIP filter of the current block.

3. The method of claim 2, wherein, ​ ​ 4. The method of claim 3, wherein, ​ ​ ​ ​ 5. The method of claim 2, wherein, ​ ​ ​ 6. The method of claim 4 or 5, wherein, ​ ​ ​ 7. The method of claim 6, wherein, ​ ​ The EIP filter training samples of the current block are divided into at least two groups of training samples, and filter parameters corresponding to the at least two groups of training samples are determined, to obtain the at least two groups of filter parameters.

8. The method of claim 6, wherein, The at least two groups of filter parameters correspond to the same shape of the EIP filter.

9. The method of claim 7 or 8, wherein, The at least two groups of training samples include a first group of training samples and a second group of training samples. The training samples of the current block are divided into at least two groups of training samples, including: A threshold value of the filter of the current block is determined according to sample values of a neighboring reconstructed region of the current block or a preset neighboring reconstructed region of the current block. A reference value of the corresponding training sample is determined according to a sample value at an input position of the training sample. The training samples with the reference value greater than the threshold value of the filter of the current block are divided into a group to obtain the first group of training samples. The training samples with the reference value less than or equal to the threshold value of the filter of the current block are divided into a group to obtain the second group of training samples.

10. The method of claim 9, wherein, The preset neighboring reconstructed region of the current block is a L-shaped neighboring reconstructed region, an upper neighboring reconstructed region or a left neighboring reconstructed region of the current block.

11. The method of claim 9, wherein, The reference value of the corresponding training sample is determined according to a sample value at an input position used to calculate the reference value, including: The sample value at the input position used to calculate the reference value is determined. The reference value of the corresponding training sample is determined according to the sample value at the input position used to calculate the reference value.

12. The method of claim 11, wherein, The sample value at the input position used to calculate the reference value is determined according to the shape of the EIP filter of the current block. The filter parameters corresponding to the at least two groups of training samples are determined to obtain the at least two groups of filter parameters, including:

13. The method of claim 9, wherein, A first group of filter coefficients is determined based on the first group of training samples. A second group of filter coefficients is determined based on the second group of training samples. The at least two groups of filter parameters include the first group of filter coefficients, the second group of filter coefficients, the shape of the EIP filter of the current block, the threshold value of the EIP filter of the current block and an identifier of the EIP filter of the current block. The at least two groups of filter parameters include the first group of filter coefficients, the second group of filter coefficients, the shape of the EIP filter of the current block, the threshold value of the EIP filter of the current block and an identifier of the EIP filter of the current block.

14. The method of claim 13, wherein, The at least two groups of filter parameters include the first group of filter coefficients, the second group of filter coefficients, the shape of the EIP filter of the current block, the threshold value of the EIP filter of the current block and an identifier of the EIP filter of the current block. The at least two groups of filter parameters include the first group of filter coefficients, the second group of filter coefficients, the shape of the EIP filter of the current block, the threshold value of the EIP filter of the current block and an identifier of the EIP filter of the current block. The at least two groups of filter parameters include the first group of filter coefficients, the second group of filter coefficients, the shape of the EIP filter of the current block, the threshold value of the EIP filter of the current block and an identifier of the EIP filter of the current block. ​ ​ In a case where a reference value of an input sample of the EIP filter of the current block is less than or equal to a threshold value of the EIP filter of the current block, the value of the to-be-predicted sample of the current block is intra-predicted according to the second set of filter coefficients to obtain a prediction value of the to-be-predicted sample of the current block.

15. The method of claim 1, wherein, The method further comprises: In a case where the first syntax element indicates that the current block uses the EIP mode, a second syntax element is parsed; In a case where the second syntax element indicates that the current block uses the merge mode of the EIP mode, an EIP model of the current block is determined.

16. The method of claim 15, wherein, The EIP model of the current block is determined in the case where the second syntax element indicates that the current block uses the merge mode of the EIP mode, comprising: In the case where the second syntax element indicates that the current block uses the merge mode of the EIP mode, a first candidate list of the current block is determined; A fifth syntax element is parsed; Based on the fifth syntax element, a second index of the current block using a first type of EIP model is determined from the first candidate list; Based on the second index, the EIP model of the current block is determined.

17. The method of claim 15, wherein, The at least two sets of filter parameters comprise: at least two sets of filter coefficients, a threshold value of an EIP filter, a shape of an EIP filter, and an identifier of an EIP filter.

18. The method of claim 17, wherein, The first candidate list of the current block is determined, comprising: Model information of a candidate model is obtained; the model information comprises one or more of: at least two sets of filter coefficients, a threshold value of an EIP filter, a shape of an EIP filter, a number of EIP filters, and an identifier of an EIP filter; Based on the model information of the candidate model, a second candidate list is constructed; The models in the second candidate list are reordered to obtain the first candidate list.

19. The method of claim 18, wherein, The second candidate list is constructed based on the model information of the candidate model, comprising: Candidate models whose model information satisfies a first condition are selected from the candidate models and added to the second candidate list; wherein the first condition comprises one or more of: The identifier of the EIP filter is different from the identifier of the EIP filter of the current model in the second candidate list; The threshold value of the EIP filter is different from any threshold value of the EIP filter of the current model in the second candidate list; Any filter coefficient of the EIP filter is different from any filter coefficient of the EIP filter of the current model in the second candidate list.

20. The method of claim 18, wherein, The models in the second candidate list are reordered to obtain the first candidate list, comprising: In a case where the type of the model in the second candidate list is the first type, a template region is intra-predicted based on at least two sets of filter parameters of the model in the second candidate list using a template matching technology to obtain a prediction value of the template region under the model in the second candidate list; Based on the prediction value of the template region under the model in the second candidate list and the sample value of the template region, a cost of each model in the second candidate list is determined; reorder the models in the second candidate list according to the cost of each model, to obtain the first candidate list.

21. The method of claim 17, wherein, The method further comprises: According to the position of the input sample of the EIP filter of the current block, determining the sample value of the EIP filter of the current block. According to the sample value of the EIP filter of the current block, determining the reference value of the input sample of the EIP filter of the current block. In a case where the reference value of the input sample of the EIP filter of the current block is greater than the threshold value of the EIP filter of the current block, performing intra prediction on the value of the to-be-predicted sample of the current block according to the first group of filter coefficients in the at least two groups of filter coefficients to obtain the prediction value of the to-be-predicted sample of the current block. In a case where the reference value of the input sample of the EIP filter of the current block is less than or equal to the threshold value of the filter of the current block, performing intra prediction on the value of the to-be-predicted sample of the current block according to the second group of filter coefficients in the at least two groups of filter coefficients to obtain the prediction value of the to-be-predicted sample of the current block. The method further comprises:

22. The method of any one of claims 3 to 5, wherein, The regularization parameter determined by the first type of EIP model used by the current block is different from the regularization parameter determined by the second type of EIP model used by the current block. The second type of EIP model comprises a group of filter parameters. The method further comprises:

23. The method of claim 22, wherein, According to the number of the at least two groups of filter parameters, determining a regularization parameter. The method further comprises:

24. The method of claim 22, wherein, According to the number of the training samples of the current block obtained, determining a regularization parameter. The method further comprises:

25. The method of claim 3, wherein, parsing a sixth syntax element; wherein the sixth syntax element is used to indicate whether the third syntax element is decoded. The method further comprises:

26. The method of claim 3, wherein, According to the relationship between the size parameter of the current block and the preset size, determining whether the third syntax element is decoded. The method further comprises:

27. The method of claim 3, wherein, Based on the type identifier of the EIP model used by the decoded neighboring block of the current block, determining whether the third syntax element is decoded.

28. The method of claim 3, wherein, The size of the reconstruction region determined by the first type of EIP model is different from the size of the reconstruction region of the current block determined by the second type of EIP model; The second type of EIP model comprises a group of filter parameters. The method further comprises:

29. The method of any one of claims 3 to 5, wherein, In a case where the third syntax element or the fourth syntax element indicates that the current block uses the second type of EIP model, parsing a seventh syntax element; wherein the seventh syntax element is used to indicate the index of the EIP model used by the current block; the second type of EIP model comprises a group of filter parameters; ​ The search range of the index value of the EIP model in the fourth syntax element is different from the search range of the index value of the EIP model in the seventh syntax element.

30. The method of claim 4, wherein, The determining the at least two sets of filter parameters based on the first index comprises: parsing a sixth syntax element, wherein the sixth syntax element is used to indicate whether an available EIP combination contains a combination corresponding to the EIP model of the first type; determining the at least two sets of filter parameters based on the sixth syntax element and the first index.

31. An encoding method applied to an encoder, the method comprising: in a case where it is determined that the current block uses the EIP mode, determining a value of a first syntax element; determining an EIP model used by the current block, wherein the EIP model comprises at least two sets of filter parameters; performing intra prediction on the current block according to the at least two sets of filter parameters to obtain a prediction value of the current block; encoding the current block according to the prediction value of the current block and the value of the first syntax element.

32. The method of claim 31, wherein, The method further comprises: in a case where the current block uses the EIP mode and a case where it is determined that the current block does not use a merge mode of the EIP mode, determining a value of a second syntax element.

33. The method of claim 32, wherein, The method further comprises: determining an EIP model of a first type used by the current block; based on the determination that the EIP model of the first type is used by the current block, determining a value of a third syntax element; determining a first index of the EIP model of the first type used by the current block; based on the first index, determining a value of a fourth syntax element.

34. The method of claim 32, wherein, The method comprises: determining an EIP model of a first type used by the current block and a first index of the EIP model of the first type used by the current block; based on the EIP model of the first type used by the current block and the first index, determining a value of a fourth syntax element.

35. The method of claim 33 or 34, wherein, The determining the EIP model used by the current block comprises: determining a first index of the EIP model used by the current block; based on the first index, determining a shape of a reconstructed region adjacent to the current block and a shape of an EIP filter of the current block; based on the shape of the reconstructed region adjacent to the current block and the shape of the EIP filter of the current block, deriving the EIP model used by the current block.

36. The method of claim 35, wherein, The deriving the EIP model used by the current block based on the shape of the reconstructed region adjacent to the current block and the shape of the EIP filter of the current block comprises: determining training samples for deriving the EIP filter of the current block according to the shape of the reconstructed region adjacent to the current block and the shape of the EIP filter of the current block; dividing the training samples into at least two groups of training samples; deriving the EIP model used by the current block according to the at least two groups of training samples.

37. The method of claim 36, wherein, The at least two groups of training samples comprise a first group of training samples and a second group of training samples. The dividing the training samples into at least two groups of training samples comprises: determining a threshold value of the EIP filter of the current block according to sample values of the reconstructed region adjacent to the current block or a preset reconstructed region adjacent to the current block; determining reference values of the training samples according to sample values of input positions of the training samples; grouping the training samples whose reference values are greater than the threshold of the EIP filter of the current block into a first group to obtain the first group of training samples; grouping the training samples whose reference values are less than or equal to the threshold of the EIP filter of the current block into a second group to obtain the second group of training samples.

38. The method of claim 37, wherein, The preset reconstruction region adjacent to the current block is an L-shaped reconstruction region, an upper reconstruction region or a left reconstruction region adjacent to the current block.

39. The method of claim 37, wherein, The method further comprises: determining a value of a second syntax element in a case where the current block uses the EIP mode and in a case where it is determined that the current block uses the merge mode of the EIP mode. The method further comprises: determining a first candidate list of the current block in a case where the current block uses the merge mode of the EIP mode; 40. The method of claim 39, wherein, determining a second index of the EIP mode of the first type used by the current block from the first candidate list; determining a value of a fifth syntax element based on the second index; determining the EIP mode used by the current block based on the second index. The method further comprises: determining the EIP mode used by the current block based on the second index, comprising: obtaining at least two groups of filter parameters of the EIP mode used by the current block from the first candidate list according to the second index obtained from the candidate list. ​ 41. The method of claim 31, wherein, ​ ​ 42. The method of claim 41, wherein, ​ ​ ​ ​ ​ 43. The method of claim 42, wherein, ​ ​ 44. The method of claim 41, wherein, The at least two sets of filter parameters comprise at least two sets of filter coefficients of the current block, a threshold value of an EIP filter of the current block, a shape of the EIP filter of the current block, and an identifier of the EIP filter of the current block.

45. The method of claim 42, wherein, The determining the first candidate list of the current block comprises: obtaining a candidate model of the current block from coding information of the current block, wherein the candidate model comprises one or more of the following: a neighboring EIP model of the current block, a non-neighboring EIP model of the current block, a historical EIP model of the current block, and a time-domain EIP model of the current block; obtaining model information of the candidate model, wherein the model information comprises one or more of the following: at least two sets of filter parameters, a threshold value of a filter in the candidate model, a shape of an EIP filter, a number of EIP filters, and an identifier of the EIP filter; constructing a second candidate list based on the model information of the candidate model; reordering the models in the second candidate list to obtain the first candidate list.

46. The method of claim 45, wherein, The constructing the second candidate list based on the model information of the candidate model comprises: selecting a candidate model whose model information satisfies a first condition from the candidate model and adding the candidate model to the second candidate list, wherein the first condition comprises one or more of the following: the identifier of the EIP filter is different from an identifier of an EIP filter of a current model in the second candidate list; the threshold value of the EIP filter is different from any threshold value of an EIP filter of the current model in the second candidate list; any filter coefficient of the EIP filter is different from any filter coefficient of the EIP filter of the current model in the second candidate list.

47. The method of claim 45, wherein, The reordering the models in the second candidate list to obtain the first candidate list comprises: in a case where the type of the model in the second candidate list is the first type, performing intra prediction on a template region based on at least two sets of filter parameters of the model in the second candidate list by using a template matching technology to obtain a prediction value of the template region under the model in the second candidate list; determining a cost of each model in the second candidate list according to the prediction value of the template region under the model in the second candidate list and a sample value of the template region; reordering the models in the second candidate list according to the cost of each model to obtain the first candidate list.

48. The method of claim 44, wherein, The performing intra prediction on the current block based on the at least two sets of filter parameters to obtain a prediction value of the current block comprises: determining a position of an input sample of an EIP filter of the current block according to a position of a to-be-predicted sample of the current block and a shape of the EIP filter of the current block; determining a sample value of the EIP filter of the current block according to the position of the input sample of the EIP filter of the current block; determining a reference value of the input sample of the EIP filter of the current block according to the sample value of the EIP filter of the current block; In a case where the reference value of the input sample of the EIP filter of the current block is greater than the threshold value of the EIP filter of the current block, the value of the to-be-predicted sample of the current block is intra-predicted according to a first set of filter coefficients in the at least two sets of filter parameters, to obtain the prediction value of the to-be-predicted sample of the current block. In a case where the reference value of the input sample of the EIP filter of the current block is less than or equal to the threshold value of the filter of the current block, the value of the to-be-predicted sample of the current block is intra-predicted according to a second set of filter coefficients in the at least two sets of filter parameters, to obtain the prediction value of the to-be-predicted sample of the current block.

49. The method of claim 33 or 34, wherein, The method further includes: The regularization parameter determined by the current block using the first type of EIP model is different from the regularization parameter determined by the current block using a second type of EIP model. The second type of EIP model includes a set of filter parameters.

50. The method of claim 49, wherein, The method includes: According to the number of sets of filter parameters, a regularization parameter is determined.

51. The method of claim 49, wherein, The method further includes: According to the number of training samples of the current block obtained, a regularization parameter is determined.

52. The method of claim 33, wherein, The determination of the first type of EIP model used by the current block includes: The determination of the first type of EIP model used by the current block determines the value of the sixth syntax element.

53. The method of claim 33, wherein, The method further includes: According to the relationship between the size parameter of the current block and the preset size, it is determined whether to encode the third syntax element.

54. The method of claim 33, wherein, The method further includes: Based on the type of the EIP model used by the decoded neighboring block of the current block, it is determined whether to encode the third syntax element.

55. The method of claim 33 or 34, wherein, The method further includes: The size of the reconstruction region determined by the first type of EIP model is different from the size of the reconstruction region of the current block determined by a second type of EIP model; The second type of EIP model includes a set of filter parameters.

56. The method of claim 33 or 34, wherein, The method further includes: A third index of the second type of EIP model used by the current block and the second type of EIP model used by the current block is determined; Based on the third index and the second type of EIP model used by the current block, the value of the seventh syntax element is determined; The search range of the index value of the EIP model in the fourth syntax element is different from the search range of the index value of the EIP model in the seventh syntax element; the second type of EIP model includes a set of filter parameters.

57. The method of claim 33, wherein, The method further includes: Based on the first type of EIP model used by the current block, the value of the sixth syntax element is determined.

58. The method of any one of claims 31 to 57, wherein, The encoding of the current block according to the prediction value of the current block and the value of the first syntax element includes: According to the prediction value of the current block, a residual value of the current block is obtained; The value of one or more syntax elements and the residual value of the current block are encoded, and the obtained coded bits are written into a bitstream.

59. A bitstream, wherein, The bitstream is generated by bit encoding according to the encoding method in any one of claims 31 to 58.

60. An encoder comprising a first determining unit, a second determining unit, a predicting unit and an encoding unit, wherein: the first determining unit is configured to determine a value of a first syntax element in a case that a current block uses an EIP mode; the second determining unit is configured to determine an EIP model used by the current block; wherein the EIP model comprises at least two sets of filter parameters; the predicting unit is configured to perform intra prediction on the current block according to the at least two sets of filter parameters to obtain a prediction value of the current block; and the encoding unit is configured to encode the current block according to the prediction value of the current block and the value of the first syntax element.

61. An encoder comprising a first memory and a first processor, wherein: the first memory is configured to store a computer program capable of running on the first processor; and the first processor is configured to perform the steps of the encoding method according to any one of claims 31 to 58 when running the computer program.

62. A decoder comprising a parsing unit, a deriving unit and a predicting unit, wherein: the parsing unit is configured to parse a first syntax element; the deriving unit is configured to derive an EIP model of a current block in a case that the first syntax element indicates that the current block uses an EIP mode; wherein the EIP model comprises at least two sets of filter parameters; and the predicting unit is configured to perform intra prediction on the current block according to the at least two sets of filter parameters to determine a prediction value of the current block.

63. A decoder comprising a second memory and a second processor, wherein: the second memory is configured to store a computer program capable of running on the second processor; and the second processor is configured to perform the steps of the decoding method according to any one of claims 1 to 30 when running the computer program. The computer program is executed by the processor to implement the steps of the decoding method according to any one of claims 1 to 30, or to implement the steps of the encoding method according to any one of claims 31 to 58. ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ 64. A computer readable storage medium having stored thereon a computer program, wherein, ​

Citation Information

Patent Citations

  • Method and apparatus for encoding / decoding video and method for transmitting bitstream

    CN113632468A

  • Image encoding / decoding method, image data transmission method, and storage medium

    CN116684616A

  • Encoding and decoding method, code stream, encoder, decoder and storage medium

    CN117461315A

  • Image component prediction method, encoder, decoder, and storage medium

    WO2021004152A1