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

By constructing a candidate filter parameter list and determining the values ​​of syntax elements in video encoding, the problem of inaccurate calculation of extrapolation filters in blocks with large texture variations is solved, thereby improving the compression efficiency and performance of video encoding and decoding.

WO2026007086A1PCT 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/103699
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, intra-frame prediction techniques based on extrapolation filters suffer from inaccurate filter calculations when faced with large variations in texture within the current block, leading to a decrease in encoding and decoding performance.

Method used

When using the merging mode of the first intra-frame prediction technique in the current block, at least one vector parameter is determined, candidate filtering parameters are determined based on the vector parameter, a candidate list is constructed, and the values ​​of syntax elements are determined for encoding based on the cost result; when not using the merging mode, another candidate list is constructed, filtering parameters are determined by parsing syntax elements in the bitstream, and the candidate range is expanded to improve the generalization ability of the filtering parameters.

Benefits of technology

It improves the compression efficiency and encoding/decoding performance of video encoding and decoding, and enhances the overall performance of encoding and decoding by predicting samples with more accurate filtering parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024103699_08012026_PF_FP_ABST
    Figure CN2024103699_08012026_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses an encoding method, a decoding method, an encoder, a decoder, and a storage medium. The decoding method comprises: parsing a first syntactic element in a code stream and a mode index of a first intra prediction technique which is used by a current block; when the first syntactic element indicates that the current block has used a merge mode of the first intra prediction technique, determining at least one vector parameter of the current block, and on the basis of the at least one vector parameter, determining at least one group of candidate filtering parameters of the current block; on the basis of the at least one group of candidate filtering parameters, determining a first candidate list of the current block; on the basis of the first candidate list and the mode index, determining a filtering parameter of the current block; and on the basis of the filtering parameter, determining a prediction sample 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, 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, 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 video coding standards, extrapolation filter-based intra prediction (EIP) is a new technology that has just emerged. In the extrapolation filter, when calculating the filter coefficients, the related technology does not take into account comprehensively, for example, always using the neighboring reconstructed samples of the current block for calculation. At this time, if there is a large texture change in the current block, the extrapolation filter trained based on the surrounding reconstructed samples may not be accurate, which reduces the coding performance.

[0004] SUMMARY

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

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

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

[0008] parsing a first syntax element in a bitstream and a mode index of a current block using a first intra prediction technology;

[0009] when the first syntax element indicates that the current block uses a merge mode of the first intra prediction technology, determining at least one vector parameter of the current block, and determining at least one group of candidate filter parameters of the current block according to the at least one vector parameter;

[0010] determining a first candidate list of the current block according to the at least one group of candidate filter parameters;

[0011] determining a filter parameter of the current block according to the first candidate list and the mode index;

[0012] determining a prediction sample of the current block according to the filter parameter.

[0013] In a second aspect, an encoding method is provided. The method is applied to an encoder and includes the following steps.

[0014] When the current block uses the merge mode of the first intra prediction technology, at least one vector parameter of the current block is determined, at least one set of candidate filter parameters of the current block is determined according to the at least one vector parameter, a first candidate list of the current block is determined according to the at least one set of candidate filter parameters, and at least one set of candidate mode information in the first candidate list is determined to correspond to a first cost result respectively.

[0015] When the current block does not use the merge mode of the first intra prediction technology, a third candidate list of the current block is determined, and at least one set of candidate mode information in the third candidate list is determined to correspond to a second cost result respectively.

[0016] According to the first cost result and the second cost result, a value of a first syntax element is determined, where the first syntax element is used to indicate whether the current block uses the merge mode of the first intra prediction technology.

[0017] The value of the first syntax element is encoded, and the obtained encoded bits are written into a bitstream.

[0018] In a third aspect, an encoder is provided. The encoder includes a first determining unit and an encoding unit, where:

[0019] The first determining unit is configured to, when the current block uses the merge mode of the first intra prediction technology, determine at least one vector parameter of the current block, determine at least one set of candidate filter parameters of the current block according to the at least one vector parameter, determine a first candidate list of the current block according to the at least one set of candidate filter parameters, and determine at least one set of candidate mode information in the first candidate list to correspond to a first cost result respectively; when the current block does not use the merge mode of the first intra prediction technology, determine a third candidate list of the current block, and determine at least one set of candidate mode information in the third candidate list to correspond to a second cost result respectively; and according to the first cost result and the second cost result, determine a value of a first syntax element, where the first syntax element is used to indicate whether the current block uses the merge mode of the first intra prediction technology.

[0020] The encoding unit is configured to encode the value of the first syntax element, and write the obtained encoded bits into a bitstream.

[0021] In a fourth aspect, an encoder is provided. The encoder includes a first memory and a first processor, where:

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

[0023] The first processor is configured to execute the method according to the second aspect when running the computer program.

[0024] In a fifth aspect, an embodiment of the present application provides a decoder, comprising a decoding unit, a second determining unit and a second prediction unit, wherein:

[0025] The decoding unit is configured to parse a first syntax element in a bitstream and a mode index of a current block using a first intra prediction technology.

[0026] The second determining unit is configured to, when the first syntax element indicates that the current block uses a merge mode of the first intra prediction technology, determine at least one vector parameter of the current block, determine at least one set of candidate filtering parameters of the current block according to the at least one vector parameter, determine a first candidate list of the current block according to the at least one set of candidate filtering parameters, and determine a filtering parameter of the current block according to the first candidate list and the mode index.

[0027] The second prediction unit is configured to determine a prediction sample of the current block according to the filtering parameter.

[0028] In a sixth aspect, an embodiment of the present application provides a decoder, comprising a second memory and a second processor; wherein,

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

[0030] The second processor is configured to execute the method according to the first aspect when running the computer program.

[0031] In a seventh aspect, an embodiment of the present application provides a computer readable storage medium, having a computer program stored thereon, which is executed by a processor to implement the method according to the first aspect or the method according to the second aspect.

[0032] In an eighth aspect, an embodiment of the present application provides a computer program product, comprising a computer program or instructions, which is executed by a processor to implement the method according to the first aspect or the method according to the second aspect.

[0033] In a ninth aspect, an embodiment of the present application provides a computer readable storage medium, having a bitstream stored thereon, which is generated by executing steps of the encoding method according to the second aspect.

[0034] The embodiment of the present application provides a coding method, an encoder, a decoder and a storage medium. At the encoding end, when the current block uses the merge mode of the first intra prediction technology, at least one vector parameter of the current block is determined, at least one group of candidate filter parameters of the current block is determined according to the at least one vector parameter, the first candidate list of the current block is determined according to the at least one group of candidate filter parameters, and at least one group of candidate mode information in the first candidate list is determined to correspond to the first cost result respectively; when the current block does not use the merge mode of the first intra prediction technology, the third candidate list of the current block is determined, and at least one group of candidate mode information in the third candidate list is determined to correspond to the second cost result respectively; the value of the first syntax element is determined according to the first cost result and the second cost result; the value of the first syntax element is encoded, and the obtained encoding bits are written into the code stream. At the decoding end, the first syntax element and the mode index of the current block using the first intra prediction technology in the code stream are parsed; when the first syntax element indicates that the current block uses the merge mode of the first intra prediction technology, at least one vector parameter of the current block is determined, at least one group of candidate filter parameters of the current block is determined according to the at least one vector parameter; the first candidate list of the current block is determined according to the at least one group of candidate filter parameters; the filter parameter of the current block is determined according to the first candidate list and the mode index; and the prediction sample of the current block is determined according to the filter parameter. In this way, when the current block uses the merge mode of the first intra prediction technology, at least one group of candidate filter parameters of the current block is determined according to the at least one vector parameter, and then the at least one group of candidate filter parameters is used as the candidate mode information in the first candidate list, thereby expanding the candidate range in the first candidate list; according to the first candidate list and the mode index obtained by parsing the code stream, the filter parameter determined at this time has good generalization ability, so that the filter parameter can be better applied to the sample prediction in the current block; and the prediction is also performed according to the determined filter parameter (for example, the coefficient of the filter and the shape of the filter), which can improve the prediction sample accuracy of the current block, thereby improving the compression efficiency and further improving the coding performance. BRIEF DESCRIPTION OF DRAWINGS

[0035] FIG. 1A is a structural schematic diagram of a filter shape;

[0036] FIG. 1B is a structural schematic diagram of a filter shape;

[0037] FIG. 1C is a structural schematic diagram of a filter shape;

[0038] FIG. 2A is a schematic diagram of a training area of EIP prediction;

[0039] FIG. 2B is a schematic diagram of a training area of EIP prediction;

[0040] FIG. 2C is a schematic diagram of a training area of EIP prediction;

[0041] FIG. 3 is a diagram illustrating the positions of neighboring blocks and non- neighboring blocks of a current block;

[0042] FIG. 4 is a diagram illustrating a structure of intra template matching prediction according to an embodiment of the present application;

[0043] FIG. 5 is a diagram illustrating a network architecture of video coding according to an embodiment of the present application;

[0044] FIG. 6 is a diagram illustrating a block diagram of an encoder according to an embodiment of the present application;

[0045] FIG. 7 is a diagram illustrating a block diagram of a decoder according to an embodiment of the present application;

[0046] FIG. 8 is a diagram illustrating a flowchart of a decoding method according to an embodiment of the present application;

[0047] FIG. 9 is a diagram illustrating a flowchart of a decoding method according to another embodiment of the present application;

[0048] FIG. 10 is a diagram illustrating a search region based on intra template matching prediction;

[0049] FIG. 11 is a diagram illustrating a flowchart of a decoding method according to another embodiment of the present application;

[0050] FIG. 12 is a diagram illustrating a flowchart of a decoding method according to another embodiment of the present application;

[0051] FIG. 13 is a diagram illustrating a flowchart of an encoding method according to an embodiment of the present application;

[0052] FIG. 14 is a diagram illustrating a flowchart of an encoding method according to another embodiment of the present application;

[0053] FIG. 15 is a diagram illustrating a block diagram of an encoder according to an embodiment of the present application;

[0054] FIG. 16 is a diagram illustrating a specific hardware structure of an encoder according to an embodiment of the present application;

[0055] FIG. 17 is a diagram illustrating a block diagram of a decoder according to an embodiment of the present application;

[0056] FIG. 18 is a diagram illustrating a specific hardware structure of a decoder according to an embodiment of the present application;

[0057] FIG. 19 is a diagram illustrating a block diagram of a coding system according to an embodiment of the present application. DETAILED DESCRIPTION

[0058] In order to enable more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below, and the attached drawings are only used for reference and are not intended to limit the embodiments of the present application.

[0059] 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 this application belongs. The terminology used in the specification herein is for describing the embodiments of the present application only and is not intended to limit the present application.

[0060] In the following description, "some embodiments" are related to 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.

[0061] 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 in 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.

[0062] 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, and the terms and terms involved in the embodiments of the present application are applicable to the following explanations:

[0063] H.266 / versatile video coding (VVC);

[0064] VVC test model (VTM);

[0065] enhanced compression model (ECM);

[0066] joint video experts team (JVET);

[0067] coding unit (CU);

[0068] coding tree unit (CTU);

[0069] largest coding unit (LCU);

[0070] Prediction Unit (PU);

[0071] Transform Unit (TU);

[0072] Merge mode;

[0073] Block Vector (BV);

[0074] Intra Block Copy (IBC);

[0075] Extrapolation filter-based Intra Prediction (EIP);

[0076] Convolutional Cross-Component Model (CCCM);

[0077] Intra Template Matching Prediction (intraTMP);

[0078] Sum of Absolute Difference (SAD);

[0079] Sum of Absolute Transform-based Difference (SATD).

[0080] At present, the general video coding standards (such as H.266 / VVC) all adopt a block-based hybrid coding framework. Each image or sub-image or frame in a video is divided into square maximum coding units of the same size (such as 128x128, 64x64, etc.). Each maximum coding unit can be divided into rectangular coding units according to rules. The coding units can also be divided into prediction units, transformation units, etc. The hybrid coding framework includes modules such as prediction, transformation, quantization, entropy coding, inverse quantization, inverse transformation, in-loop filtering, etc. Among them, the prediction module can include intra prediction and inter prediction, and the inter prediction can include motion estimation and motion compensation. Due to the strong correlation between adjacent pixels in a video image, the intra prediction method is used in video coding technology to eliminate the spatial redundancy between adjacent pixels. Due to the strong similarity between adjacent frames in a video, the inter prediction method is used in video coding technology to eliminate the temporal redundancy between adjacent images, thereby improving the coding efficiency.

[0081] The basic process of a video codec is as follows: at the encoding end, a frame of image is divided into blocks, intra prediction or inter prediction is used to generate prediction samples of a current block, residual samples of the current block are obtained by subtracting the prediction samples of the current block from original image samples of the current block, a transform and quantization are performed on the residual samples to obtain a quantized coefficient matrix, and the quantized coefficient matrix is entropy encoded and output to a bitstream. At the decoding end, intra prediction or inter prediction is used to generate prediction samples of a current block, and on the other hand, a quantized coefficient matrix is obtained by parsing the bitstream, the quantized coefficient matrix is dequantized and inverse transformed to obtain residual samples of the current block, the prediction samples of the current block and the residual samples of the current block are added to obtain reconstructed samples of the current block. The reconstructed samples form a reconstructed image, and the reconstructed image is loop filtered based on an image or based on a block to obtain a decoded image. The encoding end also needs similar operations as the decoding end to obtain a decoded image. The decoded image can be used as a reference frame for inter prediction of subsequent frames. Block division information, prediction, transform, quantization, entropy encoding, loop filtering and other mode information or parameter information determined by the encoding end need to be output to the bitstream if necessary. The decoding end determines the same block division information, prediction, transform, quantization, entropy encoding, loop filtering and other mode information or parameter information by parsing the bitstream and analyzing the existing information, so as to ensure that the decoded image obtained by the encoding end is the same as the decoded image obtained by the decoding end. The decoded image obtained by the encoding end is usually also called a reconstructed image. When predicting, the current block can be divided into prediction units, and when transforming, the current block can be divided into transform units. The division of prediction units and transform units can be different. The above is the basic process of a video codec under a block-based hybrid coding framework. With the development of technology, some modules or steps of the framework or process can be optimized. The embodiments of the present application are applicable to the basic process of the video codec under the block-based hybrid coding framework, but are not limited to the framework and process.

[0082] In the embodiments of the present application, a current block (CB) can be a current coding unit, a current prediction unit, or a current transform unit, etc. Due to the need for parallel processing, an image can be divided into slices, etc., and slices in the same image can be processed in parallel, that is, there is no data dependency between them. "Frame" is a commonly used term, which can generally be understood as a frame being an image. In the embodiments of the present application, the frame can also be replaced by an image or a slice, etc.

[0083] The international video coding standardization organization JVET has established a team to study beyond H.266 / VVC coding model, and named the model, i.e. platform test software, as ECM. ECM starts to receive updates and more efficient compression algorithms on the basis of VTM, and currently has surpassed VVC by about 13% in coding performance. ECM not only expands the size of the coding unit of a specific resolution, but also integrates many modules of enhancement technology, and has changed a lot in algorithm compared with VVC.

[0084] The related technologies of intra prediction are described in detail below.

[0085] a) Intra prediction technology based on extrapolation filter.

[0086] EIP prediction is a new technology only in the ECM stage, and its core idea is to diffuse the existing texture information to the area that has not been predicted, which is similar to the diffusion filter in the VVC stage.

[0087] (1) EIP prediction based on calculation.

[0088] Unlike the angle prediction in the traditional intra prediction, EIP uses two-dimensional filters to perform prediction filtering on the samples in the current block. There are three groups of two-dimensional filters with different shapes, and the coefficients of these filters are trained by the reconstructed samples adjacent to the current block. The training process is consistent with the CCCM technology, and Cholesky solution, LDL decomposition or Gaussian elimination and other methods can be used for solution.

[0089] As shown in FIG. 1A, FIG. 1B and FIG. 1C, three EIP filter shapes are provided here, which are square, horizontal rectangle and vertical rectangle respectively. Among them, the grid filled part is the input part of the filter, the white filled part is the output part of the filter, and there are 15 taps corresponding to 15 filter coefficients. EIP prediction has a delay, for example, when predicting the first sample point in the upper left corner of the current block, using the first square filter, the first sample point in the upper left corner of the current block needs to use the three reconstructed sample points directly above and the three reconstructed sample points to the left of the first sample point, and the reconstructed sample points in the 3x3 square above the left corner as input, and the first predicted sample point in the upper left corner of the current block is obtained after calculation. Assuming that the second sample point in the second row of the current block is predicted, the second sample point in the second row needs to use the predicted sample point directly above and the two reconstructed sample points adjacent to the left of the predicted sample point directly above, and the 3x4 reconstructed sample points to the left as input, and the first predicted sample point in the second row is obtained after calculation. As can be seen from this, the second predicted sample point needs to rely on the first predicted sample point, that is, the prediction has a delay. In order to reduce this delay, diagonal and other scan orders can be used as the prediction order in the current block, so that the prediction of all points on the diagonal does not rely on other points on the same diagonal as EIP input, so that parallel processing can be realized on the same diagonal.

[0090] Here, the calculation formula of EIP prediction is as follows:

[0091] In the above formula (1), pred (x,y) is the predicted sample point located at the coordinates (x, y) in the current block, c i is the filter coefficient, is the reconstructed sample point or the predicted sample point. In the current implementation, EIP uses Gaussian elimination to calculate these filter coefficients by establishing a linear model, and the modeling formula is as follows:

[0092] The above formula (2) is transformed to obtain:

[0093] Where A is the matrix of input samples, y is the matrix of output samples, is the matrix of filter coefficients.

[0094] In addition, EIP prediction provides three templates to train these filter coefficients, as shown in FIG. 2A, FIG. 2B and FIG. 2C. Here, in FIG. 2A, the training area includes the left template and the upper template of the current block; in FIG. 2B, the training area includes the upper template of the current block; in FIG. 2C, the training area includes the left template of the current block. Here, the training area can also be referred to as the template area.

[0095] As shown in FIG. 2A, FIG. 2B and FIG. 2C, taking a square filter as an example, fWidth represents the width of the square filter, and fHeight represents the height of the square filter. In FIG. 2A, leftSize represents the width of the left template, i.e. the number of columns on the left side of the current block; aboveSize represents the height of the upper template, i.e. the number of rows on the upper side of the current block; according to leftSize and aboveSize, the size of the template region can be determined, and the square filter scans in the template region to obtain the corresponding input samples and output samples. In FIG. 2B, for the upper template, leftSize represents the number of columns on the left side of the current block, and aboveSize represents the number of rows on the upper side of the current block; according to leftSize and aboveSize, the size of the upper template region can be determined, and the square filter scans in the template region to obtain the corresponding input samples and output samples. In FIG. 2C, for the left template, leftSize represents the number of columns on the left side of the current block, and aboveSize represents the number of rows on the upper side of the current block; according to leftSize and aboveSize, the size of the left template region can be determined, and the square filter scans in the template region to obtain the corresponding input samples and output samples.

[0096] (2) Merge-based EIP prediction.

[0097] The EIP technique can also obtain the filter coefficients of the EIP filter by merging the information of the peripheral adjacent, non-adjacent, history list and time domain co-located blocks to construct an EIP list. The EIP list is initially empty, and the construction process is shown in FIG. 3, which is similar to the construction process of the inter prediction merge mode list. As shown in FIG. 3, the black filled small block is the current block, and the positions 1-5 in FIG. 3 are called the adjacent blocks of the current block, and the remaining positions are called the non-adjacent blocks of the current block.

[0098] Firstly, the EIP merge mode obtains the EIP information of the adjacent blocks and non-adjacent blocks in the spatial domain, and adds them to the EIP list. By searching the positions as shown in FIG. 3, the coding blocks corresponding to the positions are checked in sequence to determine whether the EIP technique is used, if the EIP technique is used, the EIP information corresponding to the position is obtained, for example, the EIP information can include the filter shape and the filter coefficients; and the EIP candidate mode in the EIP list is checked for duplication, if the filter shape and the filter coefficients are the same as a candidate in the EIP list, the candidate is not put into the EIP list, otherwise, the candidate is added to the EIP list.

[0099] Secondly, the EIP merge mode checks whether the time domain information can be used. If the condition is satisfied, the EIP information of the same position block in the reference frame and the EIP information of the same position block of the offset motion vector are obtained. The same position check is performed. If the same position has not appeared, the EIP information is added to the EIP list. Here, the reference frame can be the same position frame obtained from the reference list 0 and / or the same position frame obtained from the reference list 1.

[0100] Finally, the EIP merge mode obtains the EIP information in the EIP history list. The EIP history list is constructed according to the same rule in the coding process. The EIP history list only saves the EIP information. The EIP merge mode obtains the latest EIP candidate information of the history list and performs the same position check. If the same position has not appeared, the EIP information is added to the EIP list. After the EIP is selected as the coding mode of the current block, the EIP information is saved to the EIP history list. If the EIP history list is full, the EIP history list is updated according to the first-in-first-out principle. The candidate added to the EIP history list at the earliest time is removed. The EIP history list is kept updated. After the EIP prediction is completed, the corresponding EIP information is saved to the EIP history list. The EIP history list is kept updated.

[0101] After the EIP list of the EIP merge mode is constructed, the neighboring reconstructed samples of the current block are used as the template region. The EIP information of the EIP list is used to predict the template region to obtain the template region prediction sample corresponding to each candidate mode. The SAD or SATD cost between the template prediction sample and the template reconstructed sample is calculated. Then, the EIP list is sorted to obtain the sorted EIP list.

[0102] The EIP candidate in the sorted EIP list is traversed by the encoding end. The rate-distortion cost between the prediction sample based on the current block and the original image sample of each candidate is calculated. The EIP candidate with the minimum cost is the optimal candidate in the merge mode. The corresponding candidate index is written into the code stream and transmitted to the decoding end.

[0103] b) Intra template matching prediction.

[0104] The intra template matching prediction technology is an intra prediction technology in the ECM. The neighboring reconstructed samples of the current block are used as the template region to search the already decoded reconstructed region. The position with the minimum template error is obtained. The position is the position pointed by the block vector. The reconstructed sample with the same size as the current block in the position corresponding to the template region is the prediction sample of the current block.

[0105] Exemplarily, FIG. 4 is a structural schematic diagram of the intra template matching prediction provided by the embodiment of the present application. As shown in FIG. 4, the grid filling position is the template region of the current block, the region pointed by the black arrow is the best matching position searched by the template (filled with diagonal lines), and the reconstructed sample region identified by the black solid line frame in the pointed region is the prediction sample of the current block.

[0106] That is, the extrapolation filter always uses the neighboring reconstructed samples to calculate the filter coefficient, and if there is a large texture change in the current block, the extrapolation filter trained based on the surrounding reconstructed samples can not be well applicable to this case. In addition, for the filter coefficient learning of the extrapolation filter, the ideal case is to learn based on the original image block of the current block to obtain the optimal filter coefficient. However, due to the excessive bit overhead of the coefficient transmission, the coding performance is reduced.

[0107] Based on this, the embodiment of the present application provides an encoding method, when the current block uses the merge mode of the first intra prediction technology, determining at least one vector parameter of the current block, determining at least one group of candidate filter parameters of the current block according to the at least one vector parameter, and determining a first candidate list of the current block according to the at least one group of candidate filter parameters, and determining a first cost result corresponding to each of at least one group of candidate mode information in the first candidate list; when the current block does not use the merge mode of the first intra prediction technology, determining a third candidate list of the current block, and determining a second cost result corresponding to each of at least one group of candidate mode information in the third candidate list; determining the value of a first syntax element according to the first cost result and the second cost result, wherein the first syntax element is used to indicate whether the current block uses the merge mode of the first intra prediction technology; encoding the value of the first syntax element, and writing the obtained encoding bits into a bitstream. The embodiment of the present application also provides a decoding method, parsing the first syntax element and the mode index of the current block using the first intra prediction technology in the bitstream; when the first syntax element indicates that the current block uses the merge mode of the first intra prediction technology, determining at least one vector parameter of the current block, determining at least one group of candidate filter parameters of the current block according to the at least one vector parameter; determining a first candidate list of the current block according to the at least one group of candidate filter parameters; determining the filter parameter of the current block according to the first candidate list and the mode index; and determining the prediction sample of the current block according to the filter parameter.

[0108] Thus, when the current block uses the merge mode of the first intra prediction technology, at least one set of candidate filter parameters of the current block is determined according to at least one vector parameter, and the at least one set of candidate filter parameters is taken as candidate mode information in the first candidate list, thereby expanding the candidate range in the first candidate list. According to the first candidate list and the mode index obtained by parsing the code stream, the determined filter parameters have good generalization ability, so that the filter parameters can be better applied to the sample prediction in the current block. Moreover, prediction is performed according to the determined filter parameters (for example, the coefficients of the filter and the shape of the filter), which can improve the prediction sample accuracy of the current block, thereby improving the compression efficiency and further improving the coding performance.

[0109] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0110] FIG. 5 is a schematic diagram of a network architecture of a video coding provided by an embodiment of the present application. As shown in FIG. 5, 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 in the implementation can be various types of devices with video coding functions, for example, the electronic devices can include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital telephone, a video telephone, a television, a sensing device, a server, etc., and the embodiments of the present application are not limited thereto.

[0111] In the embodiments of the present application, a network architecture of a video coding system including a decoding method and an encoding method is provided. The decoder or the encoder in the embodiments of the present application can be the electronic device described above. That is, the electronic device in the embodiments of the present application has a video coding function, and generally includes a video / image encoder (referred to as an encoder) and a video / image decoder (referred to as a decoder).

[0112] FIG. 6 is a block diagram of an encoder according to an embodiment of the present application. As shown in FIG. 6, 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 picture 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 through 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.

[0113] FIG. 7 is a block diagram of a decoder according to an embodiment of the present application. As shown in FIG. 7, 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, etc. The decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement deblocking filtering and SAO filtering. After the input video signal is processed by the encoder of FIG. 6, a bitstream of the video signal is output. The bitstream is input into the decoder 200, and first passes through the decoding unit 201 to obtain decoded transform coefficients. The inverse transform and inverse quantization unit 202 processes the transform coefficients to generate a residual block in the pixel domain. The intra prediction unit 203 can be used to generate 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 passes through the filtering unit 205 to remove blocking artifacts and improve video quality. The decoded video block is then 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 original video signal is recovered.

[0114] 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 as shown in FIG. 6, and the intra prediction unit 203 as shown in FIG. 7. That is, the embodiments of the present application can be applied to an encoder, a decoder, or both, but are not limited here.

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

[0116] In an embodiment of the present application, FIG. 8 is a flowchart of a decoding method according to an embodiment of the present application. As shown in FIG. 8, the method can include:

[0117] S801, parse the first syntax element in the bitstream and the mode index of the first intra prediction technology used by the current block.

[0118] It should be noted that in the embodiments of the present application, the method is applied to a decoder, and mainly applied to the intra prediction part (marked with a bold frame) in FIG. 7. When the current block uses intra prediction, the optimization scheme proposed herein mainly aims at determining the filtering coefficients of the EIP technology in the intra prediction, so as to improve the compression efficiency.

[0119] It should be further 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 bitstream. In this way, by parsing the value of the syntax element in the bitstream, the prediction technology used by the current block and whether the merging mode of the first intra prediction technology is used can be determined. Exemplarily, the first syntax element can be used to indicate whether the merging mode of the first intra prediction technology is used by the current block, and the second syntax element can be used to indicate whether the first intra prediction technology is used by the current block.

[0120] In some embodiments, referring to FIG. 9, for step S801, the following steps can be included:

[0121] S901, parse the second syntax element in the bitstream.

[0122] S902, when the second syntax element indicates that the first intra prediction technology is used by the current block, parse the first syntax element in the bitstream and the mode index of the first intra prediction technology used by the current block.

[0123] In the embodiments of the present application, the first intra prediction technology refers to the EIP technology, the merging mode of the first intra prediction technology refers to the EIP merging (eip_merge) mode, and therefore the first syntax element can be referred to as the eip_merge flag, which can be represented by eip_merge herein. The second syntax element can be referred to as the EIP use flag, which can be represented by eip_flag herein.

[0124] In some embodiments, the method can further include: if the value of the first syntax element is a first value, determining that the first syntax element indicates that the merging mode of the first intra prediction technology is used by the current block; and if the value of the first syntax element is a second value, determining that the first syntax element indicates that the merging mode of the first intra prediction technology is not used by the current block.

[0125] That is, in the embodiments of the present application, when the merge mode of the first intra prediction technique is the EIP merge mode, if the value of eip_merge obtained by parsing the bitstream is the first value, it can be determined that the current block uses the EIP merge mode; if the value of eip_merge obtained by parsing the bitstream is the second value, it can be determined that the current block does not use the EIP merge mode.

[0126] In some embodiments, the method can further include: if the value of the second syntax element is the first value, determining that the second syntax element indicates that the current block uses the first intra prediction technique; if the value of the second syntax element is the second value, determining that the second syntax element indicates that the current block does not use the first intra prediction technique.

[0127] That is, in the embodiments of the present application, when the first intra prediction technique is the EIP technique, if the value of eip_flag obtained by parsing the bitstream is the first value, it can be determined that the current block uses the EIP technique; if the value of eip_flag obtained by parsing the bitstream is the second value, it can be determined that the current block does not use the EIP technique.

[0128] It can be understood that, before determining whether the current block uses the first intra prediction technique, it is also necessary to determine whether the current sequence allows the use of the first intra prediction technique and determine the prediction type of the current block. In the embodiments of the present application, the third syntax element can be used to indicate whether the current sequence allows the use of the first intra prediction technique, and the fourth syntax element can be used to indicate the prediction type of the current block. The prediction type includes intra prediction or inter prediction.

[0129] In some embodiments, the method can further include: parsing a third syntax element in the bitstream; parsing a fourth syntax element in the bitstream when the third syntax element indicates that the current sequence allows the use of the first intra prediction technique; parsing the value of the second syntax element, i.e., eip_flag, when the fourth syntax element indicates that the prediction type of the current block is intra prediction; parsing the value of the first syntax element, i.e., eip_merge, and the mode index of the current block using the first intra prediction technique when the second syntax element indicates that the current block uses the first intra prediction technique.

[0130] In the embodiments of the present application, the current sequence includes the current block. The third syntax element is a sequence-level syntax element, and the second syntax element, the first syntax element and the fourth syntax element are all block-level (CU-level or PU-level) syntax elements.

[0131] In some embodiments, the method can further include: if the third syntax element has a first value, determining that the third syntax element indicates that the current sequence allows using the first intra prediction technology; and if the third syntax element has a second value, determining that the third syntax element indicates that the current sequence does not allow using the first intra prediction mode.

[0132] In embodiments of the present application, the third syntax element can be referred to as an EIP use permission identification bit, and the third syntax element can be denoted as sps_eip_enable_flag. That is, if the value of sps_eip_enable_flag obtained by parsing the bitstream is a first value, it can be determined that the current sequence allows using the EIP technology; and if the value of sps_eip_enable_flag obtained by parsing the bitstream is a second value, it can be determined that the current sequence does not allow using the EIP technology.

[0133] In some embodiments, the method can further include: if the fourth syntax element has a first value, determining that the fourth syntax element indicates that the prediction type of the current block is intra prediction; and if the fourth syntax element has a second value, determining that the fourth syntax element indicates that the prediction type of the current block is inter prediction.

[0134] In embodiments of the present application, the fourth syntax element can be referred to as a prediction type identification bit. That is, if the value of the prediction type identification bit obtained by parsing the bitstream is a first value, i.e., intra prediction, the value of eip_flag can be parsed; and if the value of the prediction type identification bit obtained by parsing the bitstream is a second value, i.e., inter prediction, the value of eip_flag is not parsed.

[0135] In embodiments of the present application, the first value and the second value are different, and the first value and the second value can be in the form of a parameter or in the form of a number. For example, the syntax element herein can be a parameter written in a profile, or a value of an identification bit (flag), which is not limited herein.

[0136] For example, the first value can be set to 1, and the second value can be set to 0; or the first value can be set to 0, and the second value can be set to 1; or the first value can be set to true, and the second value can be set to false; or the first value can be set to false, and the second value can be set to true; but this is not limited.

[0137] In the embodiments of the present application, taking the first value as true and the second value as false as an example, the decoding end first parses the third syntax element to obtain the EIP use identification bit of the EIP from the code stream. If the value of the sps_eip_enable_flag is true, it indicates that the EIP technology is allowed to be used in the current sequence, and then the decoding end continues to parse the fourth syntax element to obtain the prediction type of the current block from the code stream. If the prediction type of the current block is intra prediction, the decoding end continues to parse the second syntax element to obtain the EIP use identification bit of the current block from the code stream. If the value of the eip_flag is true, it indicates that the EIP technology is used in the current block, and then the decoding end needs to further parse the first syntax element to obtain the eip_merge identification bit from the code stream. If the value of the eip_merge is true, it indicates that the EIP merge mode is used in the current block. If the value of the eip_merge is false, it indicates that the EIP merge mode is not used in the current block.

[0138] It can also be understood that when the EIP technology is used in the current block, the decoding end not only needs to parse the first syntax element in the code stream, but also needs to parse the mode index of the first intra prediction technology used in the current block in the code stream.

[0139] In the embodiments of the present application, the mode index can be represented by eip_index. If the first syntax element indicates that the merge mode of the first intra prediction technology is used in the current block, that is, the EIP merge mode is used in the current block, the eip_index can indicate the index sequence number of the mode information of the current block in the first candidate list. If the first syntax element indicates that the merge mode of the first intra prediction technology is not used in the current block, that is, the EIP merge mode is not used in the current block, the eip_index can indicate the index sequence number of the filter parameter of the current block in the third candidate list.

[0140] S802, when the first syntax element indicates that the merge mode of the first intra prediction technology is used in the current block, determining at least one vector parameter of the current block, and determining at least one set of candidate filter parameters of the current block according to the at least one vector parameter.

[0141] S803, determining the first candidate list of the current block according to the at least one set of candidate filter parameters.

[0142] In the embodiments of the present application, if the value of the first syntax element is the first value, that is, the first syntax element indicates that the EIP technology is used in the current block and the EIP merge mode is used in the current block, the EIP prediction based on the merge can be performed. Specifically, at least one set of candidate filter parameters derived according to at least one vector parameter of the current block can be used as the candidate mode information in the first candidate list.

[0143] In the embodiments of the present application, the vector parameter can include at least one of a motion vector (MV) and a block vector (BV). That is, at least one set of candidate filter parameters of the current block can be determined according to the motion vector parameter, and / or at least one set of candidate filter parameters of the current block can also be determined according to the block vector parameter.

[0144] In the embodiments of the present application, for the determination of the candidate filter parameter, the embodiments of the present application find a decoded block similar to the current block in the decoded image, and then perform filter training on the decoded block to obtain the corresponding at least one set of candidate filter parameters.

[0145] In the embodiments of the present application, the candidate filter parameter includes a shape of the candidate filter and a coefficient of the candidate filter. The shape of the candidate filter can include at least one of a square filter, a horizontal matrix filter and a vertical rectangular filter, but is not limited thereto.

[0146] The at least one vector parameter of the current block can be determined in the following several possible implementation manners.

[0147] In a possible implementation manner, the at least one vector parameter can include a first vector parameter. In some embodiments, determining the at least one vector parameter of the current block can include determining a first template of the current block, and searching the decoded region according to the first template to determine the first vector parameter of the current block.

[0148] In the embodiments of the present application, the first template of the current block refers to the reconstructed samples adjacent to the periphery of the current block. Exemplarily, the first template of the current block can include at least one of an upper template region and / or a left template region. That is, the first template of the current block can refer to the upper template region, or can also refer to the left template region, or can also refer to the upper template region and the left template region. In a specific embodiment, the first template in the embodiments of the present application generally refers to the upper template region and the left template region.

[0149] In some embodiments, searching the decoded region according to the first template to determine the first vector parameter of the current block can include searching the decoded region according to the first template to determine one or more first candidate vector parameters, respectively calculating the cost of the reference template corresponding to the one or more first candidate vector parameters and the first template to determine the cost results corresponding to the one or more first candidate vector parameters, and determining the minimum cost result from the cost results corresponding to the one or more first candidate vector parameters, and determining the candidate vector parameter corresponding to the minimum cost result as the first vector parameter of the current block.

[0150] In the embodiments of the present application, the search herein can refer to coarse search and / or fine search. The search step of the coarse search is greater than that of the fine search. For example, the search step of the coarse search is equal to 4, and the search step of the fine search is equal to 1, which is not limited in any way.

[0151] That is, in the embodiments of the present application, the search in the decoded region according to the first template can include: performing coarse search in the decoded region according to the first template with a first search step to determine a first search list; then determining a search region corresponding to the candidate vector parameter in the first search list, and performing fine search in the search region corresponding to the candidate vector parameter in the first search list with a second search step to determine one or more first candidate vector parameters. Here, the first search step is greater than the second search step, and the first candidate vector parameter is used to indicate the vector parameter between the first template and the reference template obtained by searching.

[0152] For example, as shown in FIG. 10, R0 to R5 are six search regions corresponding to the intraTMP search. The search process can include coarse search and fine search, and specifically can include: the coarse search process is to sample the reconstructed sample residues in the allowable search with a step of 4 sample points to obtain a certain number of candidate vector parameters, which are combined to form a coarse search vector parameter candidate list. The fine search process is to perform traversal search on the coarse search vector parameter candidate list with a step of 1 to reestablish a fine search vector parameter candidate list according to the distortion cost to determine the first vector parameter of the current block. In addition, in FIG. 10, H represents the height of the current block, and W represents the width of the current block.

[0153] It should be further noted that, in the embodiments of the present application, the cost calculation herein can be SAD cost calculation, or can be SATD cost calculation, or can be other cost calculation, such as Sum of Squared Errors (SSE), Mean Absolute Deviation (MAD), Mean Absolute Error (MAE), Mean Square Error (MSE), etc., which is not limited in any way.

[0154] Thus, in the embodiments of the present application, the cost results (e.g. template errors) corresponding to the one or more first candidate vector parameters are determined by performing cost calculation between the reference templates corresponding to the one or more first candidate vector parameters and the first template respectively; then the minimum template error is determined from the template errors corresponding to the one or more first candidate vector parameters, and the reference block corresponding to the minimum template error is determined; then the position difference between the reference block corresponding to the minimum error value and the current block is obtained to obtain the candidate vector parameter corresponding to the minimum template error, and the candidate vector parameter is determined as the first vector parameter of the current block.

[0155] In another possible implementation, the at least one vector parameter can further include a second vector parameter. In some embodiments, determining the at least one vector parameter of the current block can include: determining a vector candidate list; and determining the second vector parameter of the current block according to one or more second candidate vector parameters in the vector candidate list.

[0156] In the embodiments of the present application, the vector candidate list is obtained by a merge mode, and the process of obtaining the vector parameter is similar to the rules and order of obtaining the EIP information. The vector candidate list includes one or more second candidate vector parameters.

[0157] In some embodiments, determining the vector candidate list can include: determining one or more second candidate vector parameters according to the first reference information of the current block; and determining the vector candidate list according to the one or more second candidate vector parameters; wherein the first reference information of the current block includes at least one of the following: whether the vector parameter exists in the neighboring block of the current block; whether the vector parameter exists in the non-neighboring block of the current block; the first history list of the current block based on the vector parameter; and whether the vector parameter exists in the homologous block of the current block in the reference frame.

[0158] In the embodiments of the present application, the vector parameter herein can be a block vector parameter, and one or more block vector parameters are obtained through the merge mode to construct a vector candidate list. Herein, the vector candidate list can be referred to as a block vector merge candidate list (BV Merge list), and the first history list can be referred to as a history-based block vector list (history-based BV list). Exemplarily, for determining the vector candidate list, the specific operation process is as follows: firstly, whether the already decoded neighboring blocks and non-neighboring blocks have block vectors is obtained by checking the spatial positions, such as neighboring blocks and non-neighboring blocks, and if yes, the block vectors are added to the vector candidate list; secondly, the block vectors are obtained by traversing the first history list and added to the vector candidate list; and finally, the block vectors are obtained by traversing the temporal block vector information, and the block vectors are obtained by obtaining the same-position blocks and the neighboring blocks around the same-position blocks in the reference frame and added to the vector candidate list. In the above process, a duplicate checking operation is simultaneously performed, and if the obtained block vector is the same as a candidate in the vector candidate list, the block vector is not added to the vector candidate list, otherwise, the block vector is added to the vector candidate list.

[0159] It is also necessary to note that for the construction of the first history list, the first history list is constructed according to the same rule in the coding and decoding process, and the first history list only saves block vector information. Herein, the latest block vector information of the first history list is obtained, and a duplicate checking operation is performed, and if there is no same, the block vector is added to the vector candidate list. Wherein, after the decoding end completes the merge mode prediction of the current block, the corresponding block vector information needs to be saved into the first history list, and if the first history list is full, the first history list is updated according to the principle of first in first out, and the candidate added to the first history list at the earliest is removed, so as to keep the update of the first history list.

[0160] In some embodiments, determining the second vector parameter of the current block according to one or more second candidate vector parameters in the vector candidate list can include: determining the candidate vector parameter at the first position in the vector candidate list as the second vector parameter of the current block.

[0161] In the embodiments of the present application, after the vector candidate list is determined, the candidate vector parameter at a preset position in the vector candidate list can be determined as the second vector parameter of the current block. Exemplarily, the candidate vector parameter at the first position in the vector candidate list (i.e., the first element in the list) can be selected to determine as the second vector parameter of the current block.

[0162] In some embodiments, determining the second vector parameter of the current block according to the one or more second candidate vector parameters in the vector candidate list can further include: determining reference templates corresponding to the one or more second candidate vector parameters; respectively performing cost calculation on the reference templates corresponding to the one or more second candidate vector parameters and the first template of the current block to determine cost results corresponding to the one or more second candidate vector parameters; determining a minimum cost result from the cost results corresponding to the one or more second candidate vector parameters, and determining a candidate vector parameter corresponding to the minimum cost result as the second vector parameter of the current block.

[0163] In the embodiments of the present application, after the vector candidate list is determined, the reference template corresponding to each candidate vector parameter in the vector candidate list can be determined respectively, and then cost calculation is performed on the reference template corresponding to each candidate vector parameter and the first template of the current block to determine the cost result corresponding to each candidate vector parameter. The minimum cost result is determined from the cost results, and the candidate vector parameter corresponding to the minimum cost result is determined as the second vector parameter of the current block. For example, the minimum template error is determined from the cost results, and the candidate vector parameter corresponding to the minimum template error (i.e. the position difference between the reference block corresponding to the minimum error value and the current block) is determined as the second vector parameter of the current block.

[0164] In another possible implementation, the at least one vector parameter can further include a third vector parameter. In some embodiments, determining the at least one vector parameter of the current block can include: parsing the third vector parameter in the code stream.

[0165] In the embodiments of the present application, the corresponding third vector parameter can also be obtained through motion / block search. For example, the encoding end searches the original image through the sample block of the current block, and can obtain the matching block with the minimum error. The position difference between the matching block and the current block is the third vector parameter of the current block. Here, the third vector parameter needs to be written into the code stream and transmitted to the decoding end, so that the decoding end can obtain the third vector parameter by parsing the code stream.

[0166] It should be noted that in the embodiments of the present application, after the at least one vector parameter (such as the first vector parameter, the second vector parameter and the third vector parameter) is obtained, the method can further include: adding the at least one vector parameter to the preset storage area and / or the first history list based on the vector parameter.

[0167] Exemplarily, taking the searched first vector parameter as an example, after the first vector parameter is saved to the preset storage area and / or the first history list, the first vector parameter can be provided for a subsequent decoding block. If the subsequent decoding block uses IBC or intra TMP technology, when a BV Merge list is constructed, if the current block is accessed and the current block uses EIP merge technology, the vector parameter of the current block can be directly obtained from the preset storage area and / or the first history list, and the vector parameter is used as a candidate vector parameter in the BV Merge list of the subsequent decoding block.

[0168] It should be further noted that in the embodiments of the present application, after at least one vector parameter (for example, the first vector parameter, the second vector parameter, and the third vector parameter) is obtained, at least one group of candidate filter parameters can be determined according to the at least one vector parameter. The first vector parameter, the second vector parameter, and the third vector parameter obtained above can all be used as vector parameters for determining the candidate filter parameters, or only the first vector parameter can be used as the vector parameter for determining the candidate filter parameters, or the first vector parameter and the second vector parameter can be used as the vector parameters for determining the candidate filter parameters, or all the candidate vector parameters in the vector candidate list can be used as the vector parameters for determining the candidate filter parameters, which is not limited herein.

[0169] In some embodiments, at least one group of candidate filter parameters is determined according to at least one vector parameter, referring to FIG. 11, taking the current vector parameter as an example, the method can include:

[0170] S1101, a reference region indicated by the current vector parameter is determined.

[0171] S1102, training samples corresponding to at least one candidate filter are determined according to the reconstructed samples of the reference region.

[0172] S1103, at least one group of candidate filter parameters corresponding to the current vector parameter is determined through filter training according to the training samples corresponding to the at least one candidate filter, and the candidate filter parameters include the shape of the candidate filter and the coefficients of the candidate filter.

[0173] In the embodiments of the present application, the current vector parameter is any one of the at least one group of candidate filter parameters. The reference region includes a reference block and / or a reference template. Here, the reconstructed samples of the reference region can include the reconstructed samples corresponding to the size and position of the current block (i.e., the reconstructed samples in the reference block), can include the reconstructed samples adjacent to the periphery of the reference block (i.e., the reconstructed samples in the reference template), or can further include all the reconstructed samples in the reference block and the reference template, such as the diagonal line filled area in FIG. 4, which is not limited herein.

[0174] In the embodiments of the present application, if only one vector parameter is included in the at least one vector parameter, the corresponding reference region can be obtained according to the one vector parameter, and then at least one group of candidate filter parameters can be calculated according to the reference region; if multiple vector parameters are included in the at least one vector parameter, multiple reference regions can be obtained according to the multiple vector parameters, and then at least one group of candidate filter parameters can be calculated according to the multiple reference regions, which is not specifically limited here.

[0175] In the embodiments of the present application, since the shape of the filter can include at least one of a square filter, a horizontal matrix filter and a vertical rectangular filter, different training samples can be corresponded under different shapes of the filter, so that different coefficients of the filter can be trained. Here, the coefficients of the filter can also be referred to as "filter coefficients" or "filtering coefficients".

[0176] In the embodiments of the present application, according to the reconstructed samples of the reference region, the input samples and the output samples of the candidate filter can be determined in combination with the shape of the candidate filter, and then the input samples and the output samples of the candidate filter are calculated, so that the coefficients of the candidate filter can be obtained, such as the filtering coefficient calculation of the foregoing formula (3); so that at least one group of candidate filter parameters corresponding to each vector parameter can be determined.

[0177] In some embodiments, the method can further include: dividing the reconstructed samples of the reference region to determine at least two groups of reconstructed samples; determining the training samples corresponding to at least one candidate filter combination according to the at least two groups of reconstructed samples, wherein the candidate filter combination includes the candidate filters corresponding to the at least two groups of reconstructed samples respectively; and performing filter training according to the training samples corresponding to the at least one candidate filter combination to determine at least one group of candidate filter parameter combinations corresponding to the current vector parameter.

[0178] In the embodiments of the present application, the candidate filter parameter combination can include a group of candidate filter parameters corresponding to each of the at least two groups of reconstructed samples. Here, the reconstructed samples of the reference region can be divided, and then filter training is performed on the at least two groups of divided reconstructed samples to obtain at least one group of candidate filter combinations. The number of candidate filters included in the candidate filter combination is related to the number of divided reconstructed sample groups. For example, if the reconstructed samples of the reference region are divided into two groups of reconstructed samples, two candidate filters are included in each candidate filter combination, and correspondingly, two groups of candidate filter parameters, such as a first group of filter parameters and a second group of filter parameters, are included in each group of candidate filter parameter combinations. In this way, according to the situation of one or more samples in the current block, the first group of filter parameters can be adaptively selected for prediction or the second group of filter parameters can be adaptively selected for prediction.

[0179] That is to say, in the embodiments of the present application, the candidate filter parameters are calculated according to the reconstructed samples of the reference region, which can be only one set of candidate filter parameters, or can be a combination of a plurality of sets of candidate filter parameters. In other words, here can be only one set of candidate filter parameters acting on the current block, or can be at least two sets of candidate filter parameters acting on the current block at the same time, and no limitation is made to this.

[0180] In a possible implementation, the dividing of the reconstructed samples of the reference region to determine the at least two groups of reconstructed samples can include: determining a sample reference value corresponding to the reference region; when a first reconstructed sample in the reference region is greater than the sample reference value, dividing the first reconstructed sample into a first group of reconstructed samples in the at least two groups of reconstructed samples; and when the first reconstructed sample in the reference region is less than the sample reference value, dividing the first reconstructed sample into a second group of reconstructed samples in the at least two groups of reconstructed samples.

[0181] In the embodiments of the present application, the first reconstructed sample can be any one of the reconstructed samples in the reference region. For the case that the first reconstructed sample in the reference region is equal to the sample reference value, if the first reconstructed sample in the reference region is equal to the sample reference value, the first reconstructed sample can be divided into the first group of reconstructed samples in the at least two groups of reconstructed samples, or can be divided into the second group of reconstructed samples in the at least two groups of reconstructed samples, and no limitation is made to this.

[0182] In the embodiments of the present application, the sample reference value can include a sample mean value or a sample median value. The sample mean value can be obtained by performing mean value calculation on the reconstructed samples in the reference region, and the sample median value can also be referred to as a sample median, which is a number in the middle position of the reconstructed samples in the reference region. In addition, the sample reference value can also be other sample values, such as a preset value, and no limitation is made to this.

[0183] Exemplarily, taking the division into two groups of reconstructed samples as an example, if the sample reference value is a sample mean value, when the first reconstructed sample in the reference region is greater than the sample mean value, the first reconstructed sample is divided into the first group of reconstructed samples; and when the first reconstructed sample in the reference region is less than the sample mean value, the first reconstructed sample is divided into the second group of reconstructed samples. Or, if the sample reference value is a sample median value, when the first reconstructed sample in the reference region is greater than the sample median value, the first reconstructed sample is divided into the first group of reconstructed samples; and when the first reconstructed sample in the reference region is less than the sample median value, the first reconstructed sample is divided into the second group of reconstructed samples. In this way, after obtaining the combination of the at least one set of candidate filter parameters, the samples in the current block can be predicted by using a plurality of sets of filter parameters, and the prediction sample accuracy of the current block is improved.

[0184] In another possible implementation, if the current block is an inter-coded type block, and a motion vector parameter can be used as at least one vector parameter of the current block, a corresponding reference region can also be determined according to the motion vector parameter, and then training samples corresponding to at least one candidate filter are determined according to the reconstructed samples of the reference region; filter training is performed according to the training samples corresponding to the at least one candidate filter, so that at least one group of candidate filter parameters corresponding to the current vector parameter can be determined.

[0185] In yet another possible implementation, after the vector candidate list is determined, the method can further include: determining reference regions respectively indicated by one or more second candidate vector parameters in the vector candidate list according to the one or more second candidate vector parameters; determining candidate filter parameters respectively corresponding to the one or more second candidate vector parameters according to the reference regions respectively indicated by the one or more second candidate vector parameters; and determining at least one group of candidate filter parameters of the current block according to the candidate filter parameters respectively corresponding to the one or more second candidate vector parameters.

[0186] In the embodiments of the present application, the candidate filter parameters respectively corresponding to the one or more second candidate vector parameters are determined according to the reference regions respectively indicated by the one or more second candidate vector parameters, and in a specific embodiment, the method can further include: determining a reference region indicated by a current vector parameter in the one or more second candidate vector parameters; determining training samples corresponding to at least one candidate filter according to reconstructed samples of the reference region; and performing filter training according to the training samples corresponding to the at least one candidate filter, to determine at least one group of candidate filter parameters corresponding to the current vector parameter. Here, the current vector parameter is any one of the one or more second candidate vector parameters.

[0187] That is, in the embodiments of the present application, for the one or more second candidate vector parameters in the vector candidate list, each second candidate vector parameter can determine a reference region respectively indicated by the second candidate vector parameter, and the candidate filter parameters respectively corresponding to the second candidate vector parameters can be determined according to the reference regions, that is, at least one group of candidate filter parameters corresponding to each second candidate vector parameter, and then all the candidate filter parameters obtained are used as the candidate mode information in the first candidate list.

[0188] In yet another possible implementation, the at least one group of candidate filter parameters of the current block are determined according to the at least one vector parameter, and the method can further include: determining reference blocks respectively indicated by the at least one vector parameter; obtaining filter parameters of the reference blocks when the reference blocks use a first intra prediction technology; and using the filter parameters of the reference blocks as a group of candidate filter parameters of the current block.

[0189] In the embodiments of the present application, according to the obtained vector parameters, the corresponding reference blocks can be acquired. If the reference blocks use the EIP technology, the filtering parameters of the reference blocks, such as the shape of the filter and the coefficients of the filter, can be acquired; and then the filtering parameters of the reference blocks are taken as a group of candidate filtering parameters of the current block.

[0190] Exemplarily, in the reference blocks indicated by the at least one vector parameter respectively, if the first reference block uses the first intra prediction technology, the filtering parameters of the first reference block, such as the shape of the filter and the coefficients of the filter, can be acquired; and then the filtering parameters of the first reference block are taken as a group of candidate filtering parameters of the current block. Wherein, the first reference block can be any one of the reference blocks indicated by the at least one vector parameter respectively, so that at least one group of candidate filtering parameters of the current block can be obtained.

[0191] Understandably, after the at least one group of candidate filtering parameters is determined, the first candidate list of the current block can be determined according to the at least one group of candidate filtering parameters. In some embodiments, according to the at least one group of candidate filtering parameters, the first candidate list of the current block can be determined, which can include: determining the second candidate list of the current block; and determining the first candidate list of the current block according to the at least one group of candidate filtering parameters and the second candidate list.

[0192] In the embodiments of the present application, if the current block uses the EIP technology and uses the EIP merge mode, the second candidate list of the current block can be determined first. Wherein, the second candidate list can include at least one group of at least one group of candidate filtering parameters, and the candidate filtering parameters include the shape of the candidate filter and the coefficients of the candidate filter.

[0193] In some embodiments, the second candidate list of the current block can be determined, which can include: determining at least one group of second candidate filtering parameters according to the second reference information of the current block; and determining the second candidate list of the current block according to the at least one group of second candidate filtering parameters.

[0194] In the embodiments of the present application, the second reference information of the current block includes at least one of the following: whether the neighboring block of the current block uses the first intra prediction technology; whether the non-neighboring block of the current block uses the first intra prediction technology; whether the temporal collocated block of the current block uses the first intra prediction technology; and the second history list of the current block based on the first intra prediction technology.

[0195] Exemplarily, for determining the second candidate list of the current block, the specific operation process is as follows:

[0196] Firstly, the EIP merge mode acquires EIP information of neighboring blocks and non-neighboring blocks on the current block domain, for example, the EIP information can include the shape of the filter and the coefficients of the filter, and adds the EIP information to the second candidate list. For example, by searching the positions as shown in FIG. 3, the decoding blocks corresponding to the labels are checked in sequence to determine whether the EIP technology is used, and if the EIP technology is used, the EIP information corresponding to the positions is acquired; and the acquired EIP information is checked against the EIP candidate filter parameters in the second candidate list, if the acquired EIP information is the same as a candidate in the second candidate list, the EIP information is not added to the second candidate list, otherwise, the EIP information is added to the second candidate list.

[0197] Secondly, the EIP merge mode checks whether the temporal information can be used, if the condition is met, the EIP information of the co-located block in the reference frame and the co-located block EIP information of the offset motion vector are acquired. The same checking operation is performed, if the acquired EIP information does not appear in the second candidate list, the EIP information is added to the second candidate list. Here, the reference frame can be the co-located frame acquired from the reference list 0, and / or, the co-located frame acquired from the reference list 1.

[0198] Finally, the EIP merge mode acquires the EIP information in the second history list (i.e., the EIP history list). The second history list is constructed according to the same rule in the coding and decoding process, and the second history list only saves the EIP information. The EIP merge mode acquires the latest EIP information in the second history list, and performs the checking, if there is no same, the EIP information is added to the second candidate list. Here, the decoding end needs to save the corresponding EIP information in the second history list after completing the EIP prediction of the current block, if the second history list is full, the second history list is updated according to the principle of first in first out, and the candidate added to the second history list earliest is removed, so as to keep the update of the second history list.

[0199] In this way, after the second candidate list of the EIP merge mode is constructed, at least one set of candidate filter parameters can be added to the second candidate list to determine the first candidate list of the current block.

[0200] In some embodiments, determining the first candidate list of the current block according to the at least one set of candidate filter parameters and the second candidate list can include: updating the second candidate list based on the at least one set of candidate filter parameters to obtain an updated candidate list; respectively performing cost calculation on the template region of the current block according to the at least one set of candidate filter parameters in the updated candidate list to determine respective cost results of the at least one set of candidate filter parameters in the updated candidate list; and sorting the at least one set of candidate filter parameters in the updated candidate list according to the cost results to determine the first candidate list of the current block.

[0201] In the embodiments of the present application, the second candidate list is updated based on the at least one set of candidate filter parameters, specifically, the at least one set of candidate filter parameters is added to the second candidate list, and a duplicate checking operation is also required in the process. In some embodiments, updating the second candidate list based on the at least one set of candidate filter parameters can include: when the first candidate filter parameter does not exist in the second candidate list, adding the first candidate filter parameter to the second candidate list; when the first candidate filter parameter exists in the second candidate list, skipping the step of adding the first candidate filter parameter to the second candidate list; wherein the first candidate filter parameter is any one of the at least one set of candidate filter parameters.

[0202] That is, in the embodiments of the present application, if the first candidate filter parameter has appeared in the second candidate list, the first candidate filter parameter can not be added to the second candidate list, that is, the first candidate filter parameter is skipped; if the first candidate filter parameter has not appeared in the second candidate list, the first candidate filter parameter can be added to the second candidate list to update the second candidate list.

[0203] Further, for the obtained updated candidate list, the at least one set of candidate filter parameters in the updated candidate list can be used to predict the template region using the reconstructed samples adjacent to the current block as the template region, to obtain the template region prediction samples corresponding to each set of candidate filter parameters, to calculate the cost value (such as SAD cost value or SATD cost value, etc.) between the template prediction samples and the template reconstructed samples, and then to sort the updated candidate list according to the cost value to obtain a sorted candidate list, and the sorted candidate list is determined as the first candidate list of the current block.

[0204] It should be noted that in the embodiments of the present application, the updated candidate list usually stores at most 12 sets of candidate filter parameters, and the first candidate list can include at least part of the candidate filter parameters in the updated candidate list. For example, after the 12 sets of candidate filter parameters in the updated candidate list are sorted from small to large according to the template cost, only the first 6 sets of candidate filter parameters after sorting can be selected to form the first candidate list of the current block, but no specific limitation is made.

[0205] It should be further noted that in the embodiments of the present application, the obtained at least one set of candidate filter parameters can be updated into the first candidate list, and similarly, the aforementioned obtained at least one set of candidate filter parameter combination can also be updated into the first candidate list. In this way, the mode index in the code stream can be used to indicate a set of candidate filter parameters in the first candidate list, or can also indicate a set of candidate filter parameter combination (including at least two sets of candidate filter parameters) in the first candidate list, and no specific limitation is made here.

[0206] S804, determine the filter parameter of the current block according to the first candidate list and the mode index.

[0207] S805, determine the prediction sample of the current block according to the filter parameter.

[0208] In the embodiments of the present application, after the first candidate list of the current block is determined, the mode information of the current block can be determined according to the second candidate list and the mode index in the code stream, at this time, the determined mode information is directly determined as the filter parameter of the current block, that is, the EIP information corresponding to the mode index in the first candidate list, which can include the shape of the filter and the coefficient of the filter. In this way, the samples in the current block are predicted according to the shape of the filter and the coefficient of the filter, and the prediction sample of the current block is determined.

[0209] Exemplarily, taking the number of 15 filter coefficients as an example, the calculation formula of the prediction sample of the current block is as follows:

[0210] In the above formula (4), pred (x,y) is the prediction value of the coordinate (x, y) in the current block, c i is the coefficient of the filter, is the reconstructed sample point or the prediction sample point, and b is a constant term. For example, taking a square filter as an example, the tap position at the top left corner is the last sample of the input sample, and the sample input here is a constant term input, which is not the input of the reconstructed sample or the prediction sample. Similarly, for the horizontal matrix filter and the vertical rectangular filter, the tap position at the top left corner is also the last sample of the input sample, and the sample input here is a constant term input.

[0211] In some embodiments, when the filter parameter is at least two groups of filter parameters indicated by the filter combination, predicting the samples in the current block according to the filter parameter to determine the prediction sample of the current block can include: when one or more samples of the current block satisfy a first condition, selecting a first group of filter parameters from the at least two groups of filter parameters, and predicting the one or more samples according to the first group of filter parameters to determine the prediction value of the one or more samples; when the one or more samples of the current block satisfy a second condition, selecting a second group of filter parameters from the at least two groups of filter parameters, and predicting the one or more samples according to the second group of filter parameters to determine the prediction value of the one or more samples.

[0212] In the embodiments of the present application, the mode index is used to indicate a set of candidate filter parameter combinations (i.e., at least two sets of candidate filter parameters). For example, assuming that the at least two sets of candidate filter parameters include a first set of filter parameters and a second set of filter parameters, when one or more samples of the current block satisfy a first condition, the first set of filter parameters can be selected to predict the one or more samples, and the prediction values of the one or more samples are determined; when the one or more samples of the current block satisfy a second condition, the second set of filter parameters can be selected to predict the one or more samples, and the prediction values of the one or more samples are determined.

[0213] In some embodiments, the method can further include determining a first reference value corresponding to the one or more samples of the current block; determining that the one or more samples of the current block satisfy the first condition when the first reference value is greater than the sample reference value; and determining that the one or more samples of the current block satisfy the second condition when the first reference value is less than the sample reference value.

[0214] In the embodiments of the present application, the one or more samples of the current block can be all or part of the samples in the current block. For the case where the first reference value is equal to the sample reference value, it can be determined that the one or more samples satisfy the first condition, and the first set of filter parameters is used to predict the one or more samples; or it can also be determined that the one or more samples satisfy the second condition, and the second set of filter parameters is used to predict the one or more samples, which is not limited herein.

[0215] In the embodiments of the present application, the first set of filter parameters and the second set of filter parameters are determined based on two sets of reconstructed samples of the reference region divided by the sample reference value. That is, the sample reference value can be obtained based on the reconstructed samples of the reference region. For example, the sample reference value can include a sample mean or a sample median. The sample mean can be obtained by performing mean calculation on the reconstructed samples in the reference region, and the sample median can also be referred to as a sample median, which is the number in the middle position of the reconstructed samples in the reference region. In addition, the sample reference value can also be other sample values, such as a preset value, which is not limited herein.

[0216] Exemplarily, if the first set of reconstructed samples are the reconstructed samples greater than the sample reference value in the reference region, and the second set of reconstructed samples are the reconstructed samples less than the sample reference value in the reference region, the first set of filter parameters can be calculated according to the first set of reconstructed samples, and the second set of filter parameters can be calculated according to the second set of reconstructed samples. Then, for the first reference value corresponding to one or more samples of the current block, if the first reference value is greater than the sample reference value, i.e., the one or more samples satisfy the first condition, the first set of filter parameters can be selected to predict the one or more samples, and the prediction value of the one or more samples is determined; if the first reference value is less than the sample reference value, i.e., the one or more samples satisfy the second condition, the second set of filter parameters can be selected to predict the one or more samples, and the prediction value of the one or more samples is determined.

[0217] It can also be understood that, in the embodiments of the present application, if the value of the first syntax element is the second value, i.e., the first syntax element indicates that the current block does not use the EIP merge mode, the EIP prediction based on calculation can be performed. Referring to FIG. 12, after step S801, the method can further include:

[0218] S1201, when the first syntax element indicates that the current block does not use the merge mode of the first intra prediction technology, determining a third candidate list of the current block.

[0219] In the embodiments of the present application, if the current block uses the EIP technology and does not use the EIP merge mode, the third candidate list of the current block can be determined. The third candidate list can include at least one set of candidate mode information, and the candidate mode information at this time includes the shape of the candidate template region and the candidate filter.

[0220] In some embodiments, the third candidate list of the current block is determined, and the method can include: determining the shape of at least one candidate template region and at least one candidate filter according to the width and height of the current block; and determining the third candidate list of the current block according to the shape of the at least one candidate template region and the at least one candidate filter.

[0221] In the embodiments of the present application, the candidate template region can include at least one of the following: an upper template region, and / or a left template region. The shape of the candidate filter can include at least one of the following: a square filter, a horizontal matrix filter, and a vertical rectangular filter.

[0222] In a specific embodiment, there are at most three shapes of the candidate filter, such as a square filter, a horizontal matrix filter and a vertical rectangular filter, as shown in FIG. 1A, FIG. 1B and FIG. 1C. There are at most three template regions, such as only an upper template region, or only a left template region, or both an upper template region and a left template region, as shown in FIG. 2A, FIG. 2B and FIG. 2C. In this way, the decoding end can obtain at most nine groups of candidate mode information by combining different candidate template regions and different shapes of the filter, i.e., the maximum length of the third candidate list is 9.

[0223] It should be further noted that, in the embodiments of the present application, the candidate mode information allowed to be used by the current block can be determined according to the width and height of the current block, and the candidate mode information allowed to be used by the current block is used to form the third candidate list.

[0224] For example, if the size of the current block is relatively small, such as a 4x4 current block, the template region can only have one option, i.e., both an upper template region and a left template region, and combined with the three shapes of the candidate filter, three groups of candidate mode information can be obtained, i.e., the third candidate list only includes three groups of candidate mode information.

[0225] That is, in the embodiments of the present application, according to the width and height of the current block, the shape of the candidate filter can only select one, two or three shapes, and the candidate template region can only select one, two or three template regions. In this way, according to the combination of at least one candidate template region and at least one shape of the candidate filter, the third candidate list of the current block can be obtained.

[0226] S1202, determining the mode information of the current block according to the third candidate list and the mode index.

[0227] S1203, determining the filter parameter of the current block according to the mode information.

[0228] S1204, determining the prediction sample of the current block according to the filter parameter.

[0229] In the embodiments of the present application, after the third candidate list is determined, the candidate mode information corresponding to the mode index in the third candidate list can be determined as the mode information of the current block. The mode information herein can include the template region and the shape of the filter.

[0230] In the embodiments of the present application, the filtering parameter of the current block can include the shape of the filter and the coefficient of the filter. Accordingly, in some embodiments, determining the filtering parameter of the current block according to the mode information can include: determining the shape of the filter and the template region of the current block according to the mode information; determining the input sample and the output sample of the filter according to the template region of the current block; and determining the coefficient of the filter according to the filter training based on the input sample and the output sample of the filter.

[0231] In the embodiments of the present application, the coefficient of the filter can also be referred to as "filter coefficient" or "filtering coefficient". Here, since the mode information includes the template region and the shape of the filter, the input sample and the output sample of the filter can be determined according to the template region, and then the coefficient of the filter can be obtained by calculation based on the input sample and the output sample of the filter.

[0232] In this way, in the embodiments of the present application, after determining the third candidate list of the current block, the mode information of the current block can be determined according to the third candidate list and the mode index in the code stream, and at this time, the filtering parameter of the current block, such as the shape of the filter and the coefficient of the filter, can be further determined according to the determined mode information. In this way, the prediction sample of the current block can be obtained by predicting the sample in the current block according to the shape of the filter and the coefficient of the filter, as shown in the above formula (5).

[0233] It can also be understood that, in the embodiments of the present application, the extrapolation filter (i.e. the EIP filter) can be applied to the intraTMP technology, that is, the extrapolation filter prediction technology can be used for each block vector candidate of the intraTMP technology, and the embodiments of the present application only need an additional syntax element to indicate whether the technology is used.

[0234] It can also be understood that, in the embodiments of the present application, the calculation of the extrapolation filter based on the block vector reference region can divide the reconstructed samples of these reference regions, for example, grouping according to the sample mean / sample median, and calculating an extrapolation filter for each group respectively.

[0235] It can also be understood that, in the embodiments of the present application, the relevant information of the corresponding reference block is obtained according to the block vector obtained in the foregoing, and if the reference block has EIP information, the EIP information can be directly used as a group of candidates of the current block for predicting the sample in the current block.

[0236] It can also be understood that, in the embodiments of the present application, for the inter-coded type image, the motion vector can be used as a candidate to obtain the corresponding reference region, and then the filter training is performed according to the reference region, and the EIP information (such as the shape of the filter and the coefficient of the filter) obtained by the training is used as a group of candidates of the current block for predicting the sample in the current block.

[0237] The embodiment of the present application provides a decoding method, parsing a first syntax element in a code stream and a mode index of a current block using a first intra prediction technology; when the first syntax element indicates that the current block uses a merge mode of the first intra prediction technology, determining at least one vector parameter of the current block, determining at least one group of candidate filter parameters of the current block according to the at least one vector parameter; determining a first candidate list of the current block according to the at least one group of candidate filter parameters; determining a filter parameter of the current block according to the first candidate list and the mode index; and predicting samples in the current block according to the filter parameter to determine predicted samples of the current block. In this way, when the current block uses the merge mode of the first intra prediction technology, at least one group of candidate filter parameters of the current block is determined according to at least one vector parameter, and then the at least one group of candidate filter parameters is used as candidate mode information in the first candidate list, thereby expanding the candidate range in the first candidate list; and then the filter parameter determined according to the first candidate list and the mode index obtained by parsing the code stream has good generalization ability, so that the filter parameter can be better applied to sample prediction in the current block; and the prediction according to the determined filter parameter (for example, the coefficient of the filter and the shape of the filter) can also improve the accuracy of the predicted samples of the current block, thereby improving the compression efficiency and further improving the coding and decoding performance.

[0238] In another embodiment of the present application, FIG. 13 is a flowchart of an encoding method according to an embodiment of the present application. As shown in FIG. 13, the method can include the following steps.

[0239] S1301, when the current block uses a merge mode of a first intra prediction technology, determining at least one vector parameter of the current block, determining at least one group of candidate filter parameters of the current block according to the at least one vector parameter, and determining a first candidate list of the current block according to the at least one group of candidate filter parameters, and determining a first cost result corresponding to each of at least one group of candidate mode information in the first candidate list.

[0240] It should be noted that in the embodiment of the present application, when the current block uses the merge mode of the first intra prediction technology, the first candidate list can be determined at this time, wherein the first candidate list can include at least one group of candidate mode information, and the candidate mode information at this time can include the shape of the candidate filter and the coefficient of the candidate filter; and then the first cost result corresponding to each of at least one group of candidate mode information in the first candidate list is calculated.

[0241] It should be noted that, in the embodiments of the present application, for the determination of the first candidate list, at least one vector parameter of the current block can be determined first, and then at least one group of candidate filter parameters of the current block can be determined according to the at least one vector parameter. Here, the vector parameter can include at least one of a motion vector (MV) and a block vector (BV). That is, at least one group of candidate filter parameters of the current block can be determined according to the motion vector parameter, and / or at least one group of candidate filter parameters of the current block can also be determined according to the block vector parameter.

[0242] In the embodiments of the present application, for the determination of the candidate filter parameter, the embodiments of the present application find a coded block similar to the current block in the already coded image, and then perform filter training on the coded block to obtain the corresponding at least one group of candidate filter parameters.

[0243] In the embodiments of the present application, the candidate filter parameter includes a shape of a candidate filter and a coefficient of the candidate filter. The shape of the candidate filter can include at least one of a square filter, a horizontal matrix filter and a vertical rectangular filter, but is not limited thereto.

[0244] The at least one vector parameter of the current block can be determined in the following several possible implementation manners.

[0245] In one possible implementation manner, the at least one vector parameter can include a first vector parameter. In some embodiments, determining the at least one vector parameter of the current block can include determining a first template of the current block, and searching in a coded region according to the first template to determine the first vector parameter of the current block.

[0246] In the embodiments of the present application, the first template of the current block refers to the reconstructed samples adjacent to the periphery of the current block. For example, the first template of the current block can include at least one of an upper template region and / or a left template region. That is, the first template of the current block can refer to the upper template region, or can also refer to the left template region, or can also refer to the upper template region and the left template region. In one specific embodiment, the first template in the embodiments of the present application generally refers to the upper template region and the left template region.

[0247] In some embodiments, the searching in the coded region according to the first template to determine the first vector parameter of the current block can include: searching in the coded region according to the first template to determine one or more first candidate vector parameters; performing cost calculation on the first template respectively according to reference templates corresponding to the one or more first candidate vector parameters to determine cost results corresponding to the one or more first candidate vector parameters; and determining a minimum cost result from the cost results corresponding to the one or more first candidate vector parameters, and determining a candidate vector parameter corresponding to the minimum cost result as the first vector parameter of the current block.

[0248] In the embodiments of the present application, the searching here can refer to coarse searching and / or fine searching. The search step of the coarse searching is greater than the search step of the fine searching, for example, the search step of the coarse searching is equal to 4, and the search step of the fine searching is equal to 1, which is not limited in any way.

[0249] That is, in the embodiments of the present application, the searching in the coded region according to the first template can include: performing coarse searching in the coded region according to the first template with a first search step to determine a first search list; and then determining a search region corresponding to a candidate vector parameter in the first search list, and performing fine searching in the search region corresponding to the candidate vector parameter in the first search list with a second search step to determine one or more first candidate vector parameters. Here, the first search step is greater than the second search step, and the first candidate vector parameter is used to indicate a vector parameter between the first template and a reference template obtained by searching.

[0250] For example, as shown in FIG. 10, R0 to R5 are six search regions corresponding to intraTMP searching. The searching process can include coarse searching and fine searching, and can specifically include: the coarse searching process is to sample the reconstructed sample residues in the allowable search with a step of 4 sample points to obtain a certain number of candidate vector parameters, and the candidate vector parameters are combined to form a coarse search vector parameter candidate list. The fine searching process is to perform traversal searching with a step of 1 on the basis of the coarse search vector parameter candidate list, and to reestablish a fine search vector parameter candidate list according to the distortion cost to determine the first vector parameter of the current block. In addition, in FIG. 10, H represents the height of the current block, and W represents the width of the current block.

[0251] It should be noted that, in the embodiments of the present application, the cost calculation herein can be SAD cost calculation, or can be SATD cost calculation, or can be other cost calculation, such as Sum of Squared Errors (SSE), Mean Absolute Deviation (MAD), Mean Absolute Error (MAE), Mean Square Error (MSE), etc., and is not limited herein.

[0252] Thus, in the embodiments of the present application, the cost results (for example, template errors) corresponding to the one or more first candidate vector parameters are determined by performing cost calculation on the reference templates corresponding to the one or more first candidate vector parameters and the first template respectively; then the minimum template error is determined from the template errors corresponding to the one or more first candidate vector parameters, so as to determine the reference block corresponding to the minimum template error, and then the position difference between the reference block corresponding to the minimum error value and the current block can be used to obtain the candidate vector parameter corresponding to the minimum template error, and the candidate vector parameter is determined as the first vector parameter of the current block.

[0253] In another possible implementation, the at least one vector parameter can further include a second vector parameter. In some embodiments, determining the at least one vector parameter of the current block can include: determining a vector candidate list; and determining the second vector parameter of the current block according to one or more second candidate vector parameters in the vector candidate list.

[0254] In the embodiments of the present application, the vector candidate list is obtained by merge mode, and the process of obtaining the vector parameter is similar to the rules and order of obtaining the EIP information. The vector candidate list includes one or more second candidate vector parameters.

[0255] In some embodiments, determining the vector candidate list can include: determining one or more second candidate vector parameters according to the first reference information of the current block; and determining the vector candidate list according to the one or more second candidate vector parameters; wherein the first reference information of the current block includes at least one of the following: whether the vector parameter exists in the neighboring block of the current block; whether the vector parameter exists in the non-neighboring block of the current block; the first history list of the current block based on the vector parameter; and whether the vector parameter exists in the homologous block of the current block in the reference frame.

[0256] In the embodiments of the present application, the vector parameter herein can be a block vector parameter, and one or more block vector parameters are obtained through the merge mode to construct a vector candidate list. Herein, the vector candidate list can be referred to as a block vector merge candidate list (BV Merge list), and the first history list can be referred to as a history-based block vector list (history-based BV list). Exemplarily, for determining the vector candidate list, the specific operation process is as follows: firstly, whether the already encoded neighboring blocks and non-neighboring blocks have block vectors is obtained by checking the spatial positions, such as neighboring blocks and non-neighboring blocks, and if yes, the block vectors are added to the vector candidate list; secondly, the block vectors are obtained by traversing the first history list and added to the vector candidate list; finally, the block vectors are obtained by traversing the temporal block vector information, and the block vectors are obtained by obtaining the same-position blocks and the neighboring blocks around the same-position blocks in the reference frame and added to the vector candidate list. In the above process, a duplicate checking operation is simultaneously performed, and if the obtained block vector is the same as a candidate in the vector candidate list, the block vector is not added to the vector candidate list, otherwise, the block vector is added to the vector candidate list.

[0257] It is also necessary to note that for the construction of the first history list, the first history list is constructed according to the same rule in the coding process, and the first history list only saves block vector information. Herein, the latest block vector information of the first history list is obtained, and a duplicate checking operation is performed, and if there is no same, the block vector is added to the vector candidate list. Among them, after the encoding end completes the merge mode prediction of the current block, the corresponding block vector information needs to be saved into the first history list, and if the first history list is full, the first-in-first-out principle is used to update the first history list, and the candidate added to the first history list at the earliest is removed, so as to keep the update of the first history list.

[0258] In some embodiments, determining the second vector parameter of the current block according to one or more second candidate vector parameters in the vector candidate list can include: determining the candidate vector parameter at the first position in the vector candidate list as the second vector parameter of the current block.

[0259] In the embodiments of the present application, after the vector candidate list is determined, the candidate vector parameter at a preset position in the vector candidate list can be determined as the second vector parameter of the current block. Exemplarily, the candidate vector parameter at the first position in the vector candidate list (i.e., the first element in the list) can be selected to determine as the second vector parameter of the current block.

[0260] In some embodiments, determining the second vector parameter of the current block according to the one or more second candidate vector parameters in the vector candidate list can further include: determining reference templates corresponding to the one or more second candidate vector parameters; respectively performing cost calculation on the reference templates corresponding to the one or more second candidate vector parameters and the first template of the current block to determine cost results corresponding to the one or more second candidate vector parameters; determining a minimum cost result from the cost results corresponding to the one or more second candidate vector parameters, and determining a candidate vector parameter corresponding to the minimum cost result as the second vector parameter of the current block.

[0261] In the embodiments of the present application, after the vector candidate list is determined, the reference template corresponding to each candidate vector parameter in the vector candidate list can be determined respectively, and then cost calculation is performed on the reference template corresponding to each candidate vector parameter and the first template of the current block to determine the cost result corresponding to each candidate vector parameter, the minimum cost result is determined from the cost results, and the candidate vector parameter corresponding to the minimum cost result is determined as the second vector parameter of the current block. For example, the minimum template error is determined from the cost results, and the candidate vector parameter corresponding to the minimum template error (i.e. the position difference between the reference block corresponding to the minimum error value and the current block) is determined as the second vector parameter of the current block.

[0262] In another possible implementation, the at least one vector parameter can further include a third vector parameter. In some embodiments, determining the at least one vector parameter of the current block can include: determining one or more candidate reference blocks based on a search of the current block in the current image; performing cost calculation on the one or more candidate reference blocks and the current block respectively to determine cost results corresponding to the one or more candidate reference blocks, and determining a minimum cost result from the cost results corresponding to the one or more candidate reference blocks, and determining a candidate reference block corresponding to the minimum cost result as a matching block; determining the third vector parameter of the current block according to the vector parameter between the current block and the matching block.

[0263] In some embodiments, the method can further include: encoding the third vector parameter of the current block, and writing the obtained encoded bits into a bitstream.

[0264] In the embodiments of the present application, the encoding end can also obtain the corresponding third vector parameter through motion / block search. For example, the encoding end can obtain the matching block with the minimum error by searching the sample block of the current block in the original image, and the position difference between the matching block and the current block is the third vector parameter of the current block. Here, the third vector parameter needs to be written into the bitstream and transmitted to the decoding end, so that the decoding end can obtain the third vector parameter by parsing the bitstream.

[0265] It should be noted that in the embodiments of the present application, after obtaining the at least one vector parameter (for example, the first vector parameter, the second vector parameter and the third vector parameter, etc.), the method can further include: adding the at least one vector parameter to the preset storage area and / or the first history list based on the vector parameter.

[0266] Exemplarily, taking the searched first vector parameter as an example, after saving the first vector parameter to the preset storage area and / or the first history list, the first vector parameter can be provided for subsequent coding blocks. If the subsequent coding block uses the IBC or the intra TMP technology, when the BV Merge list is constructed, if the current block is accessed and the current block uses the EIP merge technology, the vector parameter of the current block can be directly obtained from the preset storage area and / or the first history list, and the vector parameter is used as a candidate vector parameter in the BV Merge list of the subsequent coding block.

[0267] It should be noted that in the embodiments of the present application, after obtaining the at least one vector parameter (for example, the first vector parameter, the second vector parameter and the third vector parameter, etc.), at least one group of candidate filter parameters can be determined according to the at least one vector parameter. Wherein, the above-mentioned first vector parameter, the second vector parameter and the third vector parameter obtained can be used as the vector parameter for determining the candidate filter parameter, or only the first vector parameter can be used as the vector parameter for determining the candidate filter parameter, or the first vector parameter and the second vector parameter can be used as the vector parameter for determining the candidate filter parameter, or even all the candidate vector parameters in the vector candidate list can be used as the vector parameter for determining the candidate filter parameter, which is not limited here.

[0268] In some embodiments, according to the at least one vector parameter, at least one group of candidate filter parameters is determined. Taking the current vector parameter as an example, the method can include: determining a reference area indicated by the current vector parameter; determining training samples corresponding to at least one candidate filter according to the reconstructed samples of the reference area; and performing filter training according to the training samples corresponding to the at least one candidate filter to determine at least one group of candidate filter parameters corresponding to the current vector parameter, wherein the candidate filter parameters include a shape of the candidate filter and a coefficient of the candidate filter.

[0269] In the embodiments of the present application, the current vector parameter is any one of the at least one group of candidate filter parameters. The reference region includes a reference block and / or a reference template. Here, the reconstructed samples of the reference region can include the reconstructed samples corresponding to the size and position of the current block (i.e., the reconstructed samples in the reference block), can also include the reconstructed samples adjacent to the periphery of the reference block (i.e., the reconstructed samples in the reference template), and can even include all the reconstructed samples in the reference block and the reference template, such as the diagonal hatched area in FIG. 4; here, no limitation is made.

[0270] In the embodiments of the present application, if only one vector parameter is included in the at least one vector parameter, then the corresponding reference region can be obtained according to the one vector parameter, and then the at least one group of candidate filter parameters can be calculated according to the reference region; if multiple vector parameters are included in the at least one vector parameter, then multiple reference regions can be obtained according to the multiple vector parameters, and then the at least one group of candidate filter parameters can be calculated according to the multiple reference regions, which is not specifically limited here.

[0271] In the embodiments of the present application, since the shape of the filter can include at least one of a square filter, a horizontal matrix filter and a vertical rectangular filter, different training samples can be obtained under different shapes of the filter, so that different coefficients of the filter can be trained. Here, the coefficients of the filter can also be referred to as "filter coefficients" or "filtering coefficients".

[0272] In the embodiments of the present application, according to the reconstructed samples of the reference region, the input samples and the output samples of the candidate filter can be determined in combination with the shape of the candidate filter, and then the input samples and the output samples of the candidate filter are calculated to obtain the coefficients of the candidate filter, such as the filtering coefficient calculation of the aforementioned formula (3); so that the at least one group of candidate filter parameters corresponding to each vector parameter can be determined.

[0273] In some embodiments, the method can further include: dividing the reconstructed samples of the reference region to determine at least two groups of reconstructed samples; determining the training samples corresponding to at least one candidate filter combination according to the at least two groups of reconstructed samples, wherein the candidate filter combination includes the candidate filters corresponding to the at least two groups of reconstructed samples respectively; performing filter training according to the training samples corresponding to the at least one candidate filter combination to determine the at least one group of candidate filter parameter combinations corresponding to the current vector parameter.

[0274] In the embodiments of the present application, the candidate filter parameter combination can include at least two candidate filter parameter sets corresponding to the respective at least two groups of reconstructed samples. Here, the reconstructed samples of the reference region can be divided into at least two groups of reconstructed samples, and then filter training can be performed on the at least two groups of reconstructed samples respectively to obtain at least one candidate filter combination. The number of candidate filters included in the candidate filter combination is related to the number of groups of reconstructed samples. For example, if the reconstructed samples of the reference region are divided into two groups of reconstructed samples, then each candidate filter combination includes two candidate filters, and correspondingly, each candidate filter parameter combination includes two candidate filter parameter sets, such as a first filter parameter set and a second filter parameter set. In this way, according to the condition of one or more samples in the current block, the first filter parameter set can be adaptively selected for prediction or the second filter parameter set can be adaptively selected for prediction.

[0275] That is, in the embodiments of the present application, the candidate filter parameters calculated according to the reconstructed samples of the reference region can be only one candidate filter parameter set, or can be at least one candidate filter parameter combination. In other words, here, the candidate filter parameter set can be used to act on the current block, or at least two candidate filter parameter sets can be used to simultaneously act on the current block, and no limitation is made to this.

[0276] In a possible implementation, dividing the reconstructed samples of the reference region into at least two groups of reconstructed samples can include: determining a sample reference value corresponding to the reference region; when a first reconstructed sample in the reference region is greater than the sample reference value, dividing the first reconstructed sample into a first group of reconstructed samples in the at least two groups of reconstructed samples; and when the first reconstructed sample in the reference region is less than the sample reference value, dividing the first reconstructed sample into a second group of reconstructed samples in the at least two groups of reconstructed samples.

[0277] In the embodiments of the present application, the first reconstructed sample can be any reconstructed sample in the reference region. For the case that the first reconstructed sample in the reference region is equal to the sample reference value, the first reconstructed sample can be divided into the first group of reconstructed samples in the at least two groups of reconstructed samples, or can be divided into the second group of reconstructed samples in the at least two groups of reconstructed samples, and no limitation is made to this.

[0278] In the embodiments of the present application, the sample reference value can include a sample mean value or a sample median value. The sample mean value can be obtained by performing mean value calculation on the reconstructed samples in the reference region, and the sample median value can also be referred to as a sample median, which is a number in the reconstructed samples in the reference region that is in the middle position. In addition, the sample reference value can also be other sample values, such as a preset value, and no limitation is made to this.

[0279] For example, if the sample reference value is the sample mean, if the first reconstructed sample in the reference region is greater than the sample mean, the first reconstructed sample is divided into the first group of reconstructed samples; if the first reconstructed sample in the reference region is less than the sample mean, the first reconstructed sample is divided into the second group of reconstructed samples. Or, if the sample reference value is the sample median, if the first reconstructed sample in the reference region is greater than the sample median, the first reconstructed sample is divided into the first group of reconstructed samples; if the first reconstructed sample in the reference region is less than the sample median, the first reconstructed sample is divided into the second group of reconstructed samples. In this way, after obtaining at least one group of candidate filter parameter combinations, the samples in the current block can be predicted using multiple groups of filter parameters, thereby improving the prediction accuracy of the current block.

[0280] In another possible implementation, if the current block is an inter-coded type block, and a motion vector parameter can be used as at least one vector parameter of the current block, a corresponding reference region can also be determined according to the motion vector parameter, and then the training samples corresponding to at least one candidate filter are determined according to the reconstructed samples of the reference region; and filter training is performed according to the training samples corresponding to the at least one candidate filter, so that at least one group of candidate filter parameters corresponding to the current vector parameter can be determined.

[0281] In yet another possible implementation, after determining the vector candidate list, the method can further include: determining the reference region indicated by each of the one or more second candidate vector parameters according to the one or more second candidate vector parameters; determining the candidate filter parameter corresponding to each of the one or more second candidate vector parameters according to the reference region indicated by each of the one or more second candidate vector parameters; and determining at least one group of candidate filter parameters of the current block according to the candidate filter parameter corresponding to each of the one or more second candidate vector parameters.

[0282] In the embodiments of the present application, the reference region indicated by each of the one or more second candidate vector parameters is determined according to the one or more second candidate vector parameters, and in a specific embodiment, the method can further include: determining the reference region indicated by the current vector parameter; determining the training samples corresponding to at least one candidate filter according to the reconstructed samples of the reference region; and performing filter training according to the training samples corresponding to the at least one candidate filter, to determine at least one group of candidate filter parameters corresponding to the current vector parameter. Here, the current vector parameter is any one of the one or more second candidate vector parameters.

[0283] That is, in the embodiments of the present application, for one or more second candidate vector parameters in the vector candidate list, each second candidate vector parameter can determine a respective indicated reference region, and according to the reference region, a respective corresponding candidate filter parameter can be determined, i.e. at least one group of candidate filter parameters corresponding to each second candidate vector parameter, and then all the obtained candidate filter parameters are taken as the candidate mode information in the first candidate list.

[0284] In yet another possible implementation, the at least one group of candidate filter parameters of the current block is determined according to the at least one vector parameter, and the method can further include: determining a respective indicated reference block of the at least one vector parameter; obtaining a filter parameter of the reference block when the reference block uses the first intra prediction technology; and taking the filter parameter of the reference block as the at least one group of candidate filter parameters of the current block.

[0285] In the embodiments of the present application, according to the obtained vector parameter, a corresponding reference block can be obtained. If the reference block uses the EIP technology, a filter parameter of the reference block, such as a shape of a filter and a coefficient of the filter, can be obtained, and then the filter parameter of the reference block is taken as the at least one group of candidate filter parameters of the current block.

[0286] Exemplarily, in the respective indicated reference blocks of the at least one vector parameter, if a first reference block uses the first intra prediction technology, a filter parameter of the first reference block, such as a shape of a filter and a coefficient of the filter, can be obtained, and then the filter parameter of the first reference block is taken as the at least one group of candidate filter parameters of the current block. The first reference block can be any one of the respective indicated reference blocks of the at least one vector parameter, and in this way, the at least one group of candidate filter parameters of the current block can be obtained.

[0287] It can be understood that after the at least one group of candidate filter parameters is determined, a first candidate list of the current block can be determined according to the at least one group of candidate filter parameters. In some embodiments, determining the first candidate list of the current block according to the at least one group of candidate filter parameters can include: determining a second candidate list of the current block; and determining the first candidate list of the current block according to the at least one group of candidate filter parameters and the second candidate list.

[0288] In the embodiments of the present application, if the current block uses the EIP technology and uses the EIP merge mode, a second candidate list of the current block can be determined first. The second candidate list can include the at least one group of candidate filter parameters, and the candidate filter parameter includes a shape of a candidate filter and a coefficient of the candidate filter.

[0289] In some embodiments, determining the second candidate list of the current block can comprise: determining at least one set of second candidate filter parameters according to the second reference information of the current block; and determining the second candidate list of the current block according to the at least one set of second candidate filter parameters.

[0290] In the embodiments of the present application, the second reference information of the current block comprises at least one of the following: whether a neighboring block of the current block uses the first intra prediction technology; whether a non-neighboring block of the current block uses the first intra prediction technology; whether a temporal collocated block of the current block uses the first intra prediction technology; and a second history list of the current block based on the first intra prediction technology.

[0291] For example, for determining the second candidate list of the current block, the specific operation process is as follows:

[0292] Firstly, the EIP merge mode obtains the EIP information of the neighboring block and the non-neighboring block on the spatial domain of the current block, for example, the EIP information can comprise the shape of the filter and the coefficient of the filter, and adds the EIP information to the second candidate list. For example, by searching the positions as shown in FIG. 3, the coding blocks corresponding to the labels are checked in sequence to determine whether the coding blocks use the EIP technology, if the coding blocks use the EIP technology, the EIP information corresponding to the positions is obtained; and the obtained EIP information is checked with the EIP candidate filter parameters in the second candidate list, if the obtained EIP information is the same as a candidate in the second candidate list, the EIP information is not added to the second candidate list, otherwise, the EIP information is added to the second candidate list.

[0293] Secondly, the EIP merge mode checks whether the temporal information can be used, if the condition is met, the EIP information of the collocated block in the reference frame and the EIP information of the collocated block of the offset motion vector are obtained. The checking operation is also performed, if the obtained EIP information does not exist in the second candidate list, the EIP information is added to the second candidate list. Here, the reference frame can be the collocated frame obtained from the reference list 0, and / or can also be the collocated frame obtained from the reference list 1.

[0294] Finally, the EIP merge mode obtains the EIP information in the second history list (i.e. the EIP history list). The second history list is constructed according to the same rule in the coding process, and the second history list only saves the EIP information. The EIP merge mode obtains the latest EIP information in the second history list, and performs the checking operation, if there is no same, the EIP information is added to the second candidate list. Here, the encoding end needs to save the corresponding EIP information into the second history list after completing the EIP prediction of the current block, if the second history list is full, the second history list is updated according to the principle of first in first out, and the candidate added to the second history list earliest is removed, so as to keep the update of the second history list.

[0295] Thus, after the second candidate list of the EIP merge mode is constructed, at least one set of candidate filter parameters can be added to the second candidate list to determine the first candidate list of the current block.

[0296] In some embodiments, determining the first candidate list of the current block according to the at least one set of candidate filter parameters and the second candidate list can include: updating the second candidate list based on the at least one set of candidate filter parameters to obtain an updated candidate list; performing cost calculation on the template region of the current block based on at least one set of candidate filter parameters in the updated candidate list to determine a respective cost result of the at least one set of candidate filter parameters in the updated candidate list; and sorting the at least one set of candidate filter parameters in the updated candidate list according to the cost results to determine the first candidate list of the current block.

[0297] In the embodiments of the present application, the second candidate list is updated based on the at least one set of candidate filter parameters, specifically, the at least one set of candidate filter parameters is added to the second candidate list, and a duplicate checking operation is also required in this process. In some embodiments, updating the second candidate list based on the at least one set of candidate filter parameters can include: adding the first candidate filter parameter to the second candidate list when the first candidate filter parameter does not exist in the second candidate list; and skipping the step of adding the first candidate filter parameter to the second candidate list when the first candidate filter parameter exists in the second candidate list; wherein the first candidate filter parameter is any one of the at least one set of candidate filter parameters.

[0298] That is, in the embodiments of the present application, if the first candidate filter parameter has appeared in the second candidate list, the first candidate filter parameter can be skipped and not added to the second candidate list; and if the first candidate filter parameter has not appeared in the second candidate list, the first candidate filter parameter can be added to the second candidate list to update the second candidate list.

[0299] Further, for the obtained updated candidate list, the at least one set of candidate filter parameters in the updated candidate list can be used to predict the template region using the reconstructed samples adjacent to the current block as the template region to obtain the template region prediction samples corresponding to each set of candidate filter parameters, and the cost value (such as SAD cost value or SATD cost value) between the template prediction samples and the template reconstructed samples is calculated, and then the updated candidate list is sorted according to the cost value to obtain a sorted candidate list, and the sorted candidate list is determined as the first candidate list of the current block.

[0300] It should be noted that in the embodiments of the present application, generally, the updated candidate list stores at most 12 sets of candidate filter parameters, and the first candidate list can include at least part of the candidate filter parameters in the updated candidate list. For example, after the 12 sets of candidate filter parameters in the updated candidate list are sorted in ascending order according to the template cost, the first 6 sets of candidate filter parameters after the sorting can be selected to form the first candidate list of the current block, but no specific limitation is made.

[0301] It should be further noted that in the embodiments of the present application, the obtained at least one set of candidate filter parameters can be updated into the first candidate list, and similarly, the obtained at least one set of candidate filter parameter combination can also be updated into the first candidate list. In this way, the mode index in the code stream can be used to indicate a set of candidate filter parameters in the first candidate list, or can also be used to indicate a set of candidate filter parameter combination (including at least two sets of candidate filter parameters) in the first candidate list, and no specific limitation is made herein.

[0302] It should be further noted that in the embodiments of the present application, when the current block uses the merge mode of the first intra prediction technology, i.e., the current block uses the EIP prediction based on merging, the first candidate list can be determined, and further, the first cost result corresponding to each set of candidate in the first candidate list can be determined. In some embodiments, taking the first set of candidate mode information in the first candidate list as an example, the determination of the first cost result corresponding to each set of candidate mode information in the first candidate list can include: determining the first set of candidate filter parameters according to the first set of candidate mode information in the first candidate list; determining the first candidate prediction sample of the current block according to the first set of candidate filter parameters; and performing cost calculation according to the first candidate prediction sample of the current block and the original image sample of the current block to obtain the first cost result corresponding to the first set of candidate mode information. The first set of candidate mode information is any set of candidate mode information in the first candidate list.

[0303] In the embodiments of the present application, taking the first set of candidate mode information in the first candidate list as an example, the first set of candidate filter parameters is the candidate filter parameter determined according to the first set of candidate mode information, for example, the first set of candidate filter parameters can include the shape of the candidate filter and the coefficient of the candidate filter. That is, the first candidate prediction sample of the current block can be determined by predicting the samples in the current block according to the shape of the candidate filter and the coefficient of the candidate filter in the first set of candidate filter parameters; and the first cost result corresponding to the first set of candidate filter parameters can be obtained by performing cost calculation according to the first candidate prediction sample of the current block and the original image sample. Here, the cost calculation can also be rate-distortion cost calculation, or can be SAD or SATD cost calculation, or can also be other cost calculation, such as SSE, MAD, MAE, MSE, etc., and no specific limitation is made.

[0304] Exemplarily, taking the rate-distortion cost calculation as an example, at least one set of candidate mode information in the first candidate list is traversed, and a rate-distortion cost result between candidate prediction samples of the current block obtained by each set of candidate mode information and original image samples is calculated. The minimum rate-distortion cost result at this time is the minimum cost result in the first cost result, that is, the minimum cost result of the current block using the EIP merge mode.

[0305] S1302, when the current block does not use the merge mode of the first intra prediction technology, determining a third candidate list of the current block, and determining a second cost result corresponding to each of at least one set of candidate mode information in the third candidate list.

[0306] In the embodiments of the present application, step S1301 and step S1302 can be executed in parallel, or can be executed sequentially, or can be executed first step S1302, and then step S1301, which is not limited here.

[0307] It should be noted that in the embodiments of the present application, when the current block does not use the merge mode of the first intra prediction technology, that is, the current block uses the EIP prediction based on calculation, the third candidate list can be determined at this time. The third candidate list can include at least one set of candidate mode information, and the candidate mode information at this time includes the shape of the candidate template region and the candidate filter; and the second cost result corresponding to each of at least one set of candidate mode information in the third candidate list is calculated.

[0308] It should be further noted that in the embodiments of the present application, for the determination of the third candidate list, the method can include: determining at least one candidate template region and at least one shape of the candidate filter according to the width and height of the current block; and determining the third candidate list according to at least one candidate template region and at least one shape of the candidate filter.

[0309] In the embodiments of the present application, the candidate template region can include at least one of the following: an upper template region, and / or a left template region. The shape of the candidate filter can include at least one of the following: a square filter, a horizontal matrix filter, and a vertical rectangular filter.

[0310] In a specific embodiment, there are at most three shapes of the candidate filter, such as a square filter, a horizontal matrix filter and a vertical rectangular filter, as shown in FIG. 1A, FIG. 1B and FIG. 1C. There are at most three template regions of the candidate template region, such as only including the upper template region, or only including the left template region, or including both the upper template region and the left template region, as shown in FIG. 2A, FIG. 2B and FIG. 2C. In this way, the decoding end can obtain at most nine groups of candidate mode information by combining different candidate template regions and different shapes of the filter, i.e., the maximum length of the third candidate list is 9.

[0311] It should be further noted that, in the embodiments of the present application, the candidate mode information allowed to be used by the current block can be determined according to the width and height of the current block, and the candidate mode information allowed to be used by the current block is used to form the third candidate list.

[0312] For example, if the size of the current block is relatively small, such as a 4x4 current block, the template region can only have one option, i.e., including both the upper template region and the left template region, and combined with the three shapes of the candidate filter, three groups of candidate mode information can be obtained, i.e., the third candidate list only includes three groups of candidate mode information.

[0313] That is, in the embodiments of the present application, according to the width and height of the current block, the shape of the candidate filter can only select one, two or three shapes, and the candidate template region can only select one, two or three template regions. In this way, according to the combination of at least one candidate template region and at least one shape of the candidate filter, the third candidate list of the current block can be obtained.

[0314] It can also be understood that, after determining the third candidate list, the second cost result corresponding to each group of candidates can be further determined. In some embodiments, taking the second group of candidate mode information in the third candidate list as an example, the second cost result corresponding to each group of candidate mode information in the third candidate list is determined, and the method can include: determining the second group of candidate filter parameters according to the second group of candidate mode information in the third candidate list; determining the second candidate prediction sample of the current block according to the second group of candidate filter parameters; and performing cost calculation according to the second candidate prediction sample of the current block and the original image sample of the current block to obtain the second cost result corresponding to the second group of candidate mode information. The second group of candidate mode information is any group in the third candidate list.

[0315] In the embodiments of the present application, the second set of candidate filter parameters are candidate filter parameters determined according to the second set of candidate mode information. For example, the second set of candidate filter parameters can include the shape of a candidate filter and the coefficients of the candidate filter. That is, according to the shape of the candidate filter and the coefficients of the candidate filter in the second set of candidate filter parameters, a second candidate prediction sample of the current block can be determined by predicting the samples in the current block; and according to the second candidate prediction sample of the current block and the original image samples, a second cost result corresponding to the second set of candidate filter parameters can be obtained by performing cost calculation. Here, the cost calculation can be rate-distortion cost calculation, or can be SAD or SATD cost calculation, or can be other cost calculation such as SSE, MAD, MAE, MSE, etc., without any limitation.

[0316] For example, taking rate-distortion cost calculation as an example, at least one set of candidate mode information in the third candidate list is traversed, and the rate-distortion cost result between the candidate prediction sample of the current block obtained by each set of candidate mode information and the original image sample is calculated. At this time, the minimum rate-distortion cost result is the minimum cost result in the second cost result, that is, the minimum cost result when the current block does not use the EIP merge mode.

[0317] In S1303, the value of the first syntax element is determined according to the first cost result and the second cost result, where the first syntax element is used to indicate whether the current block uses the merge mode of the first intra prediction technology.

[0318] In S1304, the value of the first syntax element is encoded, and the obtained encoded bits are written into the bitstream.

[0319] In the embodiments of the present application, according to the first cost result and the second cost result, whether the current block uses the merge mode of the first intra prediction technology can be determined. In some embodiments, the method can include: if the minimum cost result in the first cost result is smaller than the minimum cost result in the second cost result, it can be determined that the current block uses the merge mode of the first intra prediction technology; and if the minimum cost result in the first cost result is greater than the minimum cost result in the second cost result, it can be determined that the current block does not use the merge mode of the first intra prediction technology.

[0320] It should be further noted that in the embodiments of the present application, if the minimum cost result in the first cost result is equal to the minimum cost result in the second cost result, at this time the current block can choose to use the merge mode of the first intra prediction technology, or can choose not to use the merge mode of the first intra prediction technology.

[0321] In some embodiments, for determining the value of the first syntax element, the method can comprise: if the minimum cost result in the first cost results is smaller than the minimum cost result in the second cost results, determining the value of the first syntax element as the first value; if the minimum cost result in the first cost results is larger than the minimum cost result in the second cost results, determining the value of the first syntax element as the second value.

[0322] In the embodiments of the present application, the merge mode of the first intra prediction technology refers to the EIP merge mode, and thus the first syntax element can be referred to as the eip_merge flag. In this case, the first syntax element can be represented as eip_merge. That is, if the minimum cost result in the first cost results is smaller than the minimum cost result in the second cost results, i.e., the current block uses the EIP merge mode, the value of eip_merge can be determined as the first value; if the minimum cost result in the first cost results is larger than the minimum cost result in the second cost results, i.e., the current block does not use the EIP merge mode, the value of eip_merge can be determined as the second value.

[0323] In some embodiments, referring to FIG. 14, after step S1302, the method can further comprise:

[0324] S1401, determining a third cost result corresponding to other prediction technologies than the first intra prediction technology and used for predicting the current block.

[0325] In the embodiments of the present application, the encoding end can also traverse other prediction technologies than the first intra prediction technology, and perform cost calculation on the third candidate prediction samples obtained by predicting the samples in the current block according to the other prediction technologies and the original image samples, to obtain the third cost result corresponding to the other prediction technologies. For example, rate-distortion cost calculation is performed on the third candidate prediction samples and the original image samples, to obtain the corresponding rate-distortion cost result. In this case, the minimum rate-distortion cost result is the minimum cost result in the third cost result.

[0326] It should be noted that in the embodiments of the present application, step S1301, step S1302 and step S1401 can be executed in parallel, or can be executed sequentially, or step S1302 can be executed first, and then step S1301 and step S1401 can be executed, and the like, which are not limited herein.

[0327] S1402, determining the value of a second syntax element according to the first cost result, the second cost result and the third cost result, wherein the second syntax element is used to indicate whether the first intra prediction technology is used for the current block.

[0328] S1403, performing encoding processing on the value of the second syntax element, and writing the obtained encoded bits into a bitstream.

[0329] In the embodiments of the present application, the first cost result, the second cost result and the third cost result can be used to determine whether the current block uses the first intra prediction technology. In some embodiments, the method can comprise: if the minimum cost result in the first cost result and the second cost result is smaller than the minimum cost result in the third cost result, it can be determined that the current block uses the first intra prediction technology; if the minimum cost result in the first cost result and the second cost result is larger than the minimum cost result in the third cost result, it can be determined that the current block does not use the first intra prediction technology.

[0330] It should be noted that in the embodiments of the present application, if the minimum cost result in the first cost result and the second cost result is equal to the minimum cost result in the third cost result, the current block can choose to use the first intra prediction technology or can choose not to use the first intra prediction technology.

[0331] In some embodiments, for determining the value of the second syntax element, the method can comprise: if the minimum cost result in the first cost result and the second cost result is smaller than the minimum cost result in the third cost result, determining that the value of the second syntax element is a first value; if the minimum cost result in the first cost result and the second cost result is larger than the minimum cost result in the third cost result, determining that the value of the second syntax element is a second value.

[0332] In the embodiments of the present application, the first intra prediction technology can be the EIP technology, so the second syntax element can also be referred to as the EIP use identification bit, and the second syntax element can be represented by eip_flag at this time. That is, if the minimum cost result in the first cost result and the second cost result is smaller than the minimum cost result in the third cost result, i.e. the current block uses the EIP technology, it can be determined that the value of eip_flag is the first value; if the minimum cost result in the first cost result and the second cost result is larger than the minimum cost result in the third cost result, i.e. the current block does not use the EIP technology, it can be determined that the value of eip_flag is the second value.

[0333] It should be further explained that, in the embodiments of the present application, according to the first cost result, the second cost result and the third cost result, if the minimum cost result in the third cost result is the minimum value among the three, it is determined that the current block does not use the first intra prediction technology, i.e., the current block does not use the EIP technology; if the minimum cost result in the first cost result is the minimum value among the three, it is determined that the current block uses the first intra prediction technology and uses the merge mode of the first intra prediction technology, i.e., the current block uses the EIP technology and uses the EIP merge mode; if the minimum cost result in the second cost result is the minimum value among the three, it is determined that the current block uses the first intra prediction technology and does not use the merge mode of the first intra prediction technology, i.e., the current block uses the EIP technology and does not use the EIP merge mode.

[0334] It can be understood that, in the embodiments of the present application, when the current block uses the EIP technology, the value of eip_merge needs to be written into the code stream, and the optimal mode index also needs to be determined and written into the code stream.

[0335] In some embodiments, when the current block uses the EIP technology and uses the EIP merge mode, the method can further include: when the minimum cost result in the first cost result is smaller than the minimum cost result in the second cost result, determining the first candidate mode information corresponding to the minimum cost result in the first cost result; determining the mode index of the current block using the first intra prediction technology according to the index sequence number of the first candidate mode information in the first candidate list; and performing encoding processing on the mode index of the current block using the first intra prediction technology, and writing the obtained encoding bits into the code stream.

[0336] In the embodiments of the present application, if the minimum cost result in the first cost result is smaller than the minimum cost result in the second cost result, i.e., the current block uses the EIP technology and uses the EIP merge mode, i.e., the EIP prediction based on merging, then the first candidate mode information corresponding to the minimum cost result in the first cost result can be determined, the index sequence number of the first candidate mode information in the first candidate list is determined as the optimal mode index, i.e., the mode index of the current block using the EIP technology; and the encoding processing is performed on the mode index of the current block using the EIP technology, and the obtained encoding bits are written into the code stream.

[0337] In this way, in the embodiments of the present application, after the first candidate mode information corresponding to the minimum cost result in the first cost result is obtained, the method can further include: when the current block uses the first intra prediction technology and the current block uses the merge mode of the first intra prediction technology, determining the filtering parameter of the current block directly according to the first candidate mode information; and predicting the samples in the current block according to the filtering parameter of the current block to determine the prediction samples of the current block.

[0338] That is, in the embodiments of the present application, the current block uses the EIP prediction based on merging, after obtaining the first candidate mode information, the filter parameters of the current block, such as the shape of the filter and the coefficients of the filter, can be directly determined according to the first candidate mode information; then the samples in the current block are predicted according to the shape of the filter and the coefficients of the filter, to determine the prediction samples of the current block, as shown in the foregoing formula (4).

[0339] In some embodiments, when the current block uses the EIP technology and does not use the EIP merging mode, the method can further include: when the minimum cost result in the first cost results is greater than the minimum cost result in the second cost results, determining the second candidate mode information corresponding to the minimum cost result in the second cost results; determining the mode index of the current block using the first intra prediction technology according to the index sequence number of the second candidate mode information in the third candidate list; and performing encoding processing on the mode index of the current block using the first intra prediction technology, and writing the obtained encoding bits into the bitstream.

[0340] In the embodiments of the present application, if the minimum cost result in the first cost results is greater than the minimum cost result in the second cost results, that is, the current block uses the EIP technology and does not use the EIP merging mode, that is, the EIP prediction based on calculation, then the second candidate mode information corresponding to the minimum cost result in the second cost results can be determined, the index sequence number of the second candidate mode information in the third candidate list is determined as the optimal mode index, that is, the mode index of the current block using the EIP technology; and the encoding processing is performed on the mode index of the current block using the EIP technology, and the obtained encoding bits are written into the bitstream.

[0341] In this way, in the embodiments of the present application, after obtaining the second candidate mode information corresponding to the minimum cost result in the second cost results, the method can further include: when the current block uses the first intra prediction technology and the current block does not use the merging mode of the first intra prediction technology, determining the filter parameters of the current block according to the second candidate mode information corresponding to the minimum cost result in the second cost results; and predicting the samples in the current block according to the filter parameters of the current block, to determine the prediction samples of the current block.

[0342] That is, in the embodiments of the present application, the second candidate mode information can include the shape of the filter and the template region, and the filter parameters of the current block can include the shape of the filter and the coefficients of the filter. In this way, the current block uses the EIP prediction based on calculation, after obtaining the second candidate mode information, the coefficients of the filter can be determined according to the input samples and the output samples in the template region; then the samples in the current block are predicted according to the shape of the filter and the coefficients of the filter, to determine the prediction samples of the current block, as shown in the foregoing formula (4).

[0343] It can also be understood that, before determining whether the current block uses the first intra prediction technology, it is also necessary to determine whether the current sequence allows the first intra prediction technology to be used and to determine the prediction type of the current block. In the embodiments of the present application, a third syntax element can be used to indicate whether the current sequence allows the first intra prediction technology to be used, and a fourth syntax element can be used to indicate the prediction type of the current block. The prediction type includes intra prediction or inter prediction.

[0344] In the embodiments of the present application, the current sequence includes the current block. The third syntax element is a sequence-level syntax element, and the second syntax element, the first syntax element and the fourth syntax element are all block-level (CU-level or PU-level) syntax elements.

[0345] In some embodiments, the method can further include: determining that the third syntax element takes the first value when the current sequence allows the first intra prediction technology to be used; and determining that the third syntax element takes the second value when the current sequence does not allow the first intra prediction technology to be used.

[0346] In the embodiments of the present application, the third syntax element can be referred to as an EIP use permission identification bit, and the third syntax element at this time can be represented as sps_eip_enable_flag. That is, if the current sequence allows the EIP technology to be used, it is determined that the sps_eip_enable_flag takes the first value; and if the current sequence does not allow the EIP technology to be used, it is determined that the sps_eip_enable_flag takes the second value.

[0347] In some embodiments, the method can further include: determining that the fourth syntax element takes the first value when the prediction type of the current block is intra prediction; and determining that the fourth syntax element takes the second value when the prediction type of the current block is inter prediction.

[0348] In the embodiments of the present application, the fourth syntax element can be referred to as a prediction type identification bit. That is, if the prediction type of the current block is intra prediction, it is determined that the fourth syntax element takes the first value; and if the prediction type of the current block is inter prediction, it is determined that the fourth syntax element takes the second value.

[0349] In the embodiments of the present application, the first value and the second value are different, and the first value and the second value can be in the form of a parameter or in the form of a number. For example, the syntax element here can be a parameter written in a profile, or the value of an identification bit (flag), which is not limited here.

[0350] Exemplarily, the first value can be set as 1, and the second value can be set as 0; or the first value can be set as 0, and the second value can be set as 1; or the first value can be set as true, and the second value can be set as false; or the first value can be set as false, and the second value can be set as true; but no limitation is made in this regard.

[0351] In the embodiment of the present application, the encoding end first encodes the value of the third syntax element, writes the obtained encoding bits into the code stream. When the first intra prediction technology is allowed to be used in the current sequence, the encoding end also needs to encode the value of the fourth syntax element, and writes the obtained encoding bits into the code stream. When the prediction type of the current block is intra prediction, the encoding end also needs to encode the value of the second syntax element, and writes the obtained encoding bits into the code stream. When the EIP technology is used in the current block, the encoding end also needs to encode the value of the first syntax element and the corresponding mode index, and writes the obtained encoding bits into the code stream.

[0352] Further, the embodiment of the present application also provides a code stream, which is generated by bit encoding according to the encoding method; wherein the to-be-encoded information corresponding to the encoding method includes at least one of the following: the value of the first syntax element, the value of the second syntax element, the value of the third syntax element, the value of the fourth syntax element, the mode index of the first intra prediction technology used in the current block and the third vector parameter.

[0353] In the embodiment of the present application, the third syntax element can be used to indicate whether the first intra prediction technology is allowed to be used in the current sequence, the fourth syntax element can be used to indicate the prediction type of the current block, the second syntax element is used to indicate whether the first intra prediction technology is used in the current block, and the first syntax element is used to indicate whether the merging mode of the first intra prediction technology is used in the current block. Wherein, the prediction type herein includes intra prediction or inter prediction.

[0354] In the embodiment of the present application, by encoding the to-be-encoded information, the obtained encoding bits are written into the code stream, and then the code stream is transmitted from the encoding end to the decoding end, so that the information such as whether the first intra prediction technology is used and whether the merging mode of the first intra prediction technology is used in the current block can be determined by parsing the code stream at the decoding end.

[0355] The embodiment of the present application provides a coding method, when a current block uses a merge mode of a first intra prediction technology, at least one vector parameter of the current block is determined, at least one group of candidate filter parameters of the current block is determined according to the at least one vector parameter, a first candidate list of the current block is determined according to the at least one group of candidate filter parameters, and a first cost result corresponding to each of at least one group of candidate mode information in the first candidate list is determined; when the current block does not use the merge mode of the first intra prediction technology, a third candidate list of the current block is determined, and a second cost result corresponding to each of at least one group of candidate mode information in the third candidate list is determined; the value of a first syntax element is determined according to the first cost result and the second cost result, wherein the first syntax element is used to indicate whether the current block uses the merge mode of the first intra prediction technology; the value of the first syntax element is coded, and the obtained coded bits are written into a bitstream. In this way, when the current block uses the merge mode of the first intra prediction technology, at least one group of candidate filter parameters of the current block is determined according to the at least one vector parameter, and then the at least one group of candidate filter parameters is used as candidate mode information in the first candidate list, thereby expanding the candidate range in the first candidate list. The filter parameter determined according to the first candidate list has good generalization ability, so that the filter parameter can be better applied to sample prediction in the current block. Moreover, prediction is performed according to the determined filter parameter (for example, a coefficient of a filter and a shape of the filter), which can improve the prediction sample accuracy of the current block, thereby improving the compression efficiency and further improving the coding performance.

[0356] In another embodiment of the present application, based on the coding method described in the foregoing embodiment, the technical scheme of the embodiment of the present application is mainly as follows: a reference block similar to the current block is found, and a related region of the reference block is used to train the coefficients of the allowed extrapolation filter of the current block, and the filter parameters of the trained extrapolation filter are applied to the current block (such as a "current coding unit") to obtain the prediction sample of the current block.

[0357] In a possible implementation, taking a block vector parameter as an example, the manner of obtaining the reference block / reference region includes:

[0358] (a) The block vector based on template matching prediction:

[0359] The block vector used to obtain the training sample can be obtained by a template matching prediction technology, that is, a template composed of the surrounding neighboring reconstructed samples of the current coding unit is searched in the decoded reconstructed region to obtain a position with minimum template error, and the position difference from the position of the current coding unit is the block vector.

[0360] According to the block vector information, the reconstruction samples of the reference region are used to train the extrapolation filter allowed to be used for the current coding unit, which includes the three shapes or filter combination (including multiple filters) as mentioned above. The reconstruction samples of the reference region include the samples corresponding to the size and location of the current coding unit, or the entire diagonal filled region as shown in FIG. 4.

[0361] (b) Block vector based on merge mode:

[0362] The block vector used to obtain the training samples can be obtained by the merge mode, and the process of obtaining the block vector is similar to the rules and order of constructing the EIP list in the foregoing. First, whether the decoded coding unit has a block vector is obtained by checking the spatial position, i.e., the adjacent block and the non-adjacent block, and if so, it is added to the block vector merge candidate list (BV Merge list); second, the block vector is obtained by traversing the history-based BV list, and added to the block vector merge candidate list; finally, the block vector is obtained by traversing the temporal block vector information, and the block vector is obtained by obtaining the same position block and the surrounding adjacent block of the same position block in the reference frame, and added to the block vector merge candidate list.

[0363] The block vector used to calculate the filter parameters of the extrapolation filter can be selected from the first block vector candidate in the block vector merge candidate list; or the template region of the current block is acted on by the extrapolation filter calculated by each block vector candidate in the list to reorder, and the candidate with the minimum error / cost is selected as the optimal extrapolation filter of the technology. The process of reordering based on the template region is similar to the above-mentioned ordering process. The process of calculating the filter parameters of the extrapolation filter is the same as above.

[0364] (c) Block vector based on motion search:

[0365] The block vector used to obtain the training region can be obtained by motion / block search (Motion / block search), which searches the original image by the original image block corresponding to the current coding unit to obtain the most matched (i.e., the minimum error) block vector.

[0366] The block vector information needs to be transmitted to the decoding end, and the transmission efficiency can be improved by technologies such as block vector prediction (Block Vector Prediction, BVP) or vector sign prediction (BV Sign Prediction). The process of calculating the filter parameters of the extrapolation filter is the same as above.

[0367] In a specific embodiment, at the encoding end, the encoder traverses the prediction modes, if the current prediction mode type is an intra mode, the flag of the application embodiment is obtained, which is a sequence level flag, indicating that the current encoder allows the use of the extrapolation filter based intra prediction technology (i.e. EIP technology), which can be represented in the form of sps_eip_enable_flag.

[0368] The specific process at the encoding end is as follows:

[0369] Step 1, if the EIP use permission flag is true, step 2 is executed; if the EIP use permission flag or other conditions do not meet, the encoding end does not attempt the EIP technology, i.e. step 2 is directly executed to step 3.

[0370] Step 2, the encoding end attempts the EIP technology:

[0371] Step 2.1, the EIP prediction based on calculation.

[0372] The encoding end constructs up to 9 kinds of candidate mode information by combining different region training templates and different shape filters, such as the upper template region and the square filter as a candidate, which can only use the reconstructed samples of the upper template region as the training sample input of the square filter. Similarly, the filter coefficients of the 9 candidate mode information are calculated in turn. It should be noted that there are up to 9 kinds of candidate mode information, which can be determined according to the width and height of the current block to determine the candidate mode information allowed to be used by the current block, to obtain the EIP candidate list based on calculation.

[0373] Step 2.2, the EIP prediction based on merging.

[0374] The EIP candidate list in the merging mode is obtained according to the method of the foregoing embodiment, and the reference region at the corresponding position is obtained according to the optimal block vector obtained by the template matching search, and the reconstructed samples of the reference region are used to train the extrapolation filter. The allowable extrapolation filter includes up to three shapes, such as a square filter, a horizontal rectangular filter and a vertical rectangular filter, which depend on the block size and shape of the current coding unit. The EIP filter parameters obtained by training the reference region are also added to the EIP candidate list.

[0375] All the candidates in the candidate list are sorted, and the sorted merging mode list is taken as the EIP candidate list based on merging.

[0376] Step 2.3, the encoding end calculates the EIP rate distortion cost.

[0377] The rate-distortion cost of each candidate is calculated by traversing the list of EIP candidates based on computation and the list of EIP candidates based on merge, and the minimum rate-distortion cost is the minimum cost of the current EIP. Whether the candidate is an EIP merge mode, its mode index in the corresponding candidate list, and the corresponding filter shape and filter coefficient are recorded.

[0378] Step 3, the encoding end traverses the untried prediction technology and calculates the optimal cost result.

[0379] Step 4, if EIP is allowed to be used and the rate-distortion cost of the optimal EIP candidate is minimum, the information of whether the current coding block uses the EIP merge mode (eip_merge) is written into the code stream, the optimal candidate index (eip_index) is written into the code stream, and the filter shape and filter coefficient thereof are saved in the history list. The coding block reconstruction process is completed.

[0380] Otherwise, the information of other optimal modes is written into the code stream, transmitted to the decoding end, and the coding block reconstruction process is completed.

[0381] Step 5, after all coding units are traversed, the code stream is output after loop filtering, entropy coding and other technologies.

[0382] In a specific embodiment, at the decoding end, the decoder parses or obtains an EIP use permission identification bit, which is a sequence level identification bit (sps_eip_enable_flag), indicating that the current decoder allows the use of EIP technology.

[0383] The specific process at the decoding end is as follows:

[0384] Step 1, parse the code stream to obtain the prediction type of the current coding unit, if it is an intra prediction mode, parse the eip use identification bit of the current coding unit. If the eip_flag use identification bit of the current coding unit is true, it indicates that the current coding unit uses EIP prediction technology, and the eip_merge identification bit and eip_index of the current coding unit need to be parsed;

[0385] If the eip_flag use identification bit of the current coding unit is false, it indicates that the current coding unit does not use EIP prediction technology, and step 3 is executed.

[0386] Step 2, if the eip_merge identification bit of the current coding unit is true, it indicates that the current coding unit uses EIP merge mode, and step 2.1 is executed; otherwise, it indicates that the current coding unit does not use EIP merge mode, and step 2.2 is executed.

[0387] Step 2.1, EIP prediction based on merge.

[0388] According to the method of the foregoing embodiment, the EIP candidate list in the merge mode is obtained, and the reference region of the corresponding position is obtained according to the optimal block vector obtained by the template matching search, and the reconstruction samples of the reference region are used to train the coefficients of the extrapolation filter. The allowable extrapolation filter includes at most three shapes, such as a square filter, a horizontal rectangular filter, and a vertical rectangular filter, depending on the block size and shape of the current coding unit. The EIP filter parameters trained by the reference region are also added to the EIP candidate list.

[0389] All the candidates in the list are sorted, and the sorted merge mode list is taken as the EIP candidate list based on merge. The EIP information of the corresponding candidate in the list is obtained according to eip_index. The EIP information, i.e., the filter shape and the filter coefficients, of the candidate is used to predict the current coding unit, to obtain the prediction samples of the current coding unit.

[0390] Step 2.2, EIP prediction based on calculation.

[0391] According to the width and height of the current coding unit, the candidate mode information allowed to be used by the current coding unit is obtained, to obtain the EIP candidate list based on calculation, and the maximum length of the EIP list is 9, i.e., the combination of 3 different template regions and 3 different filter shapes. The EIP information of the corresponding candidate in the list is obtained according to eip_index, including the template region and the filter shape. The filter input samples and the filter output samples corresponding to the filter shape are filtered by using the template region, to calculate the filter coefficients. The filter coefficients calculated are applied to the current coding unit, to predict the prediction samples of the current coding unit.

[0392] Step 3, continue to parse the usage identification bits or index information of other technologies, and obtain the final prediction samples of the current coding unit according to the parsed information;

[0393] Step 4, parse the code stream and obtain the residual information, obtain the residual samples according to the inverse quantization and the inverse transform. The final prediction samples and the residual samples are superimposed to obtain the reconstruction samples of the current coding unit;

[0394] Step 5, after all the reconstruction samples pass through the loop filtering technology and the like, the final reconstruction image is obtained, which can be used as the video output and can also be used as the decoding reference.

[0395] It can be understood that in the embodiment of the present application, the extrapolation filter (i.e., the EIP filter) can be applied to the intraTMP technology, i.e., the extrapolation filtering prediction technology can be used for each block vector candidate of the intraTMP technology, and the embodiment of the present application only needs an additional syntax element to represent whether the technology is used.

[0396] It can also be understood that, in the embodiments of the present application, the extrapolation filter based on the block vector reference region calculation can divide the reconstructed samples of these reference regions, for example, grouping according to the sample mean / sample median, and calculating an extrapolation filter for each group.

[0397] It can also be understood that, in the embodiments of the present application, the relevant information of the corresponding reference block is obtained according to the block vector obtained in the foregoing, and if the reference block has EIP information, the EIP information can be directly used as a group of candidates for the current block for predicting the samples in the current block.

[0398] It can also be understood that, in the embodiments of the present application, for the inter-coded type image, the motion vector can be used as a candidate to obtain the corresponding reference region, and then the filter is trained according to the reference region, and the EIP information (such as the shape of the filter and the coefficients of the filter) obtained by training is used as a group of candidates for the current block for predicting the samples in the current block.

[0399] Based on the coding method of the foregoing embodiments, the technical solution is applied to the ECM reference software, and tested under the general test conditions, and the results shown in Table 1 can be obtained. The encoding time (EncT) and the decoding time (DecT) are theoretically 100%, and the encoding and decoding times in Table 1 have large fluctuations due to different servers and different test times, which can be ignored.

[0400] Table 1

[0401] As can be seen from Table 1, the technical solution can contribute to nearly 0.03% of the encoding gain under the configuration of ECM AI, and the changes are very direct and simple, thereby improving the encoding performance.

[0402] In the embodiments of the present application, the specific implementation of the foregoing embodiments is described in detail, and it can be seen from the foregoing embodiments that, according to the technical solution of the foregoing embodiments, the extrapolation filter prediction based on the block vector information and the block vector for obtaining the reference region for calculating the extrapolation filter have multiple implementation manners. Thus, at least one group of candidate filter parameters is determined according to the block vector, which can expand the candidate range in the first candidate list; according to the first candidate list and the mode index obtained by parsing the code stream, the determined filter parameters have good generalization ability, so that the filter parameters can be better applied to the sample prediction in the current block; and moreover, the prediction according to the determined filter parameters can also improve the prediction sample accuracy of the current block, thereby improving the compression efficiency and further improving the coding performance.

[0403] In still another embodiment of the present application, based on the same inventive concept as the foregoing embodiments, FIG. 15 is a schematic diagram of a constituent structure of an encoder provided by an embodiment of the present application. As shown in FIG. 15, the encoder 150 includes a first determining unit 1501 and an encoding unit 1502, wherein:

[0404] The first determining unit 1501 is configured to, when the current block uses the merge mode of the first intra prediction technology, determine at least one vector parameter of the current block, determine at least one set of candidate filter parameters of the current block according to the at least one vector parameter, and determine a first candidate list of the current block according to the at least one set of candidate filter parameters, and determine a first cost result corresponding to each set of candidate mode information in the first candidate list; when the current block does not use the merge mode of the first intra prediction technology, determine a third candidate list of the current block, and determine a second cost result corresponding to each set of candidate mode information in the third candidate list; and determine a value of a first syntax element according to the first cost result and the second cost result, wherein the first syntax element is used to indicate whether the current block uses the merge mode of the first intra prediction technology;

[0405] The encoding unit 1502 is configured to perform encoding processing on the value of the first syntax element, and write the obtained encoding bits into a bitstream.

[0406] In some embodiments, the first determining unit 1501 is further configured to, if a minimum cost result in the first cost result is smaller than a minimum cost result in the second cost result, determine the value of the first syntax element as a first value; and if the minimum cost result in the first cost result is greater than the minimum cost result in the second cost result, determine the value of the first syntax element as a second value.

[0407] In some embodiments, the first determining unit 1501 is further configured to, when the minimum cost result in the first cost result is smaller than the minimum cost result in the second cost result, determine a first candidate mode information corresponding to the minimum cost result in the first cost result; and determine a mode index of the first intra prediction technology used by the current block according to an index sequence number of the first candidate mode information in the first candidate list; and the encoding unit 1502 is further configured to perform encoding processing on the mode index of the first intra prediction technology used by the current block, and write the obtained encoding bits into a bitstream.

[0408] In some embodiments, the first determining unit 1501 is further configured to determine the minimum cost result in the second cost results corresponds to the second candidate mode information when the minimum cost result in the first cost results is greater than the minimum cost result in the second cost results; and determine the mode index of the current block using the first intra prediction technology according to the index sequence number of the second candidate mode information in the third candidate list; and the encoding unit 1502 is further configured to encode the mode index of the current block using the first intra prediction technology, and write the obtained encoding bits into the bitstream.

[0409] In some embodiments, the first determining unit 1501 is further configured to determine a third cost result corresponding to other prediction technology except the first intra prediction technology used by the current block; and determine the value of the second syntax element according to the first cost result, the second cost result and the third cost result, wherein the second syntax element is used to indicate whether the current block uses the first intra prediction technology; and the encoding unit 1502 is further configured to encode the value of the second syntax element, and write the obtained encoding bits into the bitstream.

[0410] In some embodiments, the first determining unit 1501 is further configured to determine the value of the second syntax element as the first value if the minimum cost result in the first cost result and the second cost result is less than the minimum cost result in the third cost result; and determine the value of the second syntax element as the second value if the minimum cost result in the first cost result and the second cost result is greater than the minimum cost result in the third cost result.

[0411] In some embodiments, the at least one vector parameter further comprises a first vector parameter; the first determining unit 1501 is further configured to determine a first template of the current block; and determine the first vector parameter of the current block according to the search in the coded region based on the first template.

[0412] In some embodiments, the first determining unit 1501 is further configured to determine one or more first candidate vector parameters according to the search in the coded region based on the first template; determine the cost results corresponding to the one or more first candidate vector parameters according to the cost calculation of the reference templates corresponding to the one or more first candidate vector parameters and the first template respectively; and determine the minimum cost result from the cost results corresponding to the one or more first candidate vector parameters, and determine the candidate vector parameter corresponding to the minimum cost result as the first vector parameter of the current block.

[0413] In some embodiments, the at least one vector parameter further comprises a second vector parameter; the first determining unit 1501 is further configured to determine a vector candidate list; and determine the second vector parameter of the current block according to one or more second candidate vector parameters in the vector candidate list.

[0414] In some embodiments, the first determining unit 1501 is further configured to determine the candidate vector parameter at the first position in the vector candidate list as the second vector parameter of the current block.

[0415] In some embodiments, the first determining unit 1501 is further configured to determine a reference template corresponding to the one or more second candidate vector parameters; perform cost calculation on the reference template corresponding to the one or more second candidate vector parameters and the first template of the current block respectively to determine cost results corresponding to the one or more second candidate vector parameters; and determine a minimum cost result from the cost results corresponding to the one or more second candidate vector parameters, and determine the candidate vector parameter corresponding to the minimum cost result as the second vector parameter of the current block.

[0416] In some embodiments, the at least one vector parameter further includes a third vector parameter; the first determining unit 1501 is further configured to determine one or more candidate reference blocks based on a search in the current image of the current block; perform cost calculation on the one or more candidate reference blocks and the current block respectively to determine cost results corresponding to the one or more candidate reference blocks, and determine a minimum cost result from the cost results corresponding to the one or more candidate reference blocks, and determine the candidate reference block corresponding to the minimum cost result as a matching block; and determine the third vector parameter of the current block based on a vector parameter between the current block and the matching block.

[0417] In some embodiments, the encoding unit 1502 is further configured to perform encoding processing on the third vector parameter of the current block, and write the obtained encoding bits into the bitstream.

[0418] In some embodiments, the first determining unit 1501 is further configured to, after determining the at least one vector parameter of the current block, add the at least one vector parameter into a preset storage area and / or a first history list based on the vector parameter.

[0419] In some embodiments, the first determining unit 1501 is further configured to determine a reference region indicated by the current vector parameter; determine training samples corresponding to at least one candidate filter based on reconstructed samples of the reference region; and perform filter training based on the training samples corresponding to the at least one candidate filter to determine at least one set of candidate filter parameters corresponding to the current vector parameter, the candidate filter parameters including a shape of the candidate filter and coefficients of the candidate filter; wherein the reference region includes a reference block and / or a reference template, and the current vector parameter is any one of the at least one vector parameter.

[0420] In some embodiments, the first determining unit 1501 is further configured to divide the reconstructed samples of the reference region to determine at least two groups of reconstructed samples; determine, according to the at least two groups of reconstructed samples, training samples corresponding to at least one candidate filter combination, wherein the candidate filter combination comprises candidate filters corresponding to the at least two groups of reconstructed samples respectively; and perform filter training according to the training samples corresponding to the at least one candidate filter combination to determine at least one group of candidate filter parameter combinations corresponding to the current vector parameter; wherein the candidate filter parameter combination comprises a group of candidate filter parameters corresponding to the at least two groups of reconstructed samples respectively.

[0421] In some embodiments, the first determining unit 1501 is further configured to determine a reference block indicated by each of the at least one vector parameter; obtain filter parameters of the reference block when the reference block uses the first intra prediction technology; and take the filter parameters of the reference block as a group of candidate filter parameters of the current block.

[0422] In some embodiments, the first determining unit 1501 is further configured to determine a second candidate list of the current block; and determine a first candidate list of the current block according to the at least one group of candidate filter parameters and the second candidate list.

[0423] In some embodiments, the first determining unit 1501 is further configured to update the second candidate list based on the at least one group of candidate filter parameters to obtain an updated candidate list; respectively perform cost calculation on the template region of the current block according to the at least one group of candidate filter parameters in the updated candidate list to determine cost results corresponding to the at least one group of candidate filter parameters in the updated candidate list respectively; and sort the at least one group of candidate filter parameters in the updated candidate list according to the cost results to determine the first candidate list of the current block.

[0424] In some embodiments, the first determining unit 1501 is further configured to determine shapes of at least one candidate template region and at least one candidate filter according to the width and height of the current block; and determine a third candidate list of the current block according to the shapes of the at least one candidate template region and the at least one candidate filter; wherein the third candidate list comprises at least one group of candidate mode information, and the candidate mode information comprises the shapes of the candidate template region and the candidate filter.

[0425] In some embodiments, referring to FIG. 15, the encoder 150 further comprises a first prediction unit 1503; the first determining unit 1501 is further configured to, when the current block uses the first intra prediction technology and the current block uses a merge mode of the first intra prediction technology, determine filter parameters of the current block according to first candidate mode information corresponding to the minimum cost result in the first cost results; and the first prediction unit 1503 is configured to determine prediction samples of the current block according to the filter parameters of the current block.

[0426] In some embodiments, the first determining unit 1501 is further configured to, when the current block uses the first intra prediction technology and the current block does not use the merging mode of the first intra prediction technology, determine the filter parameter of the current block according to the second candidate mode information corresponding to the minimum cost result in the second cost result; and the first predicting unit 1503 is further configured to determine the prediction sample of the current block according to the filter parameter of the current block.

[0427] 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 be a module, and can also be non-modular. Moreover, each component in the embodiments can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware, or in the form of a software functional module.

[0428] In still another embodiment of the present application, Fig. 16 is a specific hardware structure diagram of an encoder provided by the embodiment of the present application. As shown in Fig. 16, the encoder 150 can include a first communication interface 1601, a first memory 1602 and a first processor 1603; each component is coupled together through a first bus system 1604. It can be understood that the first bus system 1604 is used to realize the connection communication between the components. The first bus system 1604 includes not only a data bus, but also a power supply bus, a control bus and a state signal bus. However, in order to clearly illustrate, in Fig. 16, various buses are marked as the first bus system 1604. Among them,

[0429] The first communication interface 1601 is used for receiving and sending signals in the process of transceiving information with other external network elements;

[0430] The first memory 1602 is used for storing computer programs capable of running on the first processor 1603;

[0431] The first processor 1603 is used for, when running the computer programs, performing:

[0432] When the current block uses the merge mode of the first intra prediction technology, at least one vector parameter of the current block is determined, at least one set of candidate filtering parameters of the current block is determined according to the at least one vector parameter, a first candidate list of the current block is determined according to the at least one set of candidate filtering parameters, and at least one set of candidate mode information in the first candidate list is determined to correspond to a first cost result respectively; when the current block does not use the merge mode of the first intra prediction technology, a third candidate list of the current block is determined, and at least one set of candidate mode information in the third candidate list is determined to correspond to a second cost result respectively; a value of a first syntax element is determined according to the first cost result and the second cost result, where the first syntax element is used to indicate whether the current block uses the merge mode of the first intra prediction technology; the value of the first syntax element is encoded, and the obtained encoded bits are written into a bitstream.

[0433] It can be understood that the first memory 1602 in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or a flash memory. The volatile memory can be a random access memory (Random Access Memory, RAM) used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). The first memory 1602 of the system and method described in the present application is intended to include but not limited to these and any other suitable types of memory.

[0434] The first processor 1603 can be an integrated circuit chip that has the 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 1603. The first processor 1603 described above can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (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 disclosed in the embodiment 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 embodiment of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding 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 1602, and the first processor 1603 reads the information in the first memory 1602, and combines the hardware to complete the steps of the above method.

[0435] 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 (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general 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.

[0436] Optionally, as another embodiment, the first processor 1603 is further configured to execute the method of any one of the preceding embodiments when running the computer program.

[0437] The embodiment provides an encoder, in which when a merge mode using a first intra prediction technology is used for a current block, at least one set of candidate filter parameters of the current block is determined according to at least one vector parameter, and then the at least one set of candidate filter parameters is taken as candidate mode information in a first candidate list, thereby expanding the candidate range in the first candidate list; and according to the first candidate list and a mode index obtained by parsing a code stream, the determined filter parameters have good generalization ability, so that the filter parameters can be better applied to sample prediction in the current block; and prediction is performed according to the determined filter parameters (for example, coefficients of a filter and a shape of the filter), which can improve prediction sample accuracy of the current block, thereby improving compression efficiency and further improving coding performance.

[0438] In still another embodiment of the present application, based on the same inventive concept as in the preceding embodiments, FIG. 17 is a schematic structural diagram of a decoder provided by the embodiment of the present application. As shown in FIG. 17, the decoder 170 can include a decoding unit 1701, a second determining unit 1702 and a second prediction unit 1703, wherein:

[0439] The decoding unit 1701 is configured to parse a first syntax element in a code stream and a mode index of a current block using a first intra prediction technology.

[0440] The second determining unit 1702 is configured to, when the first syntax element indicates that a merge mode using the first intra prediction technology is used for the current block, determine at least one vector parameter of the current block, determine at least one set of candidate filter parameters of the current block according to the at least one vector parameter, determine a first candidate list of the current block according to the at least one set of candidate filter parameters, and determine filter parameters of the current block according to the first candidate list and the mode index.

[0441] The second prediction unit 1703 is configured to determine prediction samples of the current block according to the filter parameters.

[0442] In some embodiments, the at least one vector parameter includes a first vector parameter; the second determining unit 1702 is further configured to determine a first template of the current block, and determine the first vector parameter of the current block by searching the decoded region according to the first template.

[0443] In some embodiments, the second determining unit 1702 is further configured to search the decoded region according to the first template, determine one or more first candidate vector parameters; perform cost calculation on the reference template corresponding to each of the one or more first candidate vector parameters and the first template respectively, determine cost results corresponding to the one or more first candidate vector parameters; and determine a minimum cost result from the cost results corresponding to the one or more first candidate vector parameters, and determine the candidate vector parameter corresponding to the minimum cost result as the first vector parameter of the current block.

[0444] In some embodiments, the at least one vector parameter further comprises a second vector parameter; the second determining unit 1702 is further configured to determine a vector candidate list; and determine the second vector parameter of the current block according to one or more second candidate vector parameters in the vector candidate list.

[0445] In some embodiments, the second determining unit 1702 is further configured to determine the candidate vector parameter at the first position in the vector candidate list as the second vector parameter of the current block.

[0446] In some embodiments, the second determining unit 1702 is further configured to determine reference templates corresponding to the one or more second candidate vector parameters; perform cost calculation on the reference templates corresponding to the one or more second candidate vector parameters and the first template of the current block respectively, determine cost results corresponding to the one or more second candidate vector parameters; and determine a minimum cost result from the cost results corresponding to the one or more second candidate vector parameters, and determine the candidate vector parameter corresponding to the minimum cost result as the second vector parameter of the current block.

[0447] In some embodiments, the second determining unit 1702 is further configured to determine one or more second candidate vector parameters according to the first reference information of the current block; and determine the vector candidate list according to the one or more second candidate vector parameters; wherein the first reference information of the current block comprises at least one of the following: whether a vector parameter exists in a neighboring block of the current block; whether a vector parameter exists in a non-neighboring block of the current block; whether a vector parameter exists in a collocated block of the current block in a reference frame; and whether a vector parameter exists in a first history list of the current block based on vector parameters.

[0448] In some embodiments, the first reference information of the current block comprises at least one of the following: whether a vector parameter exists in a neighboring block of the current block; whether a vector parameter exists in a non-neighboring block of the current block; whether a vector parameter exists in a collocated block of the current block in a reference frame; and whether a vector parameter exists in a first history list of the current block based on vector parameters.

[0449] In some embodiments, the at least one vector parameter further comprises a third vector parameter; and the decoding unit 1701 is further configured to parse the third vector parameter in the code stream.

[0450] In some embodiments, the second determining unit 1702 is further configured to, after determining the at least one vector parameter of the current block, add the at least one vector parameter to a preset storage region and / or a first history list based on vector parameters.

[0451] In some embodiments, the second determining unit 1702 is further configured to determine a reference region indicated by the current vector parameter; determine training samples corresponding to the at least one candidate filter according to the reconstructed samples of the reference region; and determine the at least one set of candidate filter parameters corresponding to the current vector parameter according to the filter training based on the training samples corresponding to the at least one candidate filter, wherein the candidate filter parameters include the shape of the candidate filter and the coefficients of the candidate filter, and the reference region includes a reference block and / or a reference template, and the current vector parameter is any one of the at least one vector parameter.

[0452] In some embodiments, the second determining unit 1702 is further configured to divide the reconstructed samples of the reference region to determine at least two sets of reconstructed samples; determine training samples corresponding to at least one candidate filter combination according to the at least two sets of reconstructed samples, wherein the candidate filter combination includes the candidate filters corresponding to the at least two sets of reconstructed samples respectively; and determine the at least one set of candidate filter parameter combinations corresponding to the current vector parameter according to the filter training based on the training samples corresponding to the at least one candidate filter combination, wherein the candidate filter parameter combination includes the set of candidate filter parameters corresponding to the at least two sets of reconstructed samples respectively.

[0453] In some embodiments, the second determining unit 1702 is further configured to determine a sample reference value corresponding to the reference region, wherein the sample reference value includes a sample mean value or a sample median value; divide a first reconstructed sample in the reference region to a first set of reconstructed samples among the at least two sets of reconstructed samples when the first reconstructed sample is greater than the sample reference value; divide the first reconstructed sample to a second set of reconstructed samples among the at least two sets of reconstructed samples when the first reconstructed sample is less than the sample reference value, wherein the first reconstructed sample is any one of the reconstructed samples in the reference region.

[0454] In some embodiments, the second determining unit 1702 is further configured to determine the reference region indicated by one or more second candidate vector parameters in the vector candidate list; determine the candidate filter parameters corresponding to the one or more second candidate vector parameters respectively according to the reference region indicated by the one or more second candidate vector parameters respectively; and determine the at least one set of candidate filter parameters of the current block according to the candidate filter parameters corresponding to the one or more second candidate vector parameters respectively.

[0455] In some embodiments, the second determining unit 1702 is further configured to determine the reference block indicated by the at least one vector parameter respectively; obtain the filter parameters of the reference block when the reference block uses a first intra prediction technology; and take the filter parameters of the reference block as a set of candidate filter parameters of the current block.

[0456] In some embodiments, the second determining unit 1702 is further configured to determine a second candidate list of the current block; and determine the first candidate list of the current block according to the at least one set of candidate filtering parameters and the second candidate list.

[0457] In some embodiments, the second determining unit 1702 is further configured to update the second candidate list based on the at least one set of candidate filtering parameters to obtain an updated candidate list; perform cost calculation on the template region of the current block according to at least one set of candidate filtering parameters in the updated candidate list respectively to determine a cost result corresponding to each of the at least one set of candidate filtering parameters in the updated candidate list; and sort the at least one set of candidate filtering parameters in the updated candidate list according to the cost results to determine the first candidate list of the current block.

[0458] In some embodiments, the second determining unit 1702 is further configured to add the first candidate filtering parameter to the second candidate list when the first candidate filtering parameter does not exist in the second candidate list; and skip the step of adding the first candidate filtering parameter to the second candidate list when the first candidate filtering parameter exists in the second candidate list; wherein the first candidate filtering parameter is any one of the at least one set of candidate filtering parameters.

[0459] In some embodiments, the second determining unit 1702 is further configured to determine at least one set of second candidate filtering parameters according to second reference information of the current block; and determine a second candidate list of the current block according to the at least one set of second candidate filtering parameters; wherein the second reference information of the current block comprises at least one of the following: whether a neighboring block of the current block uses the first intra prediction technology; whether a non-neighboring block of the current block uses the first intra prediction technology; whether a temporal collocated block of the current block uses the first intra prediction technology; and a second history list of the current block based on the first intra prediction technology.

[0460] In some embodiments, when the filtering parameter is at least two sets of filtering parameters indicated by a filter combination, the second determining unit 1702 is further configured to, when one or more samples of the current block satisfy a first condition, select a first set of filtering parameters from the at least two sets of filtering parameters, and perform prediction on the one or more samples according to the first set of filtering parameters to determine a prediction value of the one or more samples; and when the one or more samples of the current block satisfy a second condition, select a second set of filtering parameters from the at least two sets of filtering parameters, and perform prediction on the one or more samples according to the second set of filtering parameters to determine a prediction value of the one or more samples.

[0461] In some embodiments, the second determining unit 1702 is further configured to determine a first reference value corresponding to one or more samples of the current block; determine that the one or more samples of the current block satisfy the first condition when the first reference value is greater than the sample reference value; and determine that the one or more samples of the current block satisfy the second condition when the first reference value is less than the sample reference value.

[0462] In some embodiments, the decoding unit 1701 is further configured to parse a second syntax element in the bitstream; and parse the first syntax element in the bitstream and a mode index of the current block using the first intra prediction technology when the second syntax element indicates that the current block uses the first intra prediction technology.

[0463] In some embodiments, the second determining unit 1702 is further configured to determine a third candidate list of the current block when the first syntax element indicates that the current block does not use the merge mode of the first intra prediction technology; determine the mode information of the current block according to the third candidate list and the mode index; determine the filter parameter of the current block according to the mode information; and determine the prediction sample of the current block according to the filter parameter.

[0464] In some embodiments, the filter parameter includes a shape of a filter and a coefficient of the filter; and the second determining unit 1702 is further configured to determine the shape of the filter and a template region of the current block according to the mode information; determine input samples and output samples of the filter according to the template region of the current block; and determine the coefficient of the filter according to the filter training of the input samples and the output samples of the filter.

[0465] In some embodiments, the second determining unit 1702 is further configured to determine at least one candidate template region and a shape of at least one candidate filter according to the width and the height of the current block; and determine the third candidate list of the current block according to the at least one candidate template region and the shape of the at least one candidate filter; wherein the third candidate list includes at least one set of candidate mode information, and the candidate mode information includes the candidate template region and the shape of the candidate filter.

[0466] It can be understood that, in this 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 this embodiment can be integrated in one processing unit, or can be physically present separately, 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.

[0467] In still another embodiment of the present application, Fig. 18 is a specific hardware structure diagram of a decoder provided by an embodiment of the present application. As shown in Fig. 18, the decoder 170 can include a second communication interface 1801, a second memory 1802 and a second processor 1803; each component is coupled together through a second bus system 1804. It can be understood that the second bus system 1804 is used to realize the connection communication between the components. The second bus system 1804 includes not only a data bus, but also a power bus, a control bus and a status signal bus. However, in order to clearly illustrate, all kinds of buses are marked as the second bus system 1804 in Fig. 18. Among them,

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

[0469] The second memory 1802 is configured to store a computer program capable of running on the second processor 1803;

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

[0471] parsing a first syntax element in a code stream and a mode index of a current block using a first intra prediction technology; when the first syntax element indicates that the current block uses a merge mode of the first intra prediction technology, determining at least one vector parameter of the current block, determining at least one set of candidate filtering parameters of the current block according to the at least one vector parameter, determining a first candidate list of the current block according to the at least one set of candidate filtering parameters, determining a filtering parameter of the current block according to the first candidate list and the mode index, and determining a prediction sample of the current block according to the filtering parameter.

[0472] Optionally, as another embodiment, the second processor 1803 is further configured to execute the method in any one of the preceding embodiments when running the computer program.

[0473] It can be understood that the hardware function of the second memory 1802 is similar to that of the first memory 1602, and the hardware function of the second processor 1803 is similar to that of the first processor 1603; here is not described in detail.

[0474] The embodiment provides a decoder, in which when a current block uses a merge mode of a first intra prediction technology, at least one set of candidate filtering parameters of the current block is determined according to at least one vector parameter, and then the at least one set of candidate filtering parameters is taken as candidate mode information in a first candidate list, thereby expanding the candidate range in the first candidate list; and according to the first candidate list and a mode index obtained by parsing a code stream, the determined filtering parameters have good generalization ability, so that the filtering parameters can be better applied to sample prediction in the current block; and prediction according to the determined filtering parameters (for example, coefficients of a filter and a shape of the filter) can improve the prediction sample accuracy of the current block, thereby improving compression efficiency and further improving coding performance.

[0475] In still another embodiment of the present application, FIG. 19 is a schematic diagram of a composition structure of a coding system provided by the embodiment of the present application. As shown in FIG. 39, the coding system 190 can include an encoder 1901 and a decoder 1902.

[0476] In the embodiment of the present application, the encoder 1901 can be the encoder described in any one of the foregoing embodiments, and the decoder 1902 can be the decoder described in any one of the foregoing embodiments.

[0477] In some embodiments, the embodiment of the present application further provides a computer readable storage medium having a computer program stored thereon. The computer program is executed by a processor to implement the method described in any one of the foregoing embodiments. Wherein the computer program is executed by a first processor to implement the encoding method described in any one of the foregoing embodiments, or executed by a second processor to implement the decoding method described in any one of the foregoing embodiments.

[0478] In some embodiments, the 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 to implement the method described in any one of the foregoing embodiments. Wherein the computer program or instructions are executed by a first processor to implement the encoding method described in any one of the foregoing embodiments, or executed by a second processor to implement the decoding method described in any one of the foregoing embodiments.

[0479] In some embodiments, the embodiment of the present application further provides a computer program, which is executed by a processor to implement the method described in any one of the foregoing embodiments. Wherein the computer program or instructions are executed by a first processor to implement the encoding method described in any one of the foregoing embodiments, or executed by a second processor to implement the decoding method described in any one of the foregoing embodiments.

[0480] In some embodiments, the present application also provides a computer readable storage medium having a code stream stored thereon. The code stream is generated by performing the steps of the encoding method according to any one of the preceding embodiments.

[0481] In the embodiments of the present application, the information to be encoded in the encoding method can include at least one of the following: the value of the first syntax element, the value of the second syntax element, the value of the third syntax element, the value of the fourth syntax element, the mode index of the current block using the first intra prediction technology, and the third vector parameter. Here, the information to be encoded is encoded and written into the code stream.

[0482] In the embodiments of the present application, the third syntax element can be used to indicate whether the first intra prediction technology is allowed to be used in the current sequence, the fourth syntax element can be used to indicate the prediction type of the current block, the second syntax element is used to indicate whether the first intra prediction technology is used in the current block, and the first syntax element is used to indicate whether the merge mode of the first intra prediction technology is used in the current block. Here, the prediction type includes intra prediction or inter prediction.

[0483] Those skilled in the art can understand that the units and algorithm steps of the examples described in combination with the embodiments disclosed in the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized 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 realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0484] Those skilled 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.

[0485] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division, and actual implementation can have another division manner. For example, multiple 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 shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0486] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e. may be located in one place, or may be distributed on multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiment of the present application according to actual needs.

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

[0488] If the functions are realized in the form of software functional 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 can be embodied in the form of software products, and the computer software products are stored in a storage medium, including a plurality of instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, and various media that can store program codes.

[0489] 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 devices including a series of elements not only include those elements, but also include other elements not explicitly listed, or include elements inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0490] The serial numbers of the embodiments of the present application described above are only for description, not representing the advantages and disadvantages of the embodiments.

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

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

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

[0494] The above merely provides a specific implementation 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 scope disclosed by the present application, which should be covered within 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

[0495] In the present embodiment, at the encoding end, when the current block uses the merge mode of the first intra prediction technology, at least one vector parameter of the current block is determined, at least one set of candidate filter parameters of the current block is determined according to the at least one vector parameter, a first candidate list of the current block is determined according to the at least one set of candidate filter parameters, and at least one set of candidate mode information in the first candidate list is respectively corresponding to a first cost result; when the current block does not use the merge mode of the first intra prediction technology, a third candidate list of the current block is determined, and at least one set of candidate mode information in the third candidate list is respectively corresponding to a second cost result; the value of a first syntax element is determined according to the first cost result and the second cost result, the value of the first syntax element is encoded, and the obtained encoding bits are written into a bitstream. At the decoding end, the first syntax element and a mode index of the current block using the first intra prediction technology are parsed from the bitstream; when the first syntax element indicates that the current block uses the merge mode of the first intra prediction technology, at least one vector parameter of the current block is determined, at least one set of candidate filter parameters of the current block is determined according to the at least one vector parameter; a first candidate list of the current block is determined according to the at least one set of candidate filter parameters; a filter parameter of the current block is determined according to the first candidate list and the mode index; and a prediction sample of the current block is determined according to the filter parameter. In this way, when the current block uses the merge mode of the first intra prediction technology, at least one set of candidate filter parameters of the current block is determined according to the at least one vector parameter, and then the at least one set of candidate filter parameters is used as candidate mode information in the first candidate list, thereby expanding the candidate range in the first candidate list; and then the filter parameter determined according to the first candidate list and the mode index parsed from the bitstream has good generalization ability, so that the filter parameter can be better applied to the sample prediction in the current block; and the prediction according to the determined filter parameter (such as the coefficient of the filter and the shape of the filter) can also improve the prediction sample accuracy of the current block, thereby improving the compression efficiency and further improving the coding and decoding performance.

Claims

1. A decoding method applied to a decoder, the method comprising: parsing a first syntax element and a mode index of a first intra prediction technique used by a current block from a bitstream; when the first syntax element indicates that a merge mode of the first intra prediction technique is used by the current block, determining at least one vector parameter of the current block, determining at least one set of candidate filter parameters of the current block according to the at least one vector parameter; determining a first candidate list of the current block according to the at least one set of candidate filter parameters; determining a filter parameter of the current block according to the first candidate list and the mode index; determining a prediction sample of the current block according to the filter parameter.

2. The method of claim 1, wherein, The at least one vector parameter comprises a first vector parameter. The determining the at least one vector parameter of the current block comprises: determining a first template of the current block; determining the first vector parameter of the current block according to a search in a decoded region based on the first template.

3. The method of claim 2, wherein, The determining the first vector parameter of the current block according to a search in a decoded region based on the first template comprises: determining one or more first candidate vector parameters according to a search in a decoded region based on the first template; determining cost results corresponding to the one or more first candidate vector parameters according to cost calculation of reference templates corresponding to the one or more first candidate vector parameters and the first template respectively; determining a minimum cost result from the cost results corresponding to the one or more first candidate vector parameters, and determining a candidate vector parameter corresponding to the minimum cost result as the first vector parameter of the current block.

4. The method of claim 1 or 2, wherein, The at least one vector parameter further comprises a second vector parameter. The determining the at least one vector parameter of the current block comprises: determining a vector candidate list; determining the second vector parameter of the current block according to one or more second candidate vector parameters in the vector candidate list.

5. The method of claim 4, wherein, The determining the second vector parameter of the current block according to one or more second candidate vector parameters in the vector candidate list comprises: determining a candidate vector parameter in a first position in the vector candidate list as the second vector parameter of the current block.

6. The method of claim 4, wherein, The determining the second vector parameter of the current block according to one or more second candidate vector parameters in the vector candidate list comprises: determining reference templates corresponding to the one or more second candidate vector parameters; determining cost results corresponding to the one or more second candidate vector parameters according to cost calculation of the reference templates corresponding to the one or more second candidate vector parameters and the first template of the current block respectively; determining a minimum cost result from the cost results corresponding to the one or more second candidate vector parameters, and determining a candidate vector parameter corresponding to the minimum cost result as the second vector parameter of the current block.

7. The method of claim 4, wherein, The determining the vector candidate list comprises: determining one or more second candidate vector parameters according to first reference information of the current block; determining the vector candidate list according to the one or more second candidate vector parameters; wherein the first reference information of the current block comprises at least one of the following: whether a neighboring block of the current block has a vector parameter; whether a non-neighboring block of the current block has a vector parameter; a first history list of vector parameters of the current block; whether a collocated block of the current block in a reference frame has a vector parameter.

8. The method of claim 1, 2, or 4, wherein, The at least one vector parameter further comprises a third vector parameter. The determining the at least one vector parameter of the current block comprises: parsing the third vector parameter in the bitstream.

9. The method of any one of claims 1 to 8, wherein, The method further comprises: after determining the at least one vector parameter of the current block, adding the at least one vector parameter into a preset storage area and / or a first history list of vector parameters.

10. The method of any one of claims 1 to 8, wherein, The determining the at least one set of candidate filter parameters according to the at least one vector parameter comprises: determining a reference region indicated by the current vector parameter; determining training samples corresponding to at least one candidate filter according to reconstructed samples of the reference region; performing filter training according to the training samples corresponding to the at least one candidate filter to determine at least one set of candidate filter parameters corresponding to the current vector parameter, the candidate filter parameters comprising a shape of the candidate filter and coefficients of the candidate filter; wherein the reference region comprises a reference block and / or a reference template, and the current vector parameter is any one of the at least one vector parameter.

11. The method of claim 10, wherein, The method further comprises: dividing the reconstructed samples of the reference region to determine at least two sets of reconstructed samples; determining training samples corresponding to at least one candidate filter combination according to the at least two sets of reconstructed samples, wherein the candidate filter combination comprises candidate filters corresponding to the at least two sets of reconstructed samples respectively; performing filter training according to the training samples corresponding to the at least one candidate filter combination to determine at least one set of candidate filter parameter combinations corresponding to the current vector parameter; wherein the candidate filter parameter combination comprises a set of candidate filter parameters corresponding to the at least two sets of reconstructed samples respectively.

12. The method of claim 11, wherein, The dividing the reconstructed samples of the reference region to determine at least two sets of reconstructed samples comprises: determining a sample reference value corresponding to the reference region, wherein the sample reference value comprises a sample mean value or a sample median value; when a first reconstructed sample in the reference region is greater than the sample reference value, dividing the first reconstructed sample into a first set of reconstructed samples in the at least two sets of reconstructed samples; when the first reconstructed sample in the reference region is less than the sample reference value, dividing the first reconstructed sample into a second set of reconstructed samples in the at least two sets of reconstructed samples; wherein the first reconstructed sample is any one of the reconstructed samples in the reference region.

13. The method of claim 4, wherein, The method further comprises: determining reference regions indicated by one or more second candidate vector parameters in the vector candidate list; determining candidate filter parameters corresponding to the one or more second candidate vector parameters respectively according to the reference regions indicated by the one or more second candidate vector parameters respectively; determining at least one set of candidate filter parameters of the current block according to the candidate filter parameters corresponding to the one or more second candidate vector parameters respectively.

14. The method of claim 1, wherein, The determining the at least one group of candidate filter parameters of the current block according to the at least one vector parameter comprises: determining reference blocks respectively indicated by the at least one vector parameter; obtaining filter parameters of the reference blocks when the reference blocks use a first intra prediction technology; taking the filter parameters of the reference blocks as a group of candidate filter parameters of the current block.

15. The method of any one of claims 1 to 14, wherein, The determining the first candidate list of the current block according to the at least one group of candidate filter parameters comprises: determining a second candidate list of the current block; determining the first candidate list of the current block according to the at least one group of candidate filter parameters and the second candidate list.

16. The method of claim 15, wherein, The determining the first candidate list of the current block according to the at least one group of candidate filter parameters and the second candidate list comprises: updating the second candidate list based on the at least one group of candidate filter parameters to obtain an updated candidate list; respectively performing cost calculation on a template region of the current block according to at least one group of candidate filter parameters in the updated candidate list to determine a cost result corresponding to each of the at least one group of candidate filter parameters in the updated candidate list; sorting the at least one group of candidate filter parameters in the updated candidate list according to the cost result to determine the first candidate list of the current block.

17. The method of claim 16, wherein, The updating the second candidate list based on the at least one group of candidate filter parameters comprises: adding a first candidate filter parameter to the second candidate list when the first candidate filter parameter does not exist in the second candidate list; skipping the step of adding the first candidate filter parameter to the second candidate list when the first candidate filter parameter exists in the second candidate list; wherein the first candidate filter parameter is any one of the at least one group of candidate filter parameters.

18. The method of claim 15, wherein, The determining the second candidate list of the current block comprises: determining at least one group of second candidate filter parameters according to second reference information of the current block; determining the second candidate list of the current block according to the at least one group of second candidate filter parameters; wherein the second reference information of the current block comprises at least one of the following: whether a neighboring block of the current block uses a first intra prediction technology; whether a non-neighboring block of the current block uses the first intra prediction technology; whether a temporal collocated block of the current block uses the first intra prediction technology; a second history list of the current block based on the first intra prediction technology.

19. The method of claim 12, wherein, When the filter parameter indicates at least two groups of filter parameters, the determining the prediction sample of the current block according to the filter parameter comprises: selecting a first group of filter parameters from the at least two groups of filter parameters when one or more samples of the current block satisfy a first condition, and determining prediction values of the one or more samples according to the first group of filter parameters; selecting a second group of filter parameters from the at least two groups of filter parameters when the one or more samples of the current block satisfy a second condition, and determining prediction values of the one or more samples according to the second group of filter parameters.

20. The method of claim 19, wherein, The method further comprises: determining a first reference value corresponding to one or more samples of the current block; determining that the one or more samples of the current block satisfy a first condition when the first reference value is greater than the sample reference value; determining that the one or more samples of the current block satisfy a second condition when the first reference value is less than the sample reference value.

21. The method of any one of claims 1 to 19, wherein, The parsing the first syntax element in the bitstream and the mode index of the current block using the first intra prediction technology comprises: parsing a second syntax element in the bitstream; when the second syntax element indicates that the current block uses the first intra prediction technology, parsing the first syntax element in the bitstream and the mode index of the current block using the first intra prediction technology.

22. The method of any one of claims 1 to 19, wherein, The method further comprises: when the first syntax element indicates that the current block does not use the merge mode of the first intra prediction technology, determining a third candidate list of the current block; determining mode information of the current block according to the third candidate list and the mode index; determining a filter parameter of the current block according to the mode information; determining a prediction sample of the current block according to the filter parameter.

23. The method of claim 22, wherein, The filter parameter comprises a shape of a filter and a coefficient of the filter; and the determining the filter parameter of the current block according to the mode information comprises: determining the shape of the filter and a template region of the current block according to the mode information; determining input samples and output samples of the filter according to the template region of the current block; determining the coefficient of the filter according to the filter training based on the input samples and the output samples of the filter.

24. The method of claim 22, wherein, The determining the third candidate list of the current block comprises: determining shapes of at least one candidate template region and at least one candidate filter according to a width and a height of the current block; determining the third candidate list of the current block according to the shapes of the at least one candidate template region and the at least one candidate filter; wherein the third candidate list comprises at least one set of candidate mode information, and the candidate mode information comprises the shapes of the candidate template region and the candidate filter.

25. An encoding method applied to an encoder, the method comprising: when a current block uses a merge mode of a first intra prediction technology, determining at least one vector parameter of the current block, determining at least one set of candidate filter parameters of the current block according to the at least one vector parameter, and determining a first candidate list of the current block according to the at least one set of candidate filter parameters, and determining a first cost result corresponding to each of at least one set of candidate mode information in the first candidate list; when the current block does not use the merge mode of the first intra prediction technology, determining a third candidate list of the current block, and determining a second cost result corresponding to each of at least one set of candidate mode information in the third candidate list; determining a value of a first syntax element according to the first cost result and the second cost result, wherein the first syntax element is used to indicate whether the current block uses the merge mode of the first intra prediction technology. Encode the value of the first syntax element, and write the obtained coding bits into the bitstream.

26. The method of claim 25, wherein, The determining of the value of the first syntax element according to the first cost result and the second cost result comprises: if the minimum cost result in the first cost result is smaller than the minimum cost result in the second cost result, determining the value of the first syntax element as a first value; if the minimum cost result in the first cost result is greater than the minimum cost result in the second cost result, determining the value of the first syntax element as a second value. The method further comprises:

27. The method of claim 25, wherein, when the minimum cost result in the first cost result is smaller than the minimum cost result in the second cost result, determining first candidate mode information corresponding to the minimum cost result in the first cost result; determining a mode index of the current block using the first intra prediction technology according to an index sequence number of the first candidate mode information in the first candidate list; encoding the mode index of the current block using the first intra prediction technology, and writing the obtained coding bits into the bitstream. The method further comprises:

28. The method of claim 25, wherein, when the minimum cost result in the first cost result is greater than the minimum cost result in the second cost result, determining second candidate mode information corresponding to the minimum cost result in the second cost result; determining a mode index of the current block using the first intra prediction technology according to an index sequence number of the second candidate mode information in the third candidate list; encoding the mode index of the current block using the first intra prediction technology, and writing the obtained coding bits into the bitstream. The method further comprises:

29. The method of claim 25, wherein, determining a third cost result corresponding to other prediction technologies except the first intra prediction technology used by the current block; determining a value of a second syntax element according to the first cost result, the second cost result and the third cost result, wherein the second syntax element is used to indicate whether the current block uses the first intra prediction technology; encoding the value of the second syntax element, and writing the obtained coding bits into the bitstream. The determining of the value of the second syntax element according to the first cost result, the second cost result and the third cost result comprises:

30. The method of claim 29, wherein, if the minimum cost result in the first cost result and the second cost result is smaller than the minimum cost result in the third cost result, determining the value of the second syntax element as a first value; if the minimum cost result in the first cost result and the second cost result is greater than the minimum cost result in the third cost result, determining the value of the second syntax element as a second value. The at least one vector parameter comprises a first vector parameter; 31. The method of claim 25, wherein, The determining of the at least one vector parameter of the current block comprises: determining a first template of the current block; searching in the coded region according to the first template to determine a first vector parameter of the current block. The searching in the coded region according to the first template to determine the first vector parameter of the current block comprises:

32. The method of claim 31, wherein, searching in the coded region according to the first template to determine the first vector parameter of the current block. searching in the coded region according to the first template to determine one or more first candidate vector parameters; performing cost calculation on the first template respectively according to reference templates corresponding to the one or more first candidate vector parameters to determine cost results corresponding to the one or more first candidate vector parameters; determining a minimum cost result from the cost results corresponding to the one or more first candidate vector parameters, and determining a candidate vector parameter corresponding to the minimum cost result as the first vector parameter of the current block.

33. The method of claim 25 or 31, wherein, The at least one vector parameter further includes a second vector parameter. The determining of the at least one vector parameter of the current block includes: determining a vector candidate list; determining the second vector parameter of the current block according to one or more second candidate vector parameters in the vector candidate list.

34. The method of claim 33, wherein, The determining of the second vector parameter of the current block according to one or more second candidate vector parameters in the vector candidate list includes: determining a candidate vector parameter in a first position in the vector candidate list as the second vector parameter of the current block.

35. The method of claim 33, wherein, The determining of the second vector parameter of the current block according to one or more second candidate vector parameters in the vector candidate list includes: determining reference templates corresponding to the one or more second candidate vector parameters; performing cost calculation on the first template of the current block respectively according to the reference templates corresponding to the one or more second candidate vector parameters to determine cost results corresponding to the one or more second candidate vector parameters; determining a minimum cost result from the cost results corresponding to the one or more second candidate vector parameters, and determining a candidate vector parameter corresponding to the minimum cost result as the second vector parameter of the current block.

36. The method of claim 25, 31, or 33, wherein, The at least one vector parameter further includes a third vector parameter. The determining of the at least one vector parameter of the current block includes: searching in a current image based on the current block to determine one or more candidate reference blocks; performing cost calculation on the current block respectively according to the one or more candidate reference blocks to determine cost results corresponding to the one or more candidate reference blocks, and determining a minimum cost result from the cost results corresponding to the one or more candidate reference blocks, and determining a candidate reference block corresponding to the minimum cost result as a matching block; determining the third vector parameter of the current block according to a vector parameter between the current block and the matching block.

37. The method of claim 36, wherein, The method further includes: performing encoding processing on the third vector parameter of the current block, and writing obtained encoding bits into a bitstream.

38. The method of any one of claims 25 to 37, wherein, The method further includes: after the determining of the at least one vector parameter of the current block, adding the at least one vector parameter into a preset storage area and / or a first history list based on vector parameters.

39. The method of any one of claims 25 to 38, wherein, The determining of at least one group of candidate filter parameters according to the at least one vector parameter includes: determining a reference region indicated by a current vector parameter; determining training samples corresponding to at least one candidate filter according to reconstructed samples of the reference region; performing filter training on the training samples corresponding to the at least one candidate filter, and determining at least one candidate filter parameter combination corresponding to the current vector parameter, wherein the candidate filter parameter combination comprises at least one candidate filter parameter corresponding to each of the at least two groups of reconstructed samples. The reference region comprises a reference block and / or a reference template, and the current vector parameter is any one of the at least one vector parameter.

40. The method of claim 39, wherein, The method further comprises: dividing the reconstructed samples of the reference region to determine at least two groups of reconstructed samples; determining training samples corresponding to at least one candidate filter combination according to the at least two groups of reconstructed samples, wherein the candidate filter combination comprises candidate filters corresponding to the at least two groups of reconstructed samples respectively; performing filter training on the training samples corresponding to the at least one candidate filter combination, and determining at least one candidate filter parameter combination corresponding to the current vector parameter; The candidate filter parameter combination comprises at least one candidate filter parameter corresponding to each of the at least two groups of reconstructed samples.

41. The method of claim 25, wherein, The determining at least one candidate filter parameter combination corresponding to the current vector parameter comprises: determining a reference block indicated by each of the at least one vector parameter; when the reference block uses a first intra-prediction technology, obtaining filter parameters of the reference block; taking the filter parameters of the reference block as a candidate filter parameter of the current block.

42. The method of any one of claims 25 to 41, wherein, The determining the first candidate list of the current block according to the at least one candidate filter parameter comprises: determining a second candidate list of the current block; determining the first candidate list of the current block according to the at least one candidate filter parameter and the second candidate list.

43. The method of claim 42, wherein, The determining the first candidate list of the current block according to the at least one candidate filter parameter and the second candidate list comprises: updating the second candidate list based on the at least one candidate filter parameter to obtain an updated candidate list; performing cost calculation on a template region of the current block according to at least one candidate filter parameter in the updated candidate list to determine a cost result corresponding to the at least one candidate filter parameter in the updated candidate list respectively; sorting the at least one candidate filter parameter in the updated candidate list according to the cost result to determine the first candidate list of the current block.

44. The method of any one of claims 25 to 43, wherein, The determining the third candidate list of the current block comprises: determining at least one candidate template region and shapes of at least one candidate filter according to a width and a height of the current block; determining the third candidate list of the current block according to the at least one candidate template region and the shapes of the at least one candidate filter, wherein the third candidate list comprises at least one candidate mode information, and the candidate mode information comprises the candidate template region and the shapes of the candidate filter.

45. An encoder, comprising a first determining unit and an encoding unit, wherein: The first determining unit is configured to, when the current block uses the merge mode of the first intra prediction technology, determine at least one vector parameter of the current block, determine at least one set of candidate filter parameters of the current block according to the at least one vector parameter, and determine a first candidate list of the current block according to the at least one set of candidate filter parameters, and determine a first cost result corresponding to each set of candidate mode information in the first candidate list. When the current block does not use the merge mode of the first intra prediction technology, determine a third candidate list of the current block, and determine a second cost result corresponding to each set of candidate mode information in the third candidate list. And According to the first cost result and the second cost result, determine a value of a first syntax element, wherein the first syntax element is used to indicate whether the current block uses the merge mode of the first intra prediction technology. The encoding unit is configured to encode the value of the first syntax element, and write the obtained encoded bits into a bitstream.

46. 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. The first processor is configured to execute the method in any one of claims 25 to 44 when running the computer program.

47. A decoder, comprising a decoding unit, a second determining unit and a second prediction unit, wherein: The decoding unit is configured to parse a first syntax element and a mode index of a first intra prediction technology in a bitstream. The second determining unit is configured to, when the first syntax element indicates that the current block uses the merge mode of the first intra prediction technology, determine at least one vector parameter of the current block, determine at least one set of candidate filter parameters of the current block according to the at least one vector parameter, determine a first candidate list of the current block according to the at least one set of candidate filter parameters, and determine a filter parameter of the current block according to the first candidate list and the mode index. The second prediction unit is configured to determine a prediction sample of the current block according to the filter parameter.

48. 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. The second processor is configured to execute the method in any one of claims 1 to 24 when running the computer program. The computer program is executed by the processor to implement the method in any one of claims 1 to 24, or to implement the method in any one of claims 25 to 44. The bitstream is generated by executing the encoding method in any one of claims 25 to 44.

49. A computer readable storage medium having stored thereon a computer program, wherein, ​ 50. A computer-readable storage medium having a code stream stored thereon, wherein, ​

Citation Information

Patent Citations

  • Method for encoding / decoding image signal and device for same

    CN112930685A

  • Coding method, decoding method and equipment

    CN114915782A

  • Method and apparatus for intra prediction boundary filtering with multiple reference layers in video encoding and decoding

    EP3531702A1

  • Image processing apparatus and method

    US20180302629A1