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

CN121970327APending Publication Date: 2026-05-01GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2023-09-28
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Common block vector-based prediction techniques have problems with low encoding and decoding efficiency and poor performance, especially in the process of texture edge information loss and high complexity.

Method used

By determining the prediction parameters of the current block in the codec, determining the first reference block based on these parameters, and determining the transformation parameters using the first reference block that has not been processed by data, the reconstruction is completed in combination with the prediction block after data processing.

Benefits of technology

This method can effectively improve the performance and efficiency of encoding and decoding, and shorten the length of the critical path of encoding and decoding by retaining more texture edge information and performing key steps in parallel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121970327A_ABST
    Figure CN121970327A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a coding and decoding method, a code stream, a coder, a decoder and a storage medium. The method comprises the steps that the coder and the decoder determine a prediction parameter corresponding to a current block; determining a first reference block of the current block according to the prediction parameter of the current block; determining a first transformation parameter of the current block according to a first reference block of the current block; determining a prediction block of the current block according to the first reference block of the current block; and determining a reconstruction block corresponding to the current block based on the prediction block of the current block and the first transformation parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Coding and decoding method, code stream, encoder, decoder and storage medium Technical Field The embodiments of the present application relate to the field of video coding and decoding technology, and in particular, to a coding and decoding method, a bit stream, an encoder, a decoder, and a storage medium. Background Art Common prediction techniques based on block vector (BV), such as intra template matching prediction (Intra TMP) or intra block copy (IBC), can use the best matching reconstructed block as the prediction block of the current coding block. After the prediction block undergoes data processing processes such as filtering and fusion, the final prediction block can be obtained. Based on the final prediction block, the decoder-side intra mode derivation (DIMD) can be further used to derive a low-frequency non-separable secondary transform (LFNST) transform set, and then the LFNST transform set can be used to perform subsequent inverse transform processing. However, after the final prediction block has been processed by filtering, fusion and other data processing processes, some texture edge information will be lost, which will affect the accuracy of the subsequent LFNST transform set derivation to a certain extent, that is, the derived LFNST transform set may not necessarily be the most matching, which reduces the encoding and decoding performance. At the same time, the prediction process of sequentially performing prediction block processing, LFNST transform set derivation and inverse transform processing also has the problem of high complexity, which reduces the encoding and decoding efficiency. In other words, the common BV-based prediction technology has the problems of low encoding and decoding efficiency and poor performance. Summary of the invention The embodiments of the present application provide a coding and decoding method, a bit stream, an encoder, a decoder and a storage medium, which can effectively improve the coding and decoding efficiency and performance. The technical solution of the embodiment of the present application can be implemented as follows: In a first aspect, an embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes: Determine the prediction parameters corresponding to the current block; Determine a first reference block of the current block according to a prediction parameter of the current block; Determining a first transformation parameter of the current block according to a first reference block of the current block; Determine a prediction block of the current block according to a first reference block of the current block; A reconstructed block corresponding to the current block is determined based on the prediction block of the current block and the first transformation parameter. In a second aspect, an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes: Determine the prediction parameters corresponding to the current block; Determine a first reference block of the current block according to a prediction parameter of the current block; Determining a first transformation parameter of the current block according to a first reference block of the current block; Determine a prediction block of the current block according to a first reference block of the current block; A reconstructed block corresponding to the current block is determined based on the prediction block of the current block and the first transformation parameter. In a third aspect, an embodiment of the present application provides a code stream, wherein the code stream is generated by bit encoding according to information to be encoded; wherein the information to be encoded includes at least one of the following: Prediction mode identification information corresponding to the current block, first identification information, first transform coefficient corresponding to the prediction residual, and transform core index number. In a fourth aspect, an embodiment of the present application provides an encoder, the encoder comprising: a first determining unit; wherein, The first determination unit is configured to determine a prediction parameter corresponding to a current block; determine a first reference block of the current block according to the prediction parameter of the current block; determine a first transformation parameter of the current block according to the first reference block of the current block; determine a prediction block of the current block according to the first reference block of the current block; and determine a reconstructed block corresponding to the current block based on the prediction block of the current block and the first transformation parameter. In a fifth aspect, an embodiment of the present application provides an encoder, the encoder comprising a first memory and a first processor; wherein, The first memory is used to store a computer program that can be run on the first processor; The first processor is used to execute the method as described in the second aspect when running the computer program. In a sixth aspect, an embodiment of the present application provides a decoder, the decoder comprising: a second determining unit; wherein, The second determination unit is configured to determine a prediction parameter corresponding to a current block; determine a first reference block of the current block according to the prediction parameter of the current block; determine a first transformation parameter of the current block according to the first reference block of the current block; determine a prediction block of the current block according to the first reference block of the current block; and determine a reconstructed block corresponding to the current block based on the prediction block of the current block and the first transformation parameter. In a seventh aspect, an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein: The second memory is used to store a computer program that can be run on the second processor; The second processor is used to execute the method of the first aspect when running the computer program. In an eighth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed, the method of the first aspect or the second aspect is implemented. The embodiment of the present application proposes a coding and decoding method, a code stream, an encoder, a decoder and a storage medium, wherein the encoder and decoder determine the prediction parameters corresponding to the current block; determine the first reference block of the current block according to the prediction parameters of the current block; determine the first transformation parameters of the current block according to the first reference block of the current block; determine the prediction block of the current block according to the first reference block of the current block; and determine the reconstruction block corresponding to the current block based on the prediction block of the current block and the first transformation parameters. That is, in the embodiment of the present application, after determining the first reference block of the current block based on the prediction parameters, the first reference block that has not been processed by data can be directly used to determine the transformation parameters of the current block, and then the determined transformation parameters can be used in combination with the prediction block of the current block obtained after data processing of the first reference block to complete the reconstruction of the current block. Among them, the data processing process will lose the texture edge information of the prediction block to a certain extent, so the initial prediction value before data processing (i.e., the first reference block) has richer texture edge information than the final prediction value after data processing (i.e., the prediction block), and the first reference block is used to derive the prediction direction, which can obtain more accurate transformation parameters, thereby effectively improving the coding and decoding performance. At the same time, after determining the first reference block directly indicated by the prediction parameter, the generation of the prediction block, and the generation of the transform parameters and the residual can be performed in parallel, which shortens the length of the encoding and decoding key path, solves the problem of high complexity, and thus can improve the encoding and decoding efficiency. It can be seen that the encoding and decoding method proposed in the embodiment of the present application can improve the encoding and decoding efficiency and performance. BRIEF DESCRIPTION OF THE DRAWINGS FIG1 is a schematic diagram of the application of LFNST technology; FIG2 is a schematic diagram of obtaining reconstructed pixel values ​​based on the BV prediction mode; FIG3 is a schematic diagram of the prediction of Intra TMP; FIG4 is a schematic diagram of a template type of Intra TMP technology; FIG5 is a schematic diagram of a template search area; FIG6 is a schematic diagram of adjacent blocks; Figure 7 is a schematic diagram of TM-FLM prediction; FIG8 is a schematic block diagram of the composition of an encoder proposed in an embodiment of the present application; FIG9 is a schematic block diagram of a decoder according to an embodiment of the present application; FIG10 is a schematic diagram of a network architecture of a coding and decoding system proposed in an embodiment of the present application; [Corrected 13.11.2023 according to Rule 91] FIG11 is a flowchart of a decoding method proposed in an embodiment of the present application; [Corrected 13.11.2023 according to Rule 91] FIG12 is a schematic diagram of the transformation matrix selection process proposed in an embodiment of the present application; FIG13 is a schematic diagram 1 of obtaining a reconstructed pixel value based on a BV prediction mode proposed in an embodiment of the present application; FIG14 is a second schematic diagram of obtaining reconstructed pixel values ​​based on the BV prediction mode proposed in an embodiment of the present application; FIG15 is a schematic diagram of a flow chart of an encoding method proposed in an embodiment of the present application; FIG16 is a schematic diagram of the first structure of the encoder according to an embodiment of the present application; FIG17 is a second schematic diagram of the structure of the encoder proposed in an embodiment of the present application; FIG18 is a schematic diagram of the first structure of a decoder according to an embodiment of the present application; FIG. 19 is a second schematic diagram of the composition structure of the decoder proposed in an embodiment of the present application. DETAILED DESCRIPTION In order to enable a 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 in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application. In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. 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 ordering of the objects. It is understandable that "first\second\third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. It can be understood that in a video image, a first color component, a second color component, and a third color component are generally used to represent a coding block. Among them, the three color components are a brightness component, a blue chroma component, and a red chroma component. Specifically, the brightness component is usually represented by the symbol Y, the blue chroma component is usually represented by the symbol Cb or U, and the red chroma component is usually represented by the symbol Cr or V; in this way, the video image can be represented in the YCbCr format or the YUV format. Currently, there are two main prediction modes based on block vector (BV): intra block copy (IBC) and intra template matching prediction (IntraTMP). Among them, intra-frame block copy IBC is an extension tool of H.266 / Versatile Video Coding (VVC) for the coding of video sequences of screen content type (screen content coding), which significantly improves the coding efficiency of screen content sequences. IBC is a block-level coding mode. The encoder performs block matching (BM) to determine the block vector (BV) for the current coding block, which can also be called the motion vector (MV). The block vector is a vector pointing from the current block to the reference block. The block vector of IBC is obtained by searching the reconstructed area of ​​the frame where the current coding block is located (i.e., the current coding frame), while the inter-frame motion vector is obtained by searching the reference frame of the current coding frame in the time domain. Intra-frame template-based prediction IntraTMP is also a coding mode for intra-frame prediction based on BV. The matching criterion in its search process is not based on the matching degree of the coding block itself, but on template matching (TM). The low-frequency non-separable secondary transform (LFNST) technology mainly includes five steps: configuring core parameters, intra-frame prediction mode mapping, transform matrix selection, matrix multiplication calculation, and primary transform coefficient matrix construction. Specifically, since the transform matrix in LFNST is related to the directional characteristics of the prediction mode, the selection of the transform matrix is ​​achieved by determining the transform set corresponding to the intra-frame prediction mode. On the decoding side, taking the IBC and IntraTMP modes as examples, the basic decoding process includes obtaining BV, using BV to obtain predicted values, and determining reconstructed values. First, determine the BV. In actual implementation, there are many ways to obtain the BV, such as the decoder directly obtaining an optimal BV by searching for BVs within a certain range, or the decoder first constructs a candidate BV list and then determines the specific information of the BV to be used based on the syntax elements in the bitstream. Secondly, the prediction value is determined according to the BV. Using the BV, the corresponding area pointed to by the BV is usually subjected to data processing such as copying, filtering, and fusion to obtain the prediction value of the current block. In addition, the prediction residual is obtained by decoding the bit stream, and then the prediction residual is added to the prediction value to obtain the final reconstructed value. At the decoding end, the residual value is obtained by dequantizing and inversely transforming the quantized coefficients obtained from the bitstream. The transformation link may include a primary transformation or a primary transformation and a secondary transformation. When decoding, the inverse transformation of the secondary transformation is performed first, and then the inverse transformation of the primary transformation is performed. At the encoding end, the residual value (original) is first obtained by subtracting the predicted value from the original data, and then undergoes transformation, quantization, inverse quantization, and inverse transformation to obtain the residual value required for reconstruction consistent with the decoding end. FIG1 is a schematic diagram of the application of LFNST technology. Referring to FIG1 , it shows a schematic diagram of the application position of LFNST technology provided by the related technical solution. As shown in FIG1 , in the intra-frame prediction mode, for the encoder side, the LFNST technology is applied between the positive primary transform unit 11 and the quantization unit 12, and for the decoder side, the LFNST technology is applied between the inverse quantization unit 13 and the inverse primary transform unit 14. That is to say, on the encoder side, the prediction residual of the current transform block can obtain the primary transform coefficient through the positive primary transform, and then some of the primary transform coefficients are transformed secondary through matrix multiplication to obtain fewer and more concentrated secondary transform coefficients, which are then quantized; on the decoder side, after parsing the quantization value, it is inverse quantized, the inverse quantized coefficients are inversely transformed secondary through matrix multiplication, and then the coefficients after the inverse secondary transform are inversely transformed primary to restore the prediction residual. Figure 2 is a schematic diagram of obtaining reconstructed pixel values ​​based on the BV prediction mode. As shown in Figure 2, in the process of reconstructing pixel values, it can mainly include the following steps: S1, determining block vectors, S2, generating initial prediction values, S3, generating final prediction values, S4, intra-frame prediction mode mapping, S5, determining transform block matrices, S6, secondary transform inverse transform, S7, primary transform inverse transform, and S8, generating reconstructed values. S1. Determine the block vector: (1) Brightness: Input: luma position (xCb, yCb), which specifies the top left corner sample of the current coding block relative to the top left corner luma sample of the current picture, a variable cbWidth, which specifies the width of the current coding block in luma samples, and a variable cbHeight, which specifies the height of the current coding block in luma samples. Output: Block Vector Luma (BVL) The above search process is performed at the decoding end. In the IntraTMP mode, the template (T) of the coding block is used to search for the matching template (T_BEST) with the minimum cost in the predefined search range in the current image according to the preset cost function, where the offset of the best matching template relative to the current coding block template is the best block vector (BEST Block Vector, BV_BEST), and then the reconstructed block (Ref Block) corresponding to the matching template is used as the prediction block of the current coding block (Cur Block). The template of the coding block is usually selected from the adjacent reconstructed area of ​​the current coding block. Exemplarily, taking the adjacent reconstructed area of ​​the current block as an example, FIG3 is a prediction diagram of Intra TMP. As shown in FIG3 , the area filled with dark color represents the reconstructed area, the block filled with a grid is the current block, and the adjacent area of ​​the current block is the first template (T); the block filled with oblique lines is the reference block, and the adjacent area of ​​the reference block is the second template (i.e., the best matching template, T_BEST); wherein, the offset of the second template relative to the first template is the best block vector (BV_BEST), at this time, the reference block can be block copied as the prediction block of the current block. In an embodiment of the present application, the preset cost function can be the absolute error sum SAD, the absolute transformation difference sum SATD, the mean square error MSE, the error square sum SSD, the mean absolute difference MAD, the mean error square sum MSD, the normalized correlation coefficient NCC, etc., which is not specifically limited here. For example, taking absolute error and SAD as examples, the cost function at this time is as follows: Among them, T i is the template in the search process, and M represents the number of pixels in the template. Specifically, in the IntraTMP mode, the template type is first obtained, and then the template pixels are obtained around the current block based on the template type, and the search is performed within the predefined search range. It should also be noted that refTemplateType can be used to represent the template type. Figure 4 is a schematic diagram of the template type of the Intra TMP technology. As shown in Figure 4, the block filled with the grid is the current block, and the adjacent area of ​​the current block is the template T. Six template types are shown here. By way of example, the six template types are as follows: When the upper left reference pixel, the upper reference pixel, and the left reference pixel are all available, the value of refTemplateType is 1, and the template shape is as shown in (a) of FIG. 3 ; When only the left reference pixel is available, the value of refTemplateType is 2, and the template shape is shown in (b) of Figure 3; When only the upper reference pixel is available, the value of refTemplateType is 3, and the template shape is shown in (c) of Figure 3; When only the left reference pixel and the upper left reference pixel are available, the value of refTemplateType is 4, and the template shape is shown in (d) of FIG3 ; When only the left reference pixel and the lower left reference pixel are available, the value of refTemplateType is 5, and the template shape is shown in (e) of FIG3 ; When only the upper reference pixel and the upper right reference pixel are available, the value of refTemplateType is 6, and the template shape is shown in (f) in FIG. 3 . It should be noted that the search area of ​​the Intra TMP technology is the reconstructed part of the current image and is limited by the size of the search range. FIG5 is a schematic diagram of the template search area. As shown in FIG5, the background area filled with dark color is the reconstructed area, the background block filled with black color is the current block, and the dotted box is the search range window. Therefore, the search area of ​​the IntraTMP technology is not larger than the overlapping part of the reconstructed area represented by the dark background and the area marked by the dotted box. If the final BV is determined directly by the preset matching criteria, the item with the minimum cost is the final BV. If the BV candidate list is established by a preset matching criterion, the list stores multiple BV candidates in order of cost from small to large, and then the corresponding syntax elements in the bitstream determine which BV candidate or candidates are finally selected. The one or more BV candidates will be used as the BV for obtaining the preliminary prediction sample. BVL[0] = BVCandList[BVIdx][0] BVL[1] = BVCandList[BVIdx][1] In the actual implementation of IBC, BV can be obtained in multiple ways, so the bitstream can contain mode information about the BV acquisition method and corresponding parameter information. For example, if the IBC MEGRE mode is obtained in the syntax element, the decoder constructs a MEGRE list, parses the MEGRE list option index, and then obtains the specific information of BV from the corresponding option in the MEGRE list according to the index; for another example, in the ordinary IBC mode, the decoder obtains the specific information of BV by decoding the value of the syntax element that describes BV or BV prediction difference in the bitstream. The IBC model can be roughly divided into two categories: IBC MEGRE and IBC ABVP. The process of obtaining BV can be regarded as the following three steps: ① When deriving BVL, it is necessary to establish an IBC block vector candidate list BVCandList. ②Then determine the candidate items in the selected list based on the bitstream, ③Finally, the final BV is determined based on the candidate. The specific storage information of the IBC candidate includes at least one of the following information: i. Prediction direction (L0 or L1, generally L0 is the default) ii.BV information (horizontal and vertical components) iii. Reference frame (default current image) iv. Flip type (e.g. no flip, horizontal flip, and vertical flip) v. Whether to use LIC (linear model) The process of establishing the candidate list, taking the process of establishing the IBC MEGRE list as an example, the basic process of establishing the IBC ABVP list is consistent with that of IBC MEGRE, but the maximum number of candidates of the two is inconsistent (for example, the length of the IBC MEGRE candidate list is defined as 6, and the length of the IBC ABVP candidate list is defined as 2). Step 1: Derivation of spatial candidates: When the usage conditions are met (for example, the size condition IsGt4by4 is equal to TRUE (TRUE when the luma width multiplied by the height is greater than 16)), the derivation process of spatial block vector candidates from neighboring coding units specified by the decoding specification is called with the luma coding block position (xCb, yCb), luma coding block width cbWidth and height cbHeight as input, and the output is availability flags such as availableFlagA1, availableFlagB1 and block vectors BVA1 and BVB1. The availability check of the candidate items is as follows. The following conditions are judged. If all of them are met, the candidate items are available: Whether the offset position obtained by adding the current block position to the BVP does not exceed the Picture boundary; Whether the current block position plus the block position pointed to by BVP does not cover the current block; Whether the offset position obtained by adding the current block position to the BVP does not exceed the IBC available area; Whether the current block position plus the block position pointed to by BVP has been rebuilt; A1 and B1 are adjacent blocks. FIG6 is a schematic diagram of adjacent blocks. As shown in FIG6, the adjacent blocks where A1 and B1 are located are located at the lower left corner and the upper right corner of the current coding block, respectively. The traversal order may be A1->B1->B0->A0->B2. Step 2: Airspace candidates are added to the candidate list: When the usage condition is met (for example, the size condition IsGt4by4 is equal to TRUE), the block vector candidate list BVCandList is constructed as follows: i=0if(availableFlagA1)BVCandList[i++]=BVA1if(availableFlagB1)BVCandList[i++]=BVB1 … Step 3: Check the number of valid items in the candidate list: The variable numCurrCand (the number of candidates currently obtained) is derived as follows: If the usage condition is met (for example, the size condition IsGt4by4 is equal to TRUE), numCurrCand is set equal to the number of candidates in BVCandList; otherwise numCurrCand is set to 0. Step 4: If the candidate list does not reach the specified number of items (for example, the specified number of items for the IBC MEGRE model is 6, and the specified number of items for the IBC ABVP model is 2), continue to derive historical candidate items, detect availability, and add: When numCurrCand is less than MaxNumIbcMEGRECand (the maximum number of candidates in IBC MEGRE mode) and NumHmvpIbcCand (the maximum number of candidates for the historical best block vector (Hmvp) in IBC mode) is greater than 0, the derivation process of the history-based IBC block vector candidates specified in the decoding specification is called with BVCandList and numCurrCand as input and the modified BVCandList and numCurrCand as output. Step 5: Continue to check the number of valid items in the candidate list and add other available candidates (such as pairwise average candidates, zero-value BV candidates, etc.) until the specified number of items is reached. In the process of determining the candidate items in the selected list according to the code stream, the candidate index BVIdx in IBV MEGRE mode (general_MEGRE_flag[xCb][yCb] is true) and IBC ABVP mode (general_MEGRE_flag[xCb][yCb] is false) is derived as follows, general_MEGRE_flag indicates whether it is IBC MEGRE mode: BVIdx=general_MEGRE_flag[xCb][yCb]? MEGRE_idx[xCb][yCb]:mvp_l0_flag[xCb][yCb] In the process of determining the final BV based on the candidate, in IBC MEGRE mode, the specific BVL can be obtained according to the index BVIdx and the block vector candidate list BVCandList: BVL[0] = BVCandList[BVIdx][0] BVL[1] = BVCandList[BVIdx][1] This BVL is the final BV. In the IBC MBVD mode, similar to the MMVD in the inter-frame technology of VVC, a candidate in the IBC MEGRE list is used as the starting point, and a candidate is selected from the candidate point set corresponding to the predefined distance and direction set, and its corresponding block vector is used as the final BV. For example, in IBC MBVD, the distance set is defined as {1-pel, 2-pel, 4-pel, 8-pel, 12pel, 16pel, 24pel, 32pel, 40pel, 48pel, 56pel, 64pel, 72pel, 80pel, 88pel, 96pel, 104pel, 112pel, 120pel, 128pel}, and the BVD directions are positive and negative horizontal directions and positive and negative vertical directions. The base candidate is selected from the first five candidates in the reordered IBC MEGRE list, and the refinement positions of some or all possible MBVDs of the base candidate (i.e., 20×4 candidates) are reordered based on the SAD cost between the template and its reference at each refinement position. Finally, the first 8 refinement positions with the smallest template SAD are retained for MBVD index encoding. The candidates of IBC-MBVD do not inherit the flip type from the neighboring blocks encoded by RR-IBC. The MBVD index is binarized by a Rice code with parameter equal to 1. In the IBC TM MEGRE mode, after obtaining the BVL based on the above information, the TM can also be used to locally refine the BV. The specific operation is to search in a small range centered on the obtained BVL, and select the optimal BV in the range as the final BV based on the minimum template matching cost. The specific implementation process of TM refinement of the candidate list of IBC MEGRE mode is as follows: When building candidates, the flip type defaults to no flip; IBC TM MEGRE mode In IBC MEGRE mode, the transmission syntax element specifies whether to perform TM refinement with integer pixel precision. The location of the refined motion vector and the template used in each refinement step must comply with the reference area constraints. The search is performed near the pointed position of the candidate, and the SAD size between the template of the reference block and the template of the current block is used to determine the optimal position. For the IBC ABVP mode, the BVL obtained by indexing BVIdx and the block vector candidate list BVCandList is the predicted BVL, and the real BVL also needs to add the block vector difference (Block Vector Difference, BVD). The final derived BV should be within the specified range (coordinate range in rows and columns). (2) Chroma: The BV of chroma can be derived from the BV of luma, and prediction and reconstruction can be achieved based on this BV. The process of deriving the BV of chroma from the BV of luma is as follows: Input: BVL of brightness (1 / 16 pixel accuracy) Output: BVC (Block Vector Chroma) of chroma (1 / 32 pixel accuracy) The derivation process can be direct scaling, or after scaling, refinement using TM. The scaling operation example is as follows: BVC[0] = ((BVL[0]>>(3+SubWidthC))×32) BVC[1] = ((BVL[1]>>(3+SubHeightC))×32) The variables SubWidthC and SubHeightC depend on the chroma format sampling structure specified by sps_chroma_format_idc. The specific correspondence is as follows: Table 1. Correspondence between sps_chroma_format_idc and chroma format sampling structure S2. Generate initial prediction value: Input: luma position (xCb, yCb), which specifies the top-left sample of the current coding block relative to the top-left luma sample of the current picture, a variable cbWidth, which specifies the width of the current coding block in luma samples, a variable cbHeight, which specifies the height of the current coding block in luma samples, a block vector BV, and a variable cIdx, which specifies the color component index of the current block. Output: array predSamples of predicted samples. An example of the derivation process of directly copying the prediction block is as follows: When cIdx is equal to 0, that is, the brightness component, for x = xCb..xCb+cbWidth-1 and y = yCb..yCb+cbHeight-1: xVb = (x+(BVL[0]>>4))&(IbcBufWidthY-1)yVb = (y+(BVL[1]>>4))&(CtbSizeY-1)predSamples[x][y] = ibcVirBuf[0][xVb][yVb] IbcBufWidthY is the width of the brightness pixel of the reconstructed buffer stored in IBC, CtbSizeY is the size of CTU (Coding Tree Unit), and ibcVirBuf is the reconstructed pixel stored in IBC. When cIdx is not equal to 0, that is, it is a chrominance component, for x = xCb / SubWidthC..xCb / SubWidthC+cbWidth / SubWidthC-1 and y = yCb / SubHeightC..yCb / SubHeightC+cbHeight / SubHeightC-1: xVb = (x+(BVC[0]>>4))&(IbcBufWidthC-1)yVb = (y+(BVC[1]>>4))&((CtbSizeY / subHeightC)-1)predSamples[x][y] = ibcVirBuf[cIdx][xVb][yVb]. S3, generate the final prediction value: In IntraTMP mode, in addition to the basic copying method to obtain prediction values, there is also a method of obtaining prediction values ​​by fusing corresponding positions of multiple BVs, a method of filtering the reference block corresponding to the BV and then copying it, and a method of pixel-by-pixel interpolating the corresponding reference block of the BV and then copying it. For example, after obtaining the BV candidate list by using template matching during the decoding end area search process, the first N items (eg, N=3) are selected for weighted fusion. This method may be called the IntraTMP Fusion mode. Alternatively, after obtaining an optimal BV, multiple points are taken around the BV, and the corresponding predicted values ​​of the multiple points are weighted and fused to obtain the predicted value. This method can be called the IntraTMP FLM mode. Alternatively, after obtaining an optimal BV, the templates are sorted using sub-pixel accuracy, the optimal direction and accuracy are selected, and the prediction value is calculated using an interpolation filter. This method can be called the IntraTMP SubPel mode. In IBC mode, in addition to the above basic copying method to obtain the prediction value, there is also an IBC flip mode, which requires the prediction area to be flipped horizontally or vertically as a method of obtaining the prediction value. For example, a syntax element is used to indicate whether to flip, and if so, whether to flip horizontally or vertically. The decoding end rearranges the reference area pixels in the horizontal or vertical direction in reverse according to the instructions of the syntax to obtain the predicted pixel values ​​of the coding block. Or use the template to build a model between the current block and the predicted area, and then process the predicted block according to the model to get the predicted value of the current block. For example, the IBC LIC mode, applied to IBC MEGRE and IBC ABVP, uses a linear equation to compensate for local illumination changes. Similar to the LIC of VVC's inter-frame prediction, the parameters of the linear equation can be expressed by a scaling parameter α and an offset parameter β, that is, α×p[x]+β to compensate for illumination changes, where p[x] is the reference sample pointed to by the position x of BV on the current image. The least squares method is used to derive the linear model parameters. In addition to the above prediction values, there is also the FIBC mode, which builds a linear model between the reference block template corresponding to the BV and the current block template to obtain the filter coefficients, and then applies this linear filter model to the current block to obtain the final prediction value. There is also a prediction mode similar to the IntraTMP Fusion mode, which fuses multiple IBC prediction blocks based on the relationship between multiple prediction blocks and the current block template. On the basis of the above-obtained prediction values, weighted prediction with other intra-frame prediction methods can also be implemented, and the result after weighted prediction is used as the final prediction result. The weighted prediction method includes the CIIP method of inter-frame and intra-frame hybrid prediction based on VVC, that is, weighted combination of the result obtained by the above prediction process and the prediction result obtained by the ordinary intra-frame directional prediction mode at each pixel position; it also includes the GPM method of inter-frame geometric prediction mode based on VVC, that is, based on a wedge division, the results obtained by different prediction modes are used in different wedge areas, and weighted mixing in accordance with certain rules is performed near the wedge division line. The following is a detailed description of the implementation process of some of the above methods: In the Intra TMP technology, there are different prediction methods according to different prediction modes. For example, in the Intra TMP Fusion technology, after obtaining the block vector BV corresponding to the N candidate templates, N candidate reconstruction blocks are obtained through BV, and then the N candidate reconstruction blocks are weighted and fused to obtain the prediction block of the current coding block. Specifically, the final prediction value is generated through the following steps: obtaining N candidate reconstruction blocks, determining the weighted fusion weights, and then generating the prediction value through weighted fusion. Among them, when obtaining N candidate reconstruction blocks, the block vector BV corresponding to the N candidate templates is obtained, and directly based on BV n Get the candidate reconstruction block RefBlock in the current image n , where BV n The horizontal offset is pX n , the vertical offset is pY n , where n=0, 1…, N-1. It is realized by simple translation copy. The specific operation is: for x = 0...nTbW-1, y = 0...nTbH-1, RefBlock n [x][y]=recSamples[x+pX n ][y+pY n ] Where recSamples represents the reconstructed pixels of the current frame. When determining the weighted fusion weight, after obtaining N candidate reconstruction blocks RefBlock, it is necessary to calculate the weight W of the weighted fusion of the N candidate reconstruction blocks. The weight may be a predefined value or a value adaptively calculated using a cost value, a pixel value, or the like. In the embodiment of the Intra TMP Fusion technique, the candidate template refT is used. n The reconstruction value and the template to be predicted refpredT n The pixel value of θ minimizes the MSE and derives the weighted fusion weight. Specifically, the MSE minimization process takes the autocorrelation matrix of the first P matching reference samples refT, the cross-correlation vector of the first P matching reference samples refT and the adjacent template samples curT of the current coding block as input, and outputs the weight of the reconstructed block corresponding to each matching reference item. When the prediction value is generated by weighted fusion, the prediction block is calculated according to each candidate reconstructed block and its corresponding weighted fusion weight. Specifically, the value of each candidate reconstructed block and its corresponding weight are multiplied and accumulated to obtain the current prediction block (ie, weighted prediction). For x = 0 ... nTbW-1, y = 0 ... nTbH-1, the predicted value is calculated as follows: Each predicted value predSamples x,y The spatial storage is the output prediction block of Intra TMP Fusion. In the IntraTMP FLM mode, the linear filter model is established using the best matching template obtained in the previous step and the current coding block template. It mainly includes the following two processes: determining the reconstruction area for calculating the filter coefficients and calculating the filter coefficients. The specific prediction value calculation process is as follows: FIG7 is a schematic diagram of TM-FLM prediction. As shown in FIG7 , assuming that the number of filter taps nTap is 5, the shape of the filter is shown in the left figure, c0 to c4 are the tap coefficients of the filter, where the tap coefficient C0 corresponds to the current pixel Y to be predicted. pred [i][j] is the reconstructed pixel ref[i][j] at the corresponding position in the best matching block; the remaining points are the reconstructed pixels in the best matching reconstructed block that are adjacent to the current spatial position. The right point is the predicted pixel Y pred [i][j]. The specific prediction value calculation process is as follows: For each current pixel to be predicted (i, j), the pixel position in the filter template is defined as (k, l), then the corresponding reconstructed pixel in the best matching block during filtering is defined as ref[i+k][j+l], and each filter coefficient at the position (k, l) in the filter template is defined as c k,l :c k,l =c n (3) Where n=0,…,nTap-1, k and l are between -1 and 1. For i=0, ..., nTbW-1, j=0, ..., nTbH-1: Y pred [i][j]=∑ k ∑ l ref[i+k][j+l]×C ,k,l (4) The final predicted pixel is: predSamples[i][j] = Clip3(0, (1<<BitDepth)-1, Y pred [i][j]) (5) in In the Intra TMP SubPel mode, for the optimal BV, traverse the eight directions of 1 / 4, 1 / 2, 3 / 4, up, down, left, right, upper left, upper right, lower left, and lower right, sort them according to the template cost, and use the interpolation filter to calculate the prediction value for the reference block corresponding to the BV with the smallest template cost. In IBC technology, in IBC flip mode, the prediction area needs to be flipped horizontally or vertically as a method for obtaining the prediction value. For example, a syntax element is used to indicate whether to flip, and if so, whether to flip horizontally or vertically. The decoder rearranges the reference area pixels in the horizontal or vertical direction in reverse according to the instructions of the syntax to obtain the predicted pixel values ​​of the coding block. The IBC LIC mode uses a template to build a model between the current block and the prediction area, and processes the prediction block according to the model to obtain the prediction value of the current block. The IBC LIC mode, applied to IBC MEGRE and IBC ABVP, uses a linear equation to compensate for local illumination changes. Similar to the LIC of VVC's inter-frame prediction, the parameters of the linear equation can be expressed by a scaling parameter α and an offset parameter β, that is, α×p[x]+β to compensate for illumination changes, where p[x] is the reference sample pointed to by the position x of the BV on the current image. The least squares method is used to derive the linear model parameters. In Filter IBC mode, a linear model is established using the template of the current block and the reference block template corresponding to BV, and the filter coefficients are obtained and used for the current block to obtain the final prediction value. The specific prediction value calculation process is as follows: For each current pixel to be predicted (i, j), the pixel position in the filter template is defined as (k, l), then the corresponding reconstructed pixel in the best matching block during filtering is defined as ref[i+k][j+l], and each filter coefficient at the position (k, l) in the filter template is defined as c k,l :c k,l =c n (3) Where n=0,…,nTap-1, k and l are between -1 and 1. For i=0, ..., nTbW-1, j=0, ..., nTbH-1: Y pred [i][j]=∑ k ∑ l ref[i+k][j+l]×C ,k,l (4) The final predicted pixel is: predSamples[i][j] = Clip3(0, (1<<BitDepth)-1, Y pred [i][j]) (5) On the basis of the above-obtained prediction values, weighted prediction with other intra-frame prediction methods can also be implemented, and the result after weighted prediction is used as the final prediction result. The weighted prediction method includes the CIIP method of inter-frame and intra-frame hybrid prediction based on VVC, that is, weighted combination of the result obtained by the above prediction process and the prediction result obtained by the ordinary intra-frame directional prediction mode at each pixel position; it also includes the GPM method of inter-frame geometric prediction mode based on VVC, that is, based on a wedge division, the results obtained by different prediction modes are used in different wedge areas, and weighted mixing in accordance with certain rules is performed near the wedge division line. An example of the operation process in the BV-based CIIP mode is as follows: the BV-based prediction value of the current block is weightedly fused with the prediction value of a certain intra-frame mode. The BV-based prediction part can be obtained by applying the conventional MEGRE, TM MEGRE, MBVD and ABVP modes. For the case where the BV-based prediction part is in different modes, different weights can be set. For example, when the BV-based prediction part mode is the conventional IBC MEGRE, TM MEGRE, MBVD mode, the weight ratio of BV-based prediction and intra-frame prediction is 13:3, and the intra-frame mode includes the TIMD mode of the current block and the intra-frame prediction mode at the candidate BV. If the second prediction mode in the intra-frame mode is the same as the first prediction mode, it is determined whether the first prediction mode is the PLANAR mode. If so, the second prediction mode is replaced with the horizontal prediction mode, otherwise the second prediction mode is replaced with the PLANAR mode. For the case where the BV-based prediction part is the ABVP mode, the weight ratio of BV-based prediction and intra-frame prediction is 1:1, and the first prediction mode with the TIMD mode as the intra-frame prediction mode is obtained. If the derived prediction mode is the horizontal prediction mode, the second prediction mode with PLANAR as the intra-frame prediction mode is obtained, otherwise, the second prediction mode with the horizontal prediction mode as the intra-frame prediction mode is obtained. An example of the operation process in the BV-based GPM mode: Conventional MEGRE and TM MEGRE can be applied to the BV-based prediction part. For example, a prediction mode with one partition being a BV-based mode and a mode with one partition being an INTRA mode can be implemented, and the intra prediction mode (IPM) candidate list is constructed using the same method as the inter GPM and the IPM candidate list size is predefined as 3. In the specific implementation, there are 48 geometric partitioning modes, which can be divided into two geometric partitioning mode sets: Table 2: The first geometric partitioning pattern set Table 3: Second geometric partitioning pattern set When using BV-based GPM, a flag of the BV-based GPM (e.g., IBC-GPM) geometric partitioning mode set is transmitted to indicate whether the first or second geometric partitioning mode set is selected, and then the geometric partitioning mode index is transmitted; then the partition flag within the BV-based GPM (or IBC-GPM) frame is transmitted to indicate whether intra prediction is used for the first sub-partition. Among them, the intra prediction part needs to transmit the intra prediction mode index; the IBC prediction part needs to transmit the MEGRE index. S4, intra prediction mode mapping: Taking the final prediction value as input, the vertical and horizontal gradients of all predicted pixels are calculated, and the direction with the largest gradient is mapped to a traditional intra-frame prediction mode. This method is similar to the existing DIMD technology, which utilizes the gradient information between pixels in a block to derive the dominant prediction direction. One possible way to do this is to use the Sobel operator to calculate the horizontal and vertical gradients based on the final prediction value of BV. The Sobel operator formula is as follows, where G_x is used to calculate the horizontal gradient and G_y is used to calculate the vertical gradient. and The following is a detailed description of the process of using Sobel to perform gradient analysis to derive the traditional intra-frame prediction mode based on the BV prediction value. The input of this process is the prediction value p[x][y] based on the BV prediction mode, where x=0..nTbW-1, y=0..nTbH-1, where nTbW represents the width of the current transform block based on BV prediction, and nTbH represents the height of the current transform block based on BV prediction. The output of this process is the traditional intra prediction mode IntraPredModeD, where IntraPredModeD is between [0, 66]. Set mapHgV = {{2, 1}, {1, 2}} and mapVgH = {{3, 4}, {4, 3}} Set angTable = {0, 2048, 4096, 6144, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 47104, 53248, 59392, 65536} Set angOffset = {18, 18, 50, 50} Setting up HoG

[0067] is an array containing the gradient strengths for each traditional intra prediction mode. At the beginning of this process, all values ​​in all HOG arrays are initialized to 0. For each predicted pixel p[x][y], with x=1…nTbW-2, y=1…nTbH-2, the calculation process is as follows: Calculate the horizontal gradient gHor[x][y] = p[x-1][y-1] + 2p[x-1][y] + p[x-1][y+1] - p[x+1][y-1] - 2p[x+1][y] - p[x+1][y+1] Calculate the vertical gradient gVer[x][y] = p[x-1][y-1] + 2p[x][y-1] + p[x+1][y-1] - p[x-1][y+1] - 2p[x][y+1] - p[x+1][y+1] Calculate iAmp[x][y]=abs(gHor[x][y])+abs(gVer[x][y]) Calculate signH[x][y]=gHor[x][y]<0? 1:0 Calculate signV[x][y]=gVer[x][y]<0? 1:0 Calculate HgV[x][y]=(abs(gHor[x][y])>abs(gVer[x][y])?1:0) Calculate region[x][y]=(HgV[x][y]==1?mapHgV[signH[x][y]][signV[x][y]]: mapVgH[signH[x][y]][signV[x][y]]) Calculate grad[x][y]=(HgV[x][y]==1? abs(gVer[x][y]) / abs(gHor[x][y]): abs(gVer[x][y]) / abs(gHor[x][y])) Calculate grad[x][y] = round(grad[x][y]×(1<<16)) Calculate the index angIdx[x][y] = argmin i (abs(angTable[i]-grad[x][y])) Calculate intra mode ipm[x][y] = angOffset[region[x][y]] + angIdx[x][y] Set HOG[ipm[x][y]]=HOG[ipm[x][y]]+iAmp[x][y] If the HOG has no non-zero magnitude, then: Set IntraPredModeD to PLANAR otherwise: Set IntraPredModeD to argmax i (HoG[i]) where argmax i (L[i]), i = 0, ..., N returns the index between 0 and N that maximizes L (if there are multiple maxima, a smaller index is returned) argmin i (L[i]), i = 0, ..., N returns the index between 0 and N that minimizes L (if there are multiple maxima, smaller indices are returned) Finally, IntraPredModeD is mapped to predModeIntra. S5. Determine the transformation block matrix: Determining the transformation matrix is ​​divided into three steps: determining the transformation set, determining the transformation matrix group, and determining the transformation matrix size. Among them, when determining the transform set, a selection can be made between four transform sets (set0, set1, set2, set3) according to the intra prediction mode predModeIntra mapped previously, so as to determine its corresponding transform set, as shown in the following table: Table 4. LFNST transformation set selection When determining the transformation matrix group, it is necessary to select which of the two transformation matrices in the transformation set is determined according to the lfnst_idx transmitted from the encoding end. When lfnst_idx is 1, the first transformation matrix is ​​selected, and when lfnst_idx is 2, the second transformation matrix is ​​selected. When selecting the transform matrix size, each transform matrix group contains two sizes of base transform matrices. The base transform matrix sizes used at the decoding end are 16x16 and 48x16. The selection is made based on nLfnstOutSzie. If nLfnstOutSzie is 16, a 16x16 base transform matrix is ​​selected. If nLfnstOutSzie is 48, a 48x16 base transform matrix is ​​selected. When nonZeroSize is 8, only the first 8 rows of the transform matrix are used for matrix multiplication calculations. Among them, nLfnstOutSzie can be used to represent the length of a transform coefficient vector. S6, secondary transformation inverse transformation: The inverse quadratic transform coefficient vector u[i], i=0…nonZeroSize-1 is taken as input and multiplied with the transformation matrix to obtain the inverse first-order transform coefficient vector v[j], j=0…nLfnstOutSzie-1. S7, inverse transformation of a transformation: The one-dimensional inverse primary transform coefficient vector v[j], j=0…nLfnstOutSzie-1 is used to construct the two-dimensional inverse primary transform coefficient matrix d'[x][y], x=0…nLfnstSize-1, y=0…nLfnstSize-1 of the current transform block. Depending on the intra prediction mode, there are two scanning orders: horizontal and vertical scanning modes. Then, the inverse primary transform coefficient matrix is ​​used to perform an inverse transform to generate a prediction residual. S8. Generate reconstruction value: Call the image reconstruction process for the specified color component specified by the decoding specification. To achieve the reconstruction operation, the prediction signal and the residual signal need to be added for the mode with residual. Common BV-based prediction technologies, such as Intra TMP technology or IBC technology, use the best matching reconstructed block (Ref Block) as the prediction block of the current coding block (Cur Block), and use the decoder-side Intra Mode Derivation (DIMD) technology to derive the intra-frame directional prediction mode based on the final generated prediction block to determine the LFNST transform set. Among them, when obtaining the prediction value in the BV-based prediction method, it is often necessary to undergo pixel sub-pixel, filtering, or fusion processing, and the processed value is used to derive the LFNST transform set. However, the processed prediction value obtained after data processing such as pixel division, filtering or fusion will lose some texture edge information. Therefore, the most accurate prediction direction cannot be obtained in the subsequent derivation process, which will affect the accuracy of the subsequent LFNST transform set derivation to a certain extent, that is, the derived LFNST transform set may not necessarily be the most matching one, which reduces the encoding and decoding performance. Furthermore, the residual at the decoding end is inversely quantized, and then inversely transformed by the LFNST guided by the direction derived from DIMD before being added to the predicted value to generate the reconstructed value. This means that after the predicted value is generated, it is necessary to wait for the LFNST inverse transform in the direction derived from DIMD, and then perform another inverse transform before sending them together to the reconstruction value generation module. The critical path is long and the efficiency is low. In other words, the prediction process of sequentially performing prediction block processing, LFNST transform set derivation, and inverse transform processing also has the problem of high complexity, which reduces the encoding and decoding efficiency. It can be seen that the common BV-based prediction technology has the problems of low encoding and decoding efficiency and poor performance. In order to solve the above problems, the embodiment of the present application proposes a coding method, a code stream, an encoder, a decoder and a storage medium, wherein the encoder and decoder determine the prediction parameters corresponding to the current block; determine the first reference block of the current block according to the prediction parameters of the current block; determine the first transformation parameters of the current block according to the first reference block of the current block; determine the prediction block of the current block according to the first reference block of the current block; and determine the reconstruction block corresponding to the current block based on the prediction block of the current block and the first transformation parameters. That is, in the embodiment of the present application, after determining the first reference block of the current block based on the prediction parameters, the first reference block that has not been processed by data can be directly used to determine the transformation parameters of the current block, and then the determined transformation parameters are used in combination with the prediction block of the current block obtained after data processing of the first reference block to complete the reconstruction of the current block. Among them, the data processing process will lose the texture edge information of the prediction block to a certain extent, so the initial prediction value before data processing (i.e., the first reference block) has richer texture edge information than the final prediction value after data processing (i.e., the prediction block), and the first reference block is used to derive the prediction direction, which can obtain more accurate transformation parameters, thereby effectively improving the coding and decoding performance. At the same time, after determining the first reference block directly indicated by the prediction parameter, the generation of the prediction block, and the generation of the transform parameters and the residual can be performed in parallel, which shortens the length of the encoding and decoding key path, solves the problem of high complexity, and thus can improve the encoding and decoding efficiency. It can be seen that the encoding and decoding method proposed in the embodiment of the present application can improve the encoding and decoding efficiency and performance. The embodiments of the present application will be described in detail below with reference to the accompanying drawings. Referring to Fig. 8, it shows a schematic block diagram of a composition of an encoder provided by an embodiment of the present application. As shown in Fig. 8, the encoder (specifically "video encoder") 100 may include a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame 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 filtering unit 108, a coding unit 109 and a decoded image cache unit 110, etc., wherein the filtering unit 108 can implement deblocking filtering and sample adaptive offset (Sample Adaptive Offset, SAO) filtering, and the coding unit 109 can implement header information encoding and context-based adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmetic Coding, CABAC).For the input original video signal, a video coding block can be obtained by dividing the coding tree unit (CTU), and then the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transformation and quantization unit 101, 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-frame estimation unit 102 and the intra-frame prediction unit 103 are used to perform intra-frame prediction on the video coding block; specifically, the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to determine the intra-frame 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 coding 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, which can estimate the motion of the video coding block, and then the motion compensation unit 104 calculates the motion vector determined by the motion estimation unit 105 based on the motion vector Perform motion compensation; after determining the intra-frame prediction mode, the intra-frame prediction unit 103 is also used to provide the selected intra-frame prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated and determined motion vector data to the encoding unit 109; in addition, the inverse transform and inverse quantization unit 106 is used to reconstruct the video coding block, reconstruct the residual block in the pixel domain, and the reconstructed residual block is removed from the block effect artifacts through the filter control analysis unit 107 and the filtering unit 108, and then the reconstructed residual block is added to a predictive block in the frame of the decoded image cache unit 110 to generate a reconstructed video coding block; the encoding unit 109 is used to encode various coding parameters and quantized transform coefficients. In the CABAC-based coding algorithm, the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-frame prediction mode and output the code stream of the video signal; and the decoded image cache unit 110 is used to store the reconstructed video coding block for prediction reference. As the video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoded image buffer unit 110 . Referring to Fig. 9, it shows a schematic block diagram of a decoder provided in an embodiment of the present application. As shown in Fig. 9, the decoder (specifically "video decoder") 200 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra-frame prediction unit 203, a motion compensation unit 204, a filtering unit 205, and a decoded image cache unit 206, etc., wherein 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 encoded in FIG. 8 , a code stream of the video signal is output; the code stream is input to the decoder 30, and first passes through the decoding unit 201 to obtain the decoded transform coefficients; the transform coefficients are processed by the inverse transform and inverse quantization unit 202 to generate a residual block in the pixel domain; the intra-frame prediction unit 203 can be used to generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and the data from the previously decoded block of the current frame or picture; the motion compensation unit 204 determines the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and uses the prediction information to generate the prediction data for the current video decoding block. The prediction information is used to generate a predictive block of the video decoding block being decoded; a 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-frame prediction unit 203 or the motion compensation unit 204; the decoded video signal passes through the filtering unit 205 to remove the block effect artifacts, which can improve the video quality; the decoded video block is then stored in the decoded image cache unit 206, which stores the reference image used for subsequent intra-frame prediction or motion compensation, and is also used for the output of the video signal, that is, the restored original video signal is obtained. Further, the embodiment of the present application also provides a network architecture of a codec system including an encoder and a decoder, wherein Figure 10 shows a schematic diagram of the network architecture of a codec system provided by the embodiment of the present application. As shown in Figure 10, the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. The electronic device can be various types of devices with video codec functions during implementation, for example, the electronic device can include a smart phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., and the embodiment of the present application is not specifically limited. Here, the decoder or encoder described in the embodiment of the present application can be the above-mentioned electronic device. It should be noted that the method of the embodiment of the present application is mainly applied to the intra-frame prediction unit 103 part shown in Figure 8 and the intra-frame prediction unit 203 part shown in Figure 9. In other words, the embodiment of the present application can be applied to both the encoder and the decoder, and can even be applied to both the encoder and the decoder at the same time, but the embodiment of the present application is not specifically limited. It should also be noted that, when applied to the intra-frame prediction unit 103, the "current block" specifically refers to the coding block currently to be intra-frame predicted; when applied to the intra-frame prediction unit 203, the "current block" specifically refers to the decoding block currently to be intra-frame predicted. An embodiment of the present application proposes a decoding method, which is applied to a decoder. FIG11 is a flowchart of the decoding method proposed in the embodiment of the present application. As shown in FIG11 , the method for the decoder to perform decoding processing may include the following steps: Step 1101: Determine the prediction parameters corresponding to the current block. In the embodiment of the present application, the prediction parameters corresponding to the current block may be determined first. It should be noted that the decoding method of the embodiment of the present application is applied to a decoder. In addition, the decoding method may include an intra-frame prediction method, more specifically, a color component prediction method. Among them, the video image can be divided into a plurality of decoding blocks, each decoding block may include a first color component, a second color component and a third color component, and the current block in the embodiment of the present application refers to a decoding block in the video image that is currently to be intra-frame predicted. Here, when the first color component needs to be predicted, the component to be predicted is the first color component; when the second color component needs to be predicted, the component to be predicted is the second color component; when the third color component needs to be predicted, the component to be predicted is the third color component. In addition, assuming that the current block predicts the first color component, and the first color component is the brightness component, that is, the component to be predicted is the brightness component, then the current block can also be called a brightness block; or, assuming that the current block predicts the second color component, and the second color component is the chrominance component, that is, the component to be predicted is the chrominance component, then the current block can also be called a chrominance block. It should be noted that, in the embodiment of the present application, the prediction parameter corresponding to the current block may include a block vector of the current block. It should be noted that, in the embodiment of the present application, the first reference block and the current block are in the same image; accordingly, the block vector represents the position offset between the current block and the first reference block. It can be understood that, in the embodiment of the present application, for the intra prediction mode, the first reference block of the current block may be determined based on the block vector of the current block. It should be noted that, in the embodiment of the present application, the prediction parameters corresponding to the current block may include the motion vector and the reference image index of the current block. It should be noted that, in the embodiment of the present application, the first reference block is located in the reference image indicated by the reference image index; accordingly, the motion vector represents the position offset between the current block and the first reference block. It can be understood that, in the embodiment of the present application, for the inter-frame prediction mode, the first reference block of the current block may be determined based on the motion vector of the current block. It should be noted that, in the embodiment of the present application, the prediction parameter corresponding to the current block takes the block vector BV as an example, and the transformation method takes LFNST as an example to exemplify the decoding method proposed in the embodiment of the present application. Further, in an embodiment of the present application, when determining the block vector of the current block, a first template corresponding to the current block may be determined first, and a preset search area may be determined; and a search may be performed within the preset search area to determine the block vector of the current block. Furthermore, in an embodiment of the present application, when determining the block vector of the current block, a first template corresponding to the current block can be determined first, and a preset search area can be determined; a search is performed within the preset search area to construct a block vector candidate list of the current block; and the block vector of the current block is determined based on the block vector candidate list. Furthermore, in an embodiment of the present application, when determining the block vector of the current block, the block vectors of the adjacent blocks corresponding to the current block may be determined first; a block vector candidate list of the current block may be constructed based on the block vectors of the adjacent blocks; and the block vector of the current block may be determined based on the block vector candidate list. Exemplarily, in some embodiments, in the IntraTMP mode, when acquiring the first template, the template type corresponding to the current block may be determined first, and then the first template corresponding to the current block may be further determined based on the template type. The template type of the current block may be determined based on the indication information in the bitstream, the template type of the current block may be determined based on the size of the current block, or the template type of the current block may be determined based on the reference pixels of the current block. It can be understood that in the embodiment of the present application, the reference pixels of the current block may include the adjacent reconstructed pixels of the current block, that is, the adjacent reconstructed pixels of the current block may be selected as a template to search for a matching template in a predefined search area. It should be noted that, in an embodiment of the present application, the reference pixels of the current block, that is, the adjacent reconstructed pixels of the current block may include the upper reference pixel, the upper left reference pixel, the upper right reference pixel, the left reference pixel and the lower left reference pixel of the current block. It can be understood that in the embodiment of the present application, when the template type of the current block is determined using the reference pixels of the current block, the template type can be classified and determined according to whether the adjacent reference pixels are available. That is to say, in the embodiments of the present application, the template type can be determined according to the availability information of the reference pixels of the current block, or according to the information indicated in the bitstream, or in combination with the availability information of the reference pixels and the information indicated in the bitstream. This application does not make any specific limitation. It should be noted that in an embodiment of the present application, when determining the first template corresponding to the current block according to the template type, the template reference pixels of the current block can be first determined according to the template type and the template size corresponding to the template type, and then the first template of the current block can be determined according to the template reference pixels. It should be noted that, in the embodiments of the present application, the template size corresponding to the template type may be pre-set, may be indicated by a code stream syntax element, or may be adaptively selected based on a block size or other information. For example, when obtaining a left template, the template width templateW_size may be set to 4, and when obtaining an upper template, the template height templateH_size may be set to 4. It should be noted that, in an embodiment of the present application, the block vector search process may include an initialization process, determining a search area (preset search area) of the first template in the current frame, searching and determining one or a pair of optimal block vectors in the search area. It should be noted that, in an embodiment of the present application, as shown in Figure 3, the area filled with dark color represents the reconstructed area, the block filled with a grid is the current block, and the adjacent area of ​​the current block is the first template (T); the block filled with slashes is the reference block, and the adjacent area of ​​the reference block is the second template (i.e., the best matching template, T_BEST); wherein, the offset of the second template relative to the first template is the best block vector (BV_BEST). In an embodiment of the present application, the preset cost function can be the absolute error sum SAD, the absolute transformation difference sum SATD, the mean square error MSE, the error square sum SSD, the mean absolute difference MAD, the mean error square sum MSD, the normalized correlation coefficient NCC, etc., which is not specifically limited here. It should be noted that in the embodiment of the present application, the matching cost between the matching template corresponding to the search point in the preset search area and the first template is determined according to the preset matching criteria; then one or more block vectors are determined according to the matching cost. Among them, for the case of a block vector, a BV candidate list can be established, and the list stores multiple BV candidates in order of cost from small to large, and then the corresponding syntax elements in the bitstream determine which BV candidate or candidates are finally selected. Exemplarily, in some embodiments, in the IBC mode, BV can be obtained in multiple ways, so the bitstream can contain mode information of the BV acquisition method and corresponding parameter information. For example, if the IBC MEGRE mode is obtained in the syntax element, the decoder constructs a MEGRE list, parses the MEGRE list option index, and then obtains the specific information of BV from the corresponding option in the MEGRE list according to the index; for another example, in the ordinary IBC mode, the decoder obtains the specific information of BV by decoding the value of the syntax element that describes BV or BV prediction difference in the bitstream. Exemplarily, in some embodiments, in the IBC mode, the specific process of deriving BV is as follows: (1) Brightness: Input: luma position (xCb, yCb), which specifies the top left corner sample of the current coding block relative to the top left corner luma sample of the current picture, a variable cbWidth, which specifies the width of the current coding block in luma samples, and a variable cbHeight, which specifies the height of the current coding block in luma samples. Output: BVL (Block Vector Luma) of brightness. The IBC mode is divided into IBCMEGRE and IBCAMVP. When deriving BVL, it is necessary to establish an IBC block vector candidate list BVCandList. The following introduces the list establishment process of IBCMEGRE. The list establishment process of IBCAMVP is consistent with that of IBCMEGRE, but the maximum number of candidates of the two is inconsistent. Step 1: When IsGt4by4 is equal to TRUE (the variable IsGt4by4 is the brightness width multiplied by the height, and is TRUE when IsGt4by4 is greater than 16), the derivation process of the spatial block vector candidate from the adjacent coding unit specified in the decoding specification is called using the brightness coding block position (xCb, yCb), the brightness coding block width cbWidth and the height cbHeight as input, and the output is the availability flags availableFlagA1, availableFlagB1 and the block vectors BVA1 and BVB1. Among them, A1 and B1 are adjacent blocks. As shown in Figure 6, the relative positions of the adjacent blocks where A1 and B1 are located to the current coding block are the lower left corner and the upper right corner, respectively. Step 2: When IsGt4by4 is equal to TRUE, the block vector candidate list BVCandList is constructed as follows: i = 0 if (availableFlagA1) BVCandList[i++] = BVA1 if (availableFlagB1) BVCandList[i++] = BVB1 Step 3: The variable numCurrCand indicates the number of candidates currently obtained. The derivation process of numCurrCand is as follows: If IsGt4by4 is equal to TRUE, numCurrCand is set equal to the number of candidates in BVCandList; otherwise numCurrCand is set to 0. Step 4: When numCurrCand is less than MaxNumIbcMEGRECand (the maximum number of candidates in MEGRE mode) and NumHmvpIbcCand (the maximum number of candidates representing the historical optimal block vector (Hmvp) in IBC mode) is greater than 0, the derivation process of the history-based IBC block vector candidate specified in the decoding specification is called with BVCandList and numCurrCand as input and the modified BVCandList and numCurrCand as output. Step 5: When numCurrCand is less than MaxNumIbcMEGRECand, the following applies until numCurrCand equals MaxNumIbcMEGRECand: BVCandList[numCurrCand][0] (ie, the horizontal component of BV) is set equal to 0. BVCandList[numCurrCand][1] (ie, the vertical component of BV) is set equal to 0. numCurrCand increases by 1. In this way, the block vector candidate list BVCandList is established, and general_MEGRE_flag is used to indicate whether it is IBCMEGRE mode. The candidate index BVIdx is derived as follows: BVIdx=general_MEGRE_flag[xCb][yCb]? MEGRE_idx[xCb][yCb]:mvp_l0_flag[xCb][yCb] In this way, the specific BVL can be obtained according to the index BVIdx and the block vector candidate list BVCandList: BVL[0] = BVCandList[BVIdx][0] BVL[1] = BVCandList[BVIdx][1] For the IBCAMVP mode, the specific BVL can be obtained by indexing BVIdx and the block vector candidate list BVCandList as the predicted BVL. The real BVL also needs to add the block vector difference (Block Vector Difference, BVD). The specific process is as follows: Step 1: Obtain the horizontal and vertical components of BVD, where MvdL0 is the forward motion vector difference. BVd[0] = MvdL0[xCb][yCb][0] BVd[1] = MvdL0[xCb][yCb][1] Step 2: Perform a rounding operation on the predicted BVL obtained above, where the right shift parameter AmvrShift is used for rounding, and the left shift parameter AmvrShift is used to improve the resolution. offset = (AmvrShift == 0)? 0 : ((1 << (AmvrShift - 1)) - 1) BVL[0] = Sign(BVL[0]) * (((Abs(BVL[0]) + offset) >> AmvrShift) << AmvrShift) BVL[1] = Sign(BVL[1]) * (((Abs(BVL[1]) + offset) >> AmvrShift) << AmvrShift) Step 3: The derivation of the true BVL is as follows, and its range needs to be controlled between -217 and 217 - 1: u[0] = (BVL[0] + BVd[0] + 218) % 218 BVL[0] = (u[0] >= 217)? (u[0] - 218) : u[0] u[1] = (BVL[1] + BVd[1] + 218) % 218 BVL[1] = (u[1] >= 217)? (u[1] - 218) : u[1] (2) Chrominance: If it is a dual-tree partition, no IBC is performed on the chrominance; if it is a single-tree partition, the BV of the chrominance needs to be derived. Input: BVL of luminance (1 / 16 pixel precision) Output: BVC (Block Vector chroma) of chrominance (1 / 32 pixel precision) The derivation process is as follows: BVC[0] = ((BVL[0] >> (3 + SubWidthC)) * 32) BVC[1] = ((BVL[1] >> (3 + SubHeightC)) * 32) Among them, the specific process of deriving the predicted samples using BV is as follows: Input: Luminance position (xCb, yCb), specifying the top-left sample of the current coding block relative to the top-left luminance sample of the current picture, a variable cbWidth, specifying the width of the current coding block in the luminance samples, a variable cbHeight, specifying the height of the current coding block in the luminance samples, the block vector BV, and a variable cIdx, specifying the color component index of the current block. Output: An array predSamples of predicted samples. The derivation process is as follows: When cIdx is equal to 0, that is, the brightness component, for x = xCb..xCb+cbWidth-1 and y = yCb..yCb+cbHeight-1: xVb = (x+(BV[0]>>4))&(IbcBufWidthY-1)yVb = (y+(BV[1]>>4))&(CtbSizeY-1) predSamples[x][y]=ibcVirBuf[0][xVb][yVb] IbcBufWidthY is the width of the brightness pixel of the reconstructed buffer stored in IBC, CtbSizeY is the size of CTU (Coding Tree Unit), and ibcVirBuf is the reconstructed pixel stored in IBC. When cIdx is not equal to 0, that is, the chrominance component, for x = xCb / SubWidthC..xCb / SubWidthC+cbWidth / SubWidthC-1 and y = yCb / SubHeightC..yCb / SubHeightC+cbHeight / SubHeightC-1: xVb = (x+(BV[0]>>5))&(IbcBufWidthC-1)yVb = (y+(BV[1]>>5))&((CtbSizeY / subHeightC)-1) predSamples[x][y]=ibcVirBuf[cIdx][xVb][yVb] The variables SubWidthC and SubHeightC depend on the chroma format sampling structure specified by sps_chroma_format_idc, and the specific correspondence is shown in Table 1. Furthermore, in an embodiment of the present application, the code stream can be decoded first to determine the prediction mode identification information corresponding to the current block; then, when the prediction mode identification information indicates that the current block uses a prediction mode based on prediction parameters, the prediction parameter determination process can be executed, that is, the above-mentioned step 1101 is executed. It is understandable that in the embodiment of the present application, after receiving the code stream of the video, the prediction mode identification information corresponding to the current block can be determined first, wherein the prediction mode identification information indicates the encoding mode of the current block and parameters related to the mode. It should be noted that in the implementation of the present application, the prediction mode generally includes a traditional intra-frame prediction mode and a non-traditional intra-frame prediction mode, and the traditional intra-frame prediction mode may include a DC mode, a PLANAR mode, and an angle mode, etc., and the non-traditional intra-frame prediction mode may include a MIP mode, a CCLM mode, an IBC mode, a PLT mode, an IntraTMP mode, etc. It can be understood that in the embodiments of the present application, on the encoder side, predictive coding is performed on the current block. During this process, the prediction mode of the current block can be determined, and the corresponding prediction mode identification information is written into the bitstream and transmitted from the encoder to the decoder. Accordingly, in the present application, at the decoder side, prediction mode identification information corresponding to the current block can be obtained by decoding the bitstream, and then the specific encoding mode of the decoding mode of the current block can be determined according to the prediction mode identification information. It should be noted that, in the embodiment of the present application, the prediction mode identification information can be used to indicate whether the current block uses a prediction mode based on prediction parameters. Exemplarily, in some embodiments, whether the current block uses a prediction mode based on a block vector, for example, a prediction mode based on a block vector such as an IBC mode or an IntraTMP mode, can be determined through the prediction mode identification information. Exemplarily, in some embodiments, when the value of the prediction mode identification information is a first value, it is determined that the prediction mode identification information indicates that the current block uses a prediction mode based on prediction parameters; when the value of the prediction mode identification information is a second value, it is determined that the prediction mode identification information indicates that the current block does not use a prediction mode based on prediction parameters. It should also be noted that in the embodiment of the present application, the first value is different from the second value, and the first value and the second value can be in parameter form or in digital form. Specifically, the first prediction mode identification information and the second prediction mode identification information can be parameters written in the profile, or can be the value of a flag, which is not specifically limited here. In addition, for the first value and the second value, 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. Among them, in the embodiment of the present application, the first value is set to 0 and the second value is set to 1, but it is not specifically limited. Step 1102: Determine a first reference block of the current block according to the prediction parameters of the current block. In the embodiment of the present application, after the prediction parameter corresponding to the current block is determined, the first reference block of the current block may be further determined according to the prediction parameter of the current block. It should be noted that, in the embodiment of the present application, at least one reference block corresponding to the current block may be determined according to the block vector of the current block. It should be noted that, in the embodiment of the present application, at least one reference block corresponding to the current block can be determined according to the motion vector of the current block. It should be noted that, in the embodiment of the present application, the first reference block of the current block can be an initial prediction block directly obtained based on the prediction parameters. For example, the first reference block can be an initial prediction block directly derived using the block vector of the current block, or can be an initial prediction block directly derived based on the motion vector of the current block. Exemplarily, in some embodiments, in the IntraTMP mode, the determined block vector of the current block may be the best block vector BV_BEST (pX_BEST, pY_BEST), wherein pX_BEST and pY_BEST are respectively the horizontal offset and vertical offset of the best matching template relative to the current block template, and are also the horizontal offset and vertical offset of the best matching reconstructed block relative to the current block. Further, in the embodiment of the present application, when determining the first reference block corresponding to the current block based on the determined block vector, a simple translation copy can be used for implementation. The specific operation is: For x=0...nTbW-1, y=0...nTbH-1; predSamples[x][y]=recSamples[x+pX_BEST][y+pY_BEST] (7) Among them, recSamples represents the reconstructed pixels of the current frame. Exemplarily, in some embodiments, in IBC mode, input: luma position (xCb, yCb), specifies the upper left corner sample of the current coding block relative to the upper left corner luma sample of the current picture, a variable cbWidth, specifies the width of the current coding block in luma samples, a variable cbHeight, specifies the height of the current coding block in luma samples, a block vector BV, a variable cIdx, specifies the color component index of the current block. Output: an array of predicted samples predSamples. When cIdx is equal to 0, that is, the brightness component, for x = xCb..xCb+cbWidth-1 and y = yCb..yCb+cbHeight-1: xVb = (x+(BVL[0]>>4))&(IbcBufWidthY-1)yVb = (y+(BVL[1]>>4))&(CtbSizeY-1) predSamples[x][y]=ibcVirBuf[0][xVb][yVb] IbcBufWidthY is the width of the brightness pixel of the reconstructed buffer stored in IBC, CtbSizeY is the size of CTU (Coding Tree Unit), and ibcVirBuf is the reconstructed pixel stored in IBC. When cIdx is not equal to 0, that is, it is a chrominance component, for x = xCb / SubWidthC..xCb / SubWidthC+cbWidth / SubWidthC-1 and y = yCb / SubHeightC..yCb / SubHeightC+cbHeight / SubHeightC-1: xVb = (x+(BVC[0]>>4))&(IbcBufWidthC-1)yVb = (y+(BVC[1]>>4))&((CtbSizeY / subHeightC)-1)predSamples[x][y] = ibcVirBuf[cIdx][xVb][yVb]. Step 1103: Determine a first transformation parameter of the current block according to a first reference block of the current block. In an embodiment of the present application, after determining a first reference block of the current block according to a prediction parameter of the current block, a first transformation parameter of the current block may be further determined according to the first reference block of the current block. It should be noted that, in the embodiment of the present application, the transformation parameter of the current block, such as the first transformation parameter, may include an index reference (such as LFNST) for indicating the transformation matrix used, or may be the transformation matrix itself. Further, in an embodiment of the present application, when determining a first transformation parameter of a current block according to a first reference block of the current block, a statistical characteristic parameter of the first reference block may be determined first; and then the first transformation parameter may be determined according to the statistical characteristic parameter. It should be noted that, in the embodiment of the present application, the statistical characteristic parameters include a covariance matrix. Further, in an embodiment of the present application, when determining a first transformation parameter of a current block based on a first reference block of the current block, intra-frame mode information corresponding to the current block can be first determined based on the first reference block of the current block; and then the first transformation parameter is determined based on the intra-frame mode information. It can be understood that, in the context of the present application, the intra-frame mode information corresponding to the current block may include indication information of the traditional intra-frame prediction mode determined after intra-frame prediction mode mapping. It should be noted that, in an embodiment of the present application, when determining the intra-frame mode information corresponding to the current block based on the first reference block of the current block, the horizontal gradient and vertical gradient corresponding to the first reference block of the current block can be determined first; and then the intra-frame mode information corresponding to the current block can be determined based on the horizontal gradient and the vertical gradient. It should be noted that in the embodiment of the present application, when determining the horizontal gradient and vertical gradient corresponding to the first reference block of the current block, it is possible to choose to determine the horizontal gradient and vertical gradient corresponding to the first reference block based on a preset operator. Exemplarily, in some embodiments, a preset operator may be used to determine the gradient information, for example, the preset operator may be a Sobel operator, wherein the Sobel operator may complete the calculation of the horizontal gradient and the vertical gradient of the first reference block. Exemplarily, in some embodiments, the Sobel operator includes G x and G y , G x is used to calculate the horizontal gradient, G y It is used to calculate the vertical gradient. Further, in an embodiment of the present application, when determining the intra-frame mode information corresponding to the current block based on the horizontal gradient and the vertical gradient, a first prediction histogram can be first determined based on the horizontal gradient and the vertical gradient; when there is no non-zero amplitude in the first prediction histogram, the intra-frame mode information corresponding to the current block is determined to be the PLANAR mode; when there is a non-zero amplitude in the first prediction histogram, the intra-frame mode information corresponding to the current block is determined based on the gradient direction with the largest amplitude in the first prediction histogram. It should be noted that, in an embodiment of the present application, the intra-frame mode information corresponding to the current block determined according to the gradient direction with the largest amplitude in the first prediction histogram may be a traditional intra-frame prediction mode predModeIntra, where predModeIntra is between [0, 66]. Exemplarily, in some embodiments, based on the first reference block directly obtained through prediction parameters, the vertical gradient and horizontal gradient of all predicted pixels of the first reference block can be calculated, and then the direction with the largest gradient is mapped to a traditional intra-frame prediction mode, that is, the intra-frame mode information predModeIntra corresponding to the current block is determined. That is to say, in an embodiment of the present application, the gradient information between pixels in the first reference block can be used to derive the dominant prediction direction, thereby completing the mapping of the intra-frame prediction mode based on the first reference block and obtaining the corresponding intra-frame mode information predModeIntra. For example, in some embodiments, the horizontal gradient and vertical gradient of the first reference block under Intra TMP can be calculated by Sobel operator, and then the gradient analysis is completed and the traditional intra prediction mode is derived based on the first reference block, that is, the corresponding intra mode information predModeIntra is determined. xis used to calculate the horizontal gradient, G y It is used to calculate the vertical gradient. Exemplarily, in some embodiments, the input is a first reference block based on the BV mode, that is, an initial prediction value p[x][y], where x=0..nTbW-1, y=0..nTbH-1, where nTbW represents the width of the current transform block obtained based on the BV prediction mode, and nTbH represents the height of the current transform block obtained based on the BV prediction mode. Exemplarily, in some embodiments, the output is the intra mode information corresponding to the current block, the traditional intra prediction mode predModeIntra, where predModeIntra is between [0, 66]. Exemplarily, in some embodiments, in the process of performing intra prediction mode mapping based on the first reference block, the following operations may be performed in sequence: Set mapHgV = {{2, 1}, {1, 2}} and mapVgH = {{3, 4}, {4, 3}} Set angTable = {0, 2048, 4096, 6144, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 47104, 53248, 59392, 65536} Set angOffset = {18, 18, 50, 50} Set HoG

[0067] to an array containing the gradient magnitudes for each traditional intra prediction mode. At the beginning of this process, all values ​​in all HOG arrays are initialized to 0. Gradient Histogram For each predicted pixel p[x][y], with x=1…nTbW-2, y=1…nTbH-2, the calculation process is as follows: Calculate the horizontal gradient gHor[x][y] = p[x-1][y-1] + 2.p[x-1][y] + p[x-1][y+1] - p[x+1][y-1] - 2.p[x+1][y] - p[x+1][y+1] Calculate the vertical gradient gVer[x][y] = p[x-1][y-1] + 2.p[x][y-1] + p[x+1][y-1] - p[x-1][y+1] - 2.p[x][y+1] - p[x+1][y+1] Calculate iAmp[x][y]=abs(gHor[x][y])+abs(gVer[x][y]) Calculate signH[x][y]=gHor[x][y]<0? 1:0 Calculate signV[x][y]=gVer[x][y]<0? 1:0 Calculate HgV[x][y]=(abs(gHor[x][y])>abs(gVer[x][y])?1:0) Calculate region[x][y]=(HgV[x][y]==1?mapHgV[signH[x][y]][signV[x][y]]: mapVgH[signH[x][y]][signV[x][y]]) Calculate grad[x][y]=(HgV[x][y]==1? abs(gVer[x][y]) / abs(gHor[x][y]): abs(gVer[x][y]) / abs(gHor[x][y])) Calculate grad[x][y] = round(grad[x][y]×(1<<16)) Calculate the index angIdx[x][y] = argmin i (abs(angTable[i]-grad[x][y])) Angle index Calculate intra mode ipm[x][y] = angOffset[region[x][y]] + angIdx[x][y] intra prediction mode Set HOG[ipm[x][y]]=HOG[ipm[x][y]]+iAmp[x][y] If the HOG has no non-zero magnitude, then: Set predModeIntra to PLANAR otherwise: Set predModeIntra to argmax i (HoG[i]) where argmax i (L[i]), i = 0, ..., N returns the index between 0 and N that maximizes L (if there are multiple maxima, a smaller index is returned) argmin i (L[i]), i = 0, ..., N returns the index between 0 and N that minimizes L (if there are multiple maxima, smaller indices are returned) Finally, the mapping of the intra prediction mode predModeIntra is completed. It should be noted that, in the embodiment of the present application, compared with the final prediction value after subsequent data processing such as filtering, fusion, pixel division, etc., the initial prediction value directly obtained based on the prediction parameter, such as the first reference block directly indicated by BV, has more texture edge information. This is because the data processing such as filtering, fusion, pixel division, etc. performed on the basis of the initial prediction value, such as low-pass filtering, is equivalent to a smoothing operation, which causes the final prediction value obtained after processing to lose some texture edge information. Accordingly, in an embodiment of the present application, in the process of mapping the intra-frame prediction mode based on the prediction value, since the initial prediction value has richer texture edge information, compared with using the final prediction value to map the intra-frame prediction mode, using the initial prediction value can derive a more accurate gradient direction, prediction angle and angle amplitude, thereby determining a more matching traditional intra-frame prediction mode. Furthermore, in an embodiment of the present application, when determining the first transformation parameter according to intra-frame mode information, a transformation core candidate set can be first determined according to the intra-frame mode information corresponding to the current block; wherein the transformation core candidate set includes any number of transformation cores; the transformation core candidate set includes an LFNST transformation core candidate set, an NSPT transformation core candidate set, and any one of the transformation core candidate sets determined based on the prediction direction; then the first transformation core is determined in the transformation core candidate set; and finally the first transformation parameter can be determined according to the first transformation core. It should be noted that, in the embodiments of the present application, the first transformation parameter may be understood as a first transformation kernel, or may be understood as a first transformation matrix, that is, the first transformation kernel may be a first transformation matrix. It should be noted that, in the embodiment of the present application, the matrix size corresponding to the first transformation parameter can be determined based on the size of the current block, that is, the size of the first transformation matrix can be determined based on the size of the current block. That is to say, in an embodiment of the present application, the transform core candidate set determined according to the intra-frame mode information corresponding to the current block can be any one of the transform core candidate sets determined based on the prediction direction. For example, the transform core candidate set can be a LFNST transform core candidate set or a NSPT transform core candidate set, and the present application does not make specific limitations. It should be noted that in an embodiment of the present application, when determining the LFNST transform core candidate set according to the intra-frame mode information corresponding to the current block, the LFNST transform core candidate set corresponding to the intra-frame mode information can be determined according to the mapping relationship between the intra-frame mode and the transform core candidate set. Exemplarily, in some embodiments, after determining that the current block can use the LFNST technology, it is necessary to determine the LFNST transform kernel (which can be represented by kernel) used by the current block. There are 4 transform kernel candidate sets in LFNST, and these 4 transform kernel candidate sets may include set0, set1, set2 and set3. According to the coding parameters of the current block or the coding block where the current block is located, the selected transform kernel candidate set can be implicitly derived; for example, according to the intra-frame prediction mode of the current block, it can be determined which transform kernel candidate set of the four transform kernel candidate sets to use. It can be understood that in the embodiment of the present application, the value of the LFNST index number (which can be represented by SetIdx) can be determined according to the value of the intra mode information predModeIntra corresponding to the current block. Specifically, the value of the LFNST index number is set to indicate that the current block uses LFNST and the index number of the LFNST transform core in the LFNST transform core candidate set. Generally speaking, the LFNST transform set includes 4 transform core candidate sets (set0, set1, set2, set3), corresponding to the values ​​of SetIdx of 0, 1, 2, and 3, respectively. Exemplarily, in some embodiments, the mapping relationship between the intra mode and the transform kernel candidate set may be as shown in Table 4. Based on the value of predModeIntra and Table 4, the corresponding LFNST transform kernel candidate set may be determined. Furthermore, in an embodiment of the present application, the code stream may be decoded to determine the transform core index number; then, the first transform core may be determined in the LFNST transform core candidate set according to the transform core index number to determine the first transform parameter. It should be noted that, in the embodiment of the present application, since the LFNST transform core candidate set includes two preset transform cores, after the transform core index number is obtained by decoding the code stream, the transform core indicated by the transform core index number can be selected from the LFNST transform core candidate set according to the value of the obtained transform core index number. For example, when the value of the transform core index number is 1, the first group of LFNST transform cores (i.e., the first group of transform matrices) in the LFNST transform core candidate set will be selected; or, when the value of the transform core index number is 2, the second group of LFNST transform cores (i.e., the second group of transform matrices) in the LFNST transform core candidate set will be selected. Further, in the embodiment of the present application, for the value of the transform core index number (i.e., lfnst_idx), when the value of the transform core index number is equal to 0, LFNST will not be used; and when the value of the transform core index number is greater than 0, LFNST will be used, and the index of the transform core is equal to the value of the transform core index number, or the index of the transform core is equal to the value of the transform core index number minus 1. Furthermore, the LFNST transform core used by the current block, i.e., the first transform core, can be further determined according to the transform core index number. Further, in an embodiment of the present application, a primary transform coefficient length parameter and a secondary transform coefficient length parameter may be configured. It is understandable that in the embodiment of the present application, it is also necessary to configure the core parameters. Among them, for configuring the core parameters, it is first necessary to configure the length of the input secondary transform coefficient vector for LFNST calculation (which can be represented by nonZeroSize), that is, configure the secondary transform coefficient length parameter, and also configure the length of the output primary transform coefficient vector (which can be represented by nLfnstOutSzie), that is, the primary transform coefficient length parameter. Furthermore, in an embodiment of the present application, when determining the first transformation parameter based on the first transformation kernel, the transformation matrix size is determined based on the primary transformation coefficient length parameter and / or the secondary transformation coefficient length parameter; thereby, the first transformation parameter can be determined based on the first transformation kernel and the transformation matrix size. It can be understood that, in the embodiment of the present application, the first transformation parameter may be a transformation matrix corresponding to the current block. It should be noted that, in the embodiment of the present application, compared with the final prediction value after subsequent data processing such as filtering, fusion, pixel division, etc., the initial prediction value directly obtained based on the prediction parameter, such as the first reference block directly indicated by BV, has more texture edge information. Therefore, in the process of mapping the intra-frame prediction mode based on the prediction value, using the initial prediction value can derive a more accurate gradient direction, prediction angle, and angle amplitude, so that a more matching traditional intra-frame prediction mode can be determined. Accordingly, in an embodiment of the present application, after determining the corresponding intra-frame prediction mode using the initial prediction value directly obtained by the prediction parameters, such as the first reference block directly indicated by BV, a more accurate LFNST transform kernel can be further obtained, thereby determining a more matching transform matrix. Exemplarily, in some embodiments, FIG. 12 is a schematic diagram of a transformation matrix selection process proposed in an embodiment of the present application. As shown in FIG. 12 , when performing transformation parameters, that is, derivation of the transformation matrix, the following steps may be specifically included: S5.1. Determine the transformation set. When determining the transform set, a selection can be made among four transform sets (set0, set1, set2, set3) according to the previously mapped intra prediction mode predModeIntra, so as to determine the corresponding transform set, that is, determine the corresponding LFNST transform kernel candidate set. S5.2. Determine the transformation matrix group. When determining the transformation matrix group, that is, determining the corresponding transformation kernel, it is necessary to select which of the two transformation matrices in the transformation set is determined according to the lfnst_idx transmitted from the encoding end. When lfnst_idx is 1, the first transformation matrix is ​​selected, and when lfnst_idx is 2, the second transformation matrix is ​​selected. S5.3. Select the transformation matrix size. When selecting the transform matrix size, each transform matrix group contains two sizes of base transform matrices. The base transform matrix sizes used at the decoding end are 16x16 and 48x16. The selection is made based on nLfnstOutSzie. If nLfnstOutSzie is 16, a 16x16 base transform matrix is ​​selected. If nLfnstOutSzie is 48, a 48x16 base transform matrix is ​​selected. When nonZeroSize is 8, only the first 8 rows of the transform matrix are used for matrix multiplication calculations. Step 1104: Determine a prediction block of the current block according to the first reference block of the current block. In an embodiment of the present application, after determining a first reference block of the current block according to a prediction parameter of the current block, a prediction block of the current block may be further determined according to the first reference block of the current block. Further, in an embodiment of the present application, when determining a prediction block of a current block according to a first reference block of the current block, the first reference block may be corrected according to a preset processing strategy to determine the prediction block of the current block. It should be noted that, in the embodiment of the present application, the preset processing strategy includes at least one of the following processing: fusion processing, filtering processing, pixel sub-processing, and pixel flipping processing. Exemplarily, in some embodiments, in the IntraTMP mode, when determining the prediction block of the current block based on the first reference block of the current block, a method of fusing corresponding positions of multiple BVs to obtain prediction values, a method of filtering the reference block corresponding to the BV and then copying it, and a method of pixel-by-pixel interpolating the corresponding reference block of the BV and then copying it can be used. For example, after obtaining the BV candidate list by using template matching during the decoding end area search process, the first N items (eg, N=3) are selected for weighted fusion. This method may be called the IntraTMP Fusion mode. Alternatively, after obtaining an optimal BV, multiple points are taken around the BV, and the corresponding predicted values ​​of the multiple points are weighted and fused to obtain the predicted value. This method can be called the IntraTMP FLM mode. Alternatively, after obtaining an optimal BV, the templates are sorted using sub-pixel accuracy, the optimal direction and accuracy are selected, and the prediction value is calculated using an interpolation filter. This method can be called the IntraTMP SubPel mode. Exemplarily, in some embodiments, in the IBC mode, in addition to the above basic copying method for obtaining the prediction value, there is also an IBC flipping mode, which requires the prediction area to be flipped horizontally or vertically as a method for obtaining the prediction value. For example, a syntax element is used to indicate whether to flip, and if flipped, whether to flip horizontally or vertically. The decoding end rearranges the reference area pixels in the horizontal or vertical direction in reverse according to the instructions of the syntax to obtain the predicted pixel values ​​of the coding block. Or use the template to build a model between the current block and the predicted area, and then process the predicted block according to the model to get the predicted value of the current block. For example, the IBC LIC mode, applied to IBC MEGRE and IBC ABVP, uses a linear equation to compensate for local illumination changes. Similar to the LIC of VVC's inter-frame prediction, the parameters of the linear equation can be expressed by a scaling parameter α and an offset parameter β, that is, α×p[x]+β to compensate for illumination changes, where p[x] is the reference sample pointed to by the position x of BV on the current image. The least squares method is used to derive the linear model parameters. In addition to the above prediction values, there is also the FIBC mode, which builds a linear model between the reference block template corresponding to the BV and the current block template to obtain the filter coefficients, and then applies this linear filter model to the current block to obtain the final prediction value. There is also a prediction mode similar to the IntraTMP Fusion mode, which fuses multiple IBC prediction blocks based on the relationship between multiple prediction blocks and the current block template. On the basis of the above-obtained prediction values, weighted prediction with other intra-frame prediction methods can also be implemented, and the result after weighted prediction is used as the final prediction result. The weighted prediction method includes the CIIP method of inter-frame and intra-frame hybrid prediction based on VVC, that is, weighted combination of the result obtained by the above prediction process and the prediction result obtained by the ordinary intra-frame directional prediction mode at each pixel position; it also includes the GPM method of inter-frame geometric prediction mode based on VVC, that is, based on a wedge division, the results obtained by different prediction modes are used in different wedge areas, and weighted mixing in accordance with certain rules is performed near the wedge division line. Exemplarily, in some embodiments, in the Intra TMP technology, different prediction methods are used according to different prediction modes. For example, in the Intra TMP Fusion technology, after obtaining the block vectors BV corresponding to the N candidate templates, N candidate reconstruction blocks are obtained through BV, and then the N candidate reconstruction blocks are weighted and fused to obtain the prediction block of the current coding block. Specifically, the final prediction value is generated through the following steps: obtaining N candidate reconstruction blocks, determining weighted fusion weights, and then generating a prediction value through weighted fusion. Among them, when obtaining N candidate reconstruction blocks, the block vector BV corresponding to the N candidate templates is obtained, and directly based on BV n Get the candidate reconstruction block RefBlock in the current image n , where BV n The horizontal offset is pX n , the vertical offset is pY n , where n=0, 1…, N-1. It is realized by simple translation copy. The specific operation is: for x = 0...nTbW-1, y = 0...nTbH-1, RefBlock n [x][y]=recSamples[x+pX n ][y+pY n ] Where recSamples represents the reconstructed pixels of the current frame. When determining the weighted fusion weight, after obtaining N candidate reconstruction blocks RefBlock, it is necessary to calculate the weight W of the weighted fusion of the N candidate reconstruction blocks. The weight may be a predefined value or a value adaptively calculated using a cost value, a pixel value, or the like. For example, in some embodiments, the Intra TMP Fusion technology uses the candidate template refT n The reconstruction value and the template to be predicted refpredT n The pixel value of θ minimizes the MSE and derives the weighted fusion weight. Specifically, the MSE minimization process takes the autocorrelation matrix of the first P matching reference samples refT, the cross-correlation vector of the first P matching reference samples refT and the adjacent template samples curT of the current coding block as input, and outputs the weight of the reconstructed block corresponding to each matching reference item. When the prediction value is generated by weighted fusion, the prediction block is calculated according to each candidate reconstructed block and its corresponding weighted fusion weight. Specifically, the value of each candidate reconstructed block and its corresponding weight are multiplied and accumulated to obtain the current prediction block (ie, weighted prediction). For x = 0 ... nTbW-1, y = 0 ... nTbH-1, the prediction value is calculated as shown in formula (2). x,y The spatial storage is the output prediction block of Intra TMP Fusion. Exemplarily, in some embodiments, in the IntraTMP FLM mode, the linear filter model is established using the best matching template obtained in the previous step and the current coding block template. It mainly includes the following two processes: determining the reconstruction area for calculating the filter coefficients, and calculating the filter coefficients. For example, as shown in FIG7, assuming that the number of filter taps nTap is 5, the shape of the filter is shown in the left figure, c0 to c4 are the tap coefficients of the filter, respectively, where the tap coefficient C0 corresponds to the current pixel Y to be predicted. pred [i][j] is the reconstructed pixel ref[i][j] at the corresponding position in the best matching block; the remaining points are the reconstructed pixels in the best matching reconstructed block that are adjacent to the current spatial position. The right point is the predicted pixel Y pred [i][j]. For each current pixel to be predicted (i, j), the pixel position in the filter template is defined as (k, l), then the corresponding reconstructed pixel in the best matching block during filtering is defined as ref[i+k][j+l], and each filter coefficient at the position (k, l) in the filter template is defined as c k,l The specific calculation process is shown in formula (3) to formula (6). Exemplarily, in some embodiments, in the Intra TMP SubPel mode, for the optimal BV, eight directions of 1 / 4, 1 / 2, 3 / 4, up, down, left, right, upper left, upper right, lower left, and lower right are traversed and sorted according to the template cost, and the reference block corresponding to the BV with the smallest template cost is calculated using an interpolation filter. Exemplarily, in some embodiments, in the IBC technology, in the IBC flip mode, the prediction area needs to be flipped horizontally or vertically as a method for obtaining the prediction value. For example, a syntax element is used to indicate whether to flip, and if flipped, whether to flip horizontally or vertically. The decoding end rearranges the reference area pixels in the horizontal or vertical direction in reverse according to the instruction of the syntax to obtain the predicted pixel value of the coding block. Exemplarily, in some embodiments, the IBC LIC mode uses a template to establish a model between the current block and the prediction area, and the prediction block is processed according to the model to obtain the prediction value of the current block. The IBC LIC mode, applied to IBC MEGRE and IBC ABVP, uses a linear equation to compensate for local illumination changes. Similar to the LIC of inter-frame prediction of VVC, the parameters of the linear equation can be expressed by a scaling parameter α and an offset parameter β, that is, α×p[x]+β to compensate for illumination changes, where p[x] is the reference sample pointed to by the position x of BV on the current picture. The least squares method is used to derive the linear model parameters. Exemplarily, in some embodiments, in the Filter IBC mode, a linear model is established using the template of the current block and the reference block template corresponding to BV, and the filter coefficient is obtained and used for the current block to obtain the final prediction value. Wherein, for each current pixel to be predicted (i, j), the pixel position in the filter template is defined as (k, l), then the corresponding reconstructed pixel in the best matching block during filtering is defined as ref[i+k][j+l], and each filter coefficient at the position (k, l) in the filter template is defined as c k,l The specific calculation process is shown in formula (3) to formula (5). On the basis of the above-obtained prediction values, weighted prediction with other intra-frame prediction methods can also be implemented, and the result after weighted prediction is used as the final prediction result. The weighted prediction method includes the CIIP method of inter-frame and intra-frame hybrid prediction based on VVC, that is, weighted combination of the result obtained by the above prediction process and the prediction result obtained by the ordinary intra-frame directional prediction mode at each pixel position; it also includes the GPM method of inter-frame geometric prediction mode based on VVC, that is, based on a wedge division, the results obtained by different prediction modes are used in different wedge areas, and weighted mixing in accordance with certain rules is performed near the wedge division line. An example of the operation process in the BV-based CIIP mode is as follows: the BV-based prediction value of the current block is weightedly fused with the prediction value of a certain intra-frame mode. The BV-based prediction part can be obtained by applying the conventional MEGRE, TM MEGRE, MBVD and ABVP modes. For the case where the BV-based prediction part is in different modes, different weights can be set. For example, when the BV-based prediction part mode is the conventional IBC MEGRE, TM MEGRE, MBVD mode, the weight ratio of BV-based prediction and intra-frame prediction is 13:3, and the intra-frame mode includes the TIMD mode of the current block and the intra-frame prediction mode at the candidate BV. If the second prediction mode in the intra-frame mode is the same as the first prediction mode, it is determined whether the first prediction mode is the PLANAR mode. If so, the second prediction mode is replaced with the horizontal prediction mode, otherwise the second prediction mode is replaced with the PLANAR mode. For the case where the BV-based prediction part is the ABVP mode, the weight ratio of BV-based prediction and intra-frame prediction is 1:1, and the first prediction mode with the TIMD mode as the intra-frame prediction mode is obtained. If the derived prediction mode is the horizontal prediction mode, the second prediction mode with PLANAR as the intra-frame prediction mode is obtained, otherwise, the second prediction mode with the horizontal prediction mode as the intra-frame prediction mode is obtained. An example of the operation process in the BV-based GPM mode: Conventional MEGRE and TM MEGRE can be applied to the BV-based prediction part. For example, a prediction mode with one partition being a BV-based mode and a mode with one partition being an INTRA mode can be implemented, and the intra prediction mode (IPM) candidate list is constructed using the same method as the inter GPM and the IPM candidate list size is predefined as 3. In a specific implementation, there are 48 geometric partitioning modes, which can be divided into two geometric partitioning mode sets, as shown in Table 2 and Table 3. When using BV-based GPM, a flag of the BV-based GPM (e.g., IBC-GPM) geometric partitioning mode set is transmitted to indicate whether the first or second geometric partitioning mode set is selected, and then the geometric partitioning mode index is transmitted; then the partition flag within the BV-based GPM (or IBC-GPM) frame is transmitted to indicate whether intra prediction is used for the first sub-partition. Among them, the intra prediction part needs to transmit the intra prediction mode index; the IBC prediction part needs to transmit the MEGRE index. Step 1105: Determine a reconstructed block corresponding to the current block based on the prediction block of the current block and the first transformation parameter. In an embodiment of the present application, after determining the first reference block and the prediction block of the current block according to the prediction parameters of the current block, a reconstructed block corresponding to the current block may be further determined based on the prediction block and the first transformation parameters of the current block. Furthermore, in an embodiment of the present application, the code stream may be decoded to determine the first transform coefficient corresponding to the prediction residual. Further, in an embodiment of the present application, when determining a reconstructed block corresponding to the current block based on the prediction block of the current block and the first transformation parameter, the prediction residual can be determined based on the first transformation parameter and the first transformation coefficient; then, the reconstructed block corresponding to the current block can be determined based on the prediction block of the current block and the prediction residual. It should be noted that in an embodiment of the present application, when determining the prediction residual based on the first transformation parameter and the first transformation coefficient, a secondary inverse transformation can be performed based on the first transformation coefficient and the first transformation parameter to determine the second transformation coefficient; then a primary inverse transformation can be performed based on the second transformation coefficient to determine the prediction residual. It can be understood that, in the embodiment of the present application, the first transform coefficient may be an inverse secondary transform coefficient vector u[i], and the second transform coefficient may be an inverse primary transform coefficient vector v[j]. That is to say, in an embodiment of the present application, after determining the first transformation parameter, that is, the transformation matrix, the inverse secondary transformation coefficient vector u[i], i=0…nonZeroSize-1 can be used as input, and the transformation matrix is ​​used to multiply it to obtain the inverse first-transform coefficient vector v[j], j=0…nLfnstOutSzie-1. Then, the one-dimensional inverse first-transform coefficient vector v[j], j=0…nLfnstOutSzie-1 is used to construct the two-dimensional inverse first-transform coefficient matrix d'[x][y] of the current transform block, x=0…nLfnstSize-1, y=0…nLfnstSize-1. Among them, according to different intra-frame prediction modes, there are two filling scanning orders: horizontal and vertical scanning modes. Then, the inverse first-transform coefficient matrix is ​​used to perform an inverse transform to generate a prediction residual. Further, in the embodiment of the present application, the secondary transformation coefficient vector u[i] is taken as input, and the transformation matrix is ​​used to multiply it to obtain the primary transformation coefficient vector v[j], where i=0, 1, ..., nonZeroSize-1, j=0, 1, ..., nLfnstOutSize-1. Assuming that the transformation matrix obtained in the previous step is lowFreqTransMatrix, the specific calculation process of v[j] is as follows: Among them, Clip3 is a clamping operation, which can limit the value of the coefficient between the following two numbers, as shown below: CoeffMin = -(1 < < 15) (11) CoeffMax = (1 < < 15) - 1 (12) Furthermore, after the above matrix calculation, the transformation processing of the transformation coefficients can be realized. Here, for 4×4 LFNST, 16 or 8 coefficients will be input on the decoder side, and 16 coefficients will be output; and for 8×8 LFNST, 16 or 8 coefficients will be input on the decoder side, and 48 coefficients will be output to realize the LFNST transformation processing of the transformation coefficients. Further, in an embodiment of the present application, after determining the prediction residual corresponding to the current block and the prediction block of the current block, the image reconstruction process of the specified color component specified in the decoding specification can be called. In order to realize the reconstruction operation, the prediction signal and the residual signal need to be added for the mode with residual. In summary, through the decoding method proposed in the above steps 1101 to 1105, the initial prediction value based on BV is selected, that is, the first reference block directly indicated by BV is used to directly derive the prediction direction, thereby guiding the selection of the transform set related to directionality. On the one hand, compared with the final prediction value after subsequent data processing processes such as filtering, fusion, and pixel division, the initial prediction value has richer texture edge information. Therefore, using the initial prediction value can derive more accurate gradient direction, prediction angle, and angle amplitude, so that a more matching traditional intra-frame prediction mode can be determined, and a more accurate LFNST transform kernel can be obtained, and a more matching transform matrix can be determined, thereby effectively improving the encoding and decoding performance. On the other hand, after determining the first reference block directly indicated by BV, the generation of the prediction block, as well as the generation of transform parameters and residuals, can be performed in parallel, shortening the length of the encoding and decoding key path, solving the problem of high complexity, and improving the encoding and decoding efficiency, while facilitating hardware design and implementation. Furthermore, in an embodiment of the present application, after determining the first reference block corresponding to the current block, a prediction block of the current block can be determined based on the first reference block of the current block; then, a second transformation parameter corresponding to the current block can be determined based on the prediction block of the current block; and based on the prediction block of the current block and the second transformation parameter corresponding to the current block, a reconstructed block corresponding to the current block can be determined. It should be noted that, in the embodiment of the present application, the transformation parameter of the current block, such as the second transformation parameter, may include an index reference (such as LFNST) for indicating the transformation matrix used, or may be the transformation matrix itself. Furthermore, in an embodiment of the present application, the code stream can also be decoded to determine the first identification information; when the value of the first identification information is a first value, it is determined to use the first transformation parameter; when the value of the first identification information is a second value, it is determined to use the second transformation parameter. That is to say, in the embodiment of the present application, it can be determined whether to use the first transformation parameter determined based on the first reference block or the second transformation parameter determined based on the prediction block according to the first identification information transmitted in the code stream. It can be understood that in the embodiment of the present application, the initial prediction value, that is, the first transform parameter generated by the first reference block of the current block, and the final prediction value, that is, the second transform parameter generated by the prediction block of the current block can be mixed, wherein the prediction direction (or gradient direction) derived from which data can be selected can be determined by certain conditions. For example, it can be determined whether to use the first transform parameter or the second transform parameter according to the first identification information determined by the decoded code stream. It should also be noted that in the embodiment of the present application, the first value is different from the second value, and the first value and the second value can be in parameter form or in digital form. Specifically, the first prediction mode identification information and the second prediction mode identification information can be parameters written in the profile, or can be the value of a flag, which is not specifically limited here. In addition, for the first value and the second value, 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. Among them, in the embodiment of the present application, the first value is set to 0 and the second value is set to 1, but it is not specifically limited. Exemplarily, in some embodiments, at the encoding end, it can be determined whether to directly adopt the prediction direction derived from one of the prediction data based on the consistency between the prediction direction derived from the initial prediction value and the prediction direction derived from the final prediction value, or to use the first identification information in the bitstream to indicate which prediction direction to use. Further, in an embodiment of the present application, a first prediction histogram corresponding to the first reference block and a second prediction histogram corresponding to the prediction block may be determined respectively. Accordingly, in an embodiment of the present application, a first gradient direction and a second gradient direction in a first prediction histogram may be determined; when an amplitude difference between the first gradient direction and the second gradient direction is less than or equal to a preset threshold, a reconstructed block corresponding to the current block is determined based on the first transformation parameter; and when an amplitude difference between the first gradient direction and the second gradient direction is greater than the preset threshold, a reconstructed block corresponding to the current block is determined based on the second transformation parameter. It should be noted that, in an embodiment of the present application, the first gradient direction may be the gradient direction with the highest (largest) amplitude in the first prediction histogram, and the second gradient direction may be the gradient direction with the second highest amplitude in the first prediction histogram. Accordingly, in an embodiment of the present application, the first gradient direction and the second gradient direction in the second prediction histogram can be determined; when the amplitude difference between the first gradient direction and the second gradient direction is less than or equal to a preset threshold, the reconstructed block corresponding to the current block is determined based on the first transformation parameter; when the amplitude difference between the first gradient direction and the second gradient direction is greater than the preset threshold, the reconstructed block corresponding to the current block is determined based on the second transformation parameter. It should be noted that, in an embodiment of the present application, the first gradient direction may be the gradient direction with the highest (largest) amplitude in the second prediction histogram, and the second gradient direction may be the gradient direction with the second highest amplitude in the second prediction histogram. It is understandable that in the embodiment of the present application, the initial prediction value, that is, the first transformation parameter produced by the first reference block of the current block, and the final prediction value, that is, the second transformation parameter produced by the prediction block of the current block, can be mixed, wherein the judgment can be made according to the mode histogram (the first prediction histogram or the second prediction histogram). If the highest amplitude and the second highest amplitude differ greatly, for example, exceeding a preset threshold, that is, it can be considered that there is a peak value, then the prediction value before data processing (initial prediction value) is used for direction deduction, otherwise the prediction value after data processing (final prediction value) is used for direction deduction. Further, in an embodiment of the present application, a template direction corresponding to the first template can be determined; then a first correlation parameter between the gradient direction with the largest amplitude in the first prediction histogram and the template direction is determined; and at the same time, a second correlation parameter between the gradient direction with the largest amplitude in the second prediction histogram and the template direction is determined; when the first correlation parameter is greater than or equal to the second correlation parameter, a reconstructed block corresponding to the current block is determined based on the first transformation parameter; when the first correlation parameter is less than the second correlation parameter, a reconstructed block corresponding to the current block is determined based on the second transformation parameter. It can be understood that in an embodiment of the present application, an initial prediction value, that is, a first transformation parameter produced by a first reference block of the current block, and a final prediction value, that is, a second transformation parameter produced by a prediction block of the current block, can be used in combination, wherein the direction of the template (the template direction of the first template) can be used as a criterion to compare the gradient directions derived from the reference block before data processing (initial prediction value) and the prediction block after data processing (final prediction value), and select the gradient direction close to the template direction as the gradient direction used last, that is, select the transformation matrix corresponding to the prediction data close to the template direction for subsequent transformation processing. Further, in an embodiment of the present application, when determining the first transformation parameter, the horizontal gradient and the vertical gradient corresponding to the first reference block may be determined based on a portion of pixels or all pixels in the first reference block. Further, in an embodiment of the present application, when determining the second transformation parameter, the horizontal gradient and the vertical gradient corresponding to the prediction block may be determined according to a part of the pixels or all of the pixels in the prediction block. That is to say, in the embodiment of the present application, all pixels or part of pixel values ​​may be selected for direction derivation. For example, the CCLM point selection method may be analogous to selecting four points on the upper side and the left side for direction derivation. Furthermore, in an embodiment of the present application, the first reference block of the current block can be corrected according to the first processing strategy to determine the first prediction block corresponding to the first reference block; and then the first prediction block can be corrected according to the second processing strategy to determine the prediction block of the current block. Correspondingly, in an embodiment of the present application, the third transformation parameter corresponding to the current block can also be determined according to the first prediction block; and then the reconstructed block corresponding to the current block is determined based on the prediction block of the current block and the third transformation parameter corresponding to the current block. It should be noted that, in the embodiment of the present application, the transformation parameter of the current block, such as the third transformation parameter, may include an index reference (such as LFNST) for indicating the transformation matrix used, or may be the transformation matrix itself. It is understandable that in the embodiment of the present application, if multiple steps are required between the final prediction value and the initial prediction value, the intermediate prediction value (i.e., the first prediction block) in the middle of the multiple steps can also be selected as the input for determining the prediction direction. For example, when the prediction value based on BV is first filtered and then fused to obtain the final prediction value, the filtered intermediate prediction information can be used as input to determine the corresponding transformation matrix, such as the third transformation parameter. It should be noted that, in the embodiment of the present application, the first processing strategy and the second processing strategy may include at least one of the following processing: fusion processing, filtering processing, pixel sub-processing, and pixel flipping processing. It can be seen that the decoding method proposed in the embodiment of the present application is a method for obtaining reconstruction values ​​based on the BV prediction mode. Focusing on the generation of the prediction value and the residual secondary transformation selection method dependent on the prediction value, the initial prediction value obtained by BV can be derived based on the direction of the DIMD technology, and the transformation selection matrix related to the direction can be guided by the derivation direction to perform inverse transformation to generate the residual. On the one hand, compared with the final prediction value after subsequent data processing processes such as filtering, fusion, and pixel division, the initial prediction value has richer texture edge information. Therefore, the use of the initial prediction value can derive a more accurate gradient direction, prediction angle, and angle amplitude, so that a more matching traditional intra-frame prediction mode can be determined, and a more accurate LFNST transformation kernel can be obtained. And a more matching transformation matrix is ​​determined, which can effectively improve the encoding and decoding performance. On the other hand, after determining the first reference block directly indicated by BV, the generation of the prediction block, as well as the generation of transformation parameters and residuals, can be performed in parallel, shortening the length of the key path of encoding and decoding, solving the problem of high complexity, and improving the efficiency of encoding and decoding, while facilitating hardware design and implementation. Exemplarily, in some embodiments, Figure 13 is a schematic diagram 1 of obtaining reconstructed pixel values ​​based on the BV prediction mode proposed in an embodiment of the present application. As shown in Figure 13, in the process of reconstructing pixel values, it can mainly include the following steps: S1, determining a block vector; S2, generating an initial prediction value; S3, generating a final prediction value; S4, intra-frame prediction mode mapping; S5, determining a transform block matrix; S6, secondary transform inverse transform; S7, primary transform inverse transform; and S8, generating a reconstructed value. Among them, for the intra-frame prediction mode mapping step, the input is no longer the final prediction value corresponding to the current block, but the initial prediction value corresponding to the current block, which is directly indicated by BV, that is, the first reference block of the current block. It should be noted that, in the embodiment of the present application, compared with the final prediction value after subsequent data processing such as filtering, fusion, pixel division, etc., the initial prediction value directly obtained based on the prediction parameter, such as the first reference block directly indicated by BV, has more texture edge information. This is because the data processing such as filtering, fusion, pixel division, etc. performed on the basis of the initial prediction value, such as low-pass filtering, is equivalent to a smoothing operation, which causes the final prediction value obtained after processing to lose some texture edge information. Accordingly, in an embodiment of the present application, in the process of mapping the intra-frame prediction mode based on the prediction value, since the initial prediction value has richer texture edge information, compared with using the final prediction value to map the intra-frame prediction mode, using the initial prediction value can derive a more accurate gradient direction, prediction angle and angle amplitude, thereby determining a more matching traditional intra-frame prediction mode. Accordingly, in an embodiment of the present application, after determining the corresponding intra-frame prediction mode using the initial prediction value directly obtained by the prediction parameters, such as the first reference block directly indicated by BV, a more accurate LFNST transform kernel can be further obtained, thereby determining a more matching transform matrix, thereby effectively improving the encoding and decoding performance. Exemplarily, in some embodiments, Figure 14 is a second schematic diagram of obtaining reconstructed pixel values ​​based on the BV prediction mode proposed in an embodiment of the present application. As shown in Figure 14, in the process of reconstructing pixel values, it can mainly include the following steps: S1, determining a block vector; S2, generating an initial prediction value; S3, generating a final prediction value; S4, intra-frame prediction mode mapping; S5, determining a transform block matrix; S9, inverse transform; and S8, generating a reconstructed value. Among them, for the intra-frame prediction mode mapping step, the input is no longer the final prediction value corresponding to the current block, but the initial prediction value corresponding to the current block, which is directly indicated by BV, that is, the first reference block of the current block. It should be noted that, in the embodiment of the present application, compared with the final prediction value after subsequent data processing such as filtering, fusion, pixel division, etc., the initial prediction value directly obtained based on the prediction parameter, such as the first reference block directly indicated by BV, has more texture edge information. This is because the data processing such as filtering, fusion, pixel division, etc. performed on the basis of the initial prediction value, such as low-pass filtering, is equivalent to a smoothing operation, which causes the final prediction value obtained after processing to lose some texture edge information. Correspondingly, in an embodiment of the present application, when executing S9 and the inverse transformation, other transformation methods other than LFNST may be used, for example, when a non-separable primary transform (NSPT) is used, the transformation matrix may also be determined using the initial prediction value corresponding to the current block and directly indicated by BV. It should be noted that, in the embodiments of the present application, in the above scheme, the prediction parameter corresponding to the current block takes the block vector BV as an example, and the transformation method takes LFNST as an example to exemplify the decoding method proposed in the embodiments of the present application, but does not limit the prediction parameters and the transformation method, that is, the scheme proposed in the embodiments of the present application can also be applied to other prediction parameters, transformation parameters and transformation methods. The embodiment of the present application provides a decoding method, wherein the decoder determines the prediction parameters corresponding to the current block; determines the first reference block of the current block according to the prediction parameters of the current block; determines the first transformation parameters of the current block according to the first reference block of the current block; determines the prediction block of the current block according to the first reference block of the current block; and determines the reconstruction block corresponding to the current block based on the prediction block of the current block and the first transformation parameters. That is, in the embodiment of the present application, after determining the first reference block of the current block based on the prediction parameters, the first reference block that has not been processed by data can be directly used to determine the transformation parameters of the current block, and then the determined transformation parameters are used in combination with the prediction block of the current block obtained after data processing of the first reference block to complete the reconstruction of the current block. Among them, the data processing process will lose the texture edge information of the prediction block to a certain extent, so the initial prediction value before data processing (i.e., the first reference block) has richer texture edge information than the final prediction value after data processing (i.e., the prediction block), and the first reference block is used to derive the prediction direction, which can obtain more accurate transformation parameters, thereby effectively improving the encoding and decoding performance. At the same time, after determining the first reference block directly indicated by the prediction parameter, the generation of the prediction block, and the generation of the transform parameters and the residual can be performed in parallel, which shortens the length of the encoding and decoding key path, solves the problem of high complexity, and thus can improve the encoding and decoding efficiency. It can be seen that the encoding and decoding method proposed in the embodiment of the present application can improve the encoding and decoding efficiency and performance. An embodiment of the present application proposes an encoding method, which is applied to an encoder. FIG. 15 is a flow chart of the encoding method proposed in the embodiment of the present application. As shown in FIG. 15 , the encoding method of the encoder may include the following steps: Step 1501: Determine the prediction parameters corresponding to the current block. In the embodiment of the present application, the prediction parameters corresponding to the current block may be determined first. It should be noted that the encoding method of the embodiment of the present application is applied to an encoder. In addition, the encoding method may include an intra-frame prediction method, more specifically, a color component prediction method. Among them, the video image can be divided into multiple coding blocks, each coding block may include a first color component, a second color component and a third color component, and the current block in the embodiment of the present application refers to the coding block in the video image that is currently to be intra-frame predicted. Here, when the first color component needs to be predicted, the component to be predicted is the first color component; when the second color component needs to be predicted, the component to be predicted is the second color component; when the third color component needs to be predicted, the component to be predicted is the third color component. In addition, assuming that the current block predicts the first color component, and the first color component is the brightness component, that is, the component to be predicted is the brightness component, then the current block can also be called a brightness block; or, assuming that the current block predicts the second color component, and the second color component is the chrominance component, that is, the component to be predicted is the chrominance component, then the current block can also be called a chrominance block. It should be noted that, in the embodiment of the present application, the prediction parameter corresponding to the current block may include a block vector of the current block. It should be noted that, in the embodiment of the present application, the first reference block and the current block are in the same image; accordingly, the block vector represents the position offset between the current block and the first reference block. It can be understood that, in the embodiment of the present application, for the intra prediction mode, the first reference block of the current block may be determined based on the block vector of the current block. It should be noted that, in the embodiment of the present application, the prediction parameters corresponding to the current block may include the motion vector and the reference image index of the current block. It should be noted that, in the embodiment of the present application, the first reference block is located in the reference image indicated by the reference image index; accordingly, the motion vector represents the position offset between the current block and the first reference block. It can be understood that, in the embodiment of the present application, for the inter-frame prediction mode, the first reference block of the current block may be determined based on the motion vector of the current block. It should be noted that, in the embodiment of the present application, the prediction parameter corresponding to the current block takes the block vector BV as an example, and the transformation method takes LFNST as an example to exemplify the encoding method proposed in the embodiment of the present application. Further, in an embodiment of the present application, when determining the block vector of the current block, a first template corresponding to the current block may be determined first, and a preset search area may be determined; and a search may be performed within the preset search area to determine the block vector of the current block. Furthermore, in an embodiment of the present application, when determining the block vector of the current block, a first template corresponding to the current block can be determined first, and a preset search area can be determined; a search is performed within the preset search area to construct a block vector candidate list of the current block; and the block vector of the current block is determined based on the block vector candidate list. Furthermore, in an embodiment of the present application, when determining the block vector of the current block, the block vectors of the adjacent blocks corresponding to the current block may be determined first; a block vector candidate list of the current block may be constructed based on the block vectors of the adjacent blocks; and the block vector of the current block may be determined based on the block vector candidate list. Exemplarily, in some embodiments, in the IntraTMP mode, when acquiring the first template, the template type corresponding to the current block may be determined first, and then the first template corresponding to the current block may be further determined based on the template type. The template type of the current block may be determined based on the indication information in the bitstream, the template type of the current block may be determined based on the size of the current block, or the template type of the current block may be determined based on the reference pixels of the current block. It can be understood that in the embodiment of the present application, the reference pixels of the current block may include the adjacent reconstructed pixels of the current block, that is, the adjacent reconstructed pixels of the current block may be selected as a template to search for a matching template in a predefined search area. It should be noted that, in an embodiment of the present application, the reference pixels of the current block, that is, the adjacent reconstructed pixels of the current block may include the upper reference pixel, the upper left reference pixel, the upper right reference pixel, the left reference pixel and the lower left reference pixel of the current block. It can be understood that in the embodiment of the present application, when the template type of the current block is determined using the reference pixels of the current block, the template type can be classified and determined according to whether the adjacent reference pixels are available. That is to say, in the embodiments of the present application, the template type can be determined according to the availability information of the reference pixels of the current block, or according to the information indicated in the bitstream, or in combination with the availability information of the reference pixels and the information indicated in the bitstream. This application does not make any specific limitation. It should be noted that in an embodiment of the present application, when determining the first template corresponding to the current block according to the template type, the template reference pixels of the current block can be first determined according to the template type and the template size corresponding to the template type, and then the first template of the current block can be determined according to the template reference pixels. It should be noted that, in the embodiments of the present application, the template size corresponding to the template type may be pre-set, may be indicated by a code stream syntax element, or may be adaptively selected based on a block size or other information. For example, when obtaining a left template, the template width templateW_size may be set to 4, and when obtaining an upper template, the template height templateH_size may be set to 4. It should be noted that, in an embodiment of the present application, the block vector search process may include an initialization process, determining a search area (preset search area) of the first template in the current frame, searching and determining one or a pair of optimal block vectors in the search area. It should be noted that, in an embodiment of the present application, as shown in Figure 3, the area filled with dark color represents the reconstructed area, the block filled with a grid is the current block, and the adjacent area of ​​the current block is the first template (T); the block filled with slashes is the reference block, and the adjacent area of ​​the reference block is the second template (i.e., the best matching template, T_BEST); wherein, the offset of the second template relative to the first template is the best block vector (BV_BEST). In an embodiment of the present application, the preset cost function can be the absolute error sum SAD, the absolute transformation difference sum SATD, the mean square error MSE, the error square sum SSD, the mean absolute difference MAD, the mean error square sum MSD, the normalized correlation coefficient NCC, etc., which is not specifically limited here. It should be noted that in the embodiment of the present application, the matching cost between the matching template corresponding to the search point in the preset search area and the first template is determined according to the preset matching criteria; then one or more block vectors are determined according to the matching cost. Among them, for the case of a block vector, a BV candidate list can be established, and the list stores multiple BV candidates in order of cost from small to large, and then the corresponding syntax elements in the bitstream determine which BV candidate or candidates are finally selected. For example, in some embodiments, in IBC mode, BV can be obtained in multiple ways. For example, if it is IBC MEGRE mode, the encoder builds a MEGRE list, determines the MEGRE list option index, and then obtains the specific information of BV from the corresponding option in the MEGRE list according to the index; for another example, in ordinary IBC mode, the encoder can obtain the specific information of BV according to BV or BV prediction difference. Exemplarily, in some embodiments, in the IBC mode, the specific process of deriving BV is as follows: (1) Brightness: Input: luma position (xCb, yCb), which specifies the top left corner sample of the current coding block relative to the top left corner luma sample of the current picture, a variable cbWidth, which specifies the width of the current coding block in luma samples, and a variable cbHeight, which specifies the height of the current coding block in luma samples. Output: BVL (Block Vector Luma) of brightness. The IBC mode is divided into IBCMEGRE and IBCAMVP. When deriving BVL, it is necessary to establish an IBC block vector candidate list BVCandList. The following introduces the list establishment process of IBCMEGRE. The list establishment process of IBCAMVP is consistent with that of IBCMEGRE, but the maximum number of candidates of the two is inconsistent. Step 1: When IsGt4by4 is equal to TRUE (the variable IsGt4by4 is the brightness width multiplied by the height, and is TRUE when IsGt4by4 is greater than 16), the derivation process of the spatial block vector candidate from the adjacent coding unit specified in the decoding specification is called using the brightness coding block position (xCb, yCb), the brightness coding block width cbWidth and the height cbHeight as input, and the output is the availability flags availableFlagA1, availableFlagB1 and the block vectors BVA1 and BVB1. Among them, A1 and B1 are adjacent blocks. As shown in Figure 6, the relative positions of the adjacent blocks where A1 and B1 are located to the current coding block are the lower left corner and the upper right corner, respectively. Step 2: When IsGt4by4 is equal to TRUE, the block vector candidate list BVCandList is constructed as follows: i = 0 if (availableFlagA1) BVCandList[i++] = BVA1 if (availableFlagB1) BVCandList[i++] = BVB1 Step 3: The variable numCurrCand indicates the number of candidates currently obtained. The derivation process of numCurrCand is as follows: If IsGt4by4 is equal to TRUE, numCurrCand is set equal to the number of candidates in BVCandList; otherwise numCurrCand is set to 0. Step 4: When numCurrCand is less than MaxNumIbcMEGRECand (the maximum number of candidates in MEGRE mode) and NumHmvpIbcCand (the maximum number of candidates representing the historical optimal block vector (Hmvp) in IBC mode) is greater than 0, the derivation process of the history-based IBC block vector candidate specified in the decoding specification is called with BVCandList and numCurrCand as input and the modified BVCandList and numCurrCand as output. Step 5: When numCurrCand is less than MaxNumIbcMEGRECand, the following applies until numCurrCand equals MaxNumIbcMEGRECand: BVCandList[numCurrCand][0] (ie, the horizontal component of BV) is set equal to 0. BVCandList[numCurrCand][1] (ie, the vertical component of BV) is set equal to 0. numCurrCand increases by 1. In this way, the block vector candidate list BVCandList is established. The general_MEGRE_flag is used to indicate whether it is the IBCMEGRE mode. The candidate index BVIdx is derived in the following way: BVIdx = general_MEGRE_flag[xCb][yCb]? MEGRE_idx[xCb][yCb] : mvp_l0_flag[xCb][yCb] In this way, according to the index BVIdx and the block vector candidate list BVCandList, the specific BVL can be obtained: BVL[0] = BVCandList[BVIdx][0] BVL[1] = BVCandList[BVIdx][1] For the IBCAMVP mode, the specific BVL obtained through the index BVIdx and the block vector candidate list BVCandList is the predicted BVL. The real BVL also needs to add the block vector difference (BVD). The specific process is as follows: Step 1: Obtain the horizontal and vertical components of BVD, where MvdL0 is the forward motion vector difference. BVd[0] = MvdL0[xCb][yCb][0] BVd[1] = MvdL0[xCb][yCb][1] Step 2: Perform a rounding operation on the predicted BVL obtained above. The right shift parameter AmvrShift is used for rounding, and the left shift parameter AmvrShift is used to improve the resolution. offset = (AmvrShift == 0)? 0 : ((1 << (AmvrShift - 1)) - 1) BVL[0] = Sign(BVL[0]) * (((Abs(BVL[0]) + offset) >> AmvrShift) << AmvrShift) BVL[1] = Sign(BVL[1]) * (((Abs(BVL[1]) + offset) >> AmvrShift) << AmvrShift) Step 3: The real BVL is derived as follows, and its range needs to be controlled between -217 and 217 - 1: u[0] = (BVL[0] + BVd[0] + 218) % 218 BVL[0] = (u[0] >= 217)? (u[0] - 218) : u[0] u[1] = (BVL[1] + BVd[1] + 218) % 218 BVL[1] = (u[1] >= 217)? (u[1] - 218) : u[1] (2) Chrominance: If it is a dual-tree partition, no IBC is performed on the chrominance; if it is a single-tree partition, the BV of the chrominance needs to be derived. Input: BVL of brightness (1 / 16 pixel accuracy) Output: BVC (Block Vector chroma) of chroma (1 / 32 pixel accuracy) The derivation process is as follows: BVC[0] = ((BVL[0]>>(3+SubWidthC))×32) BVC[1] = ((BVL[1]>>(3+SubHeightC))×32) Among them, the specific process of using BV to derive prediction samples is as follows: Input: luma position (xCb, yCb), which specifies the top-left sample of the current coding block relative to the top-left luma sample of the current picture, a variable cbWidth, which specifies the width of the current coding block in luma samples, a variable cbHeight, which specifies the height of the current coding block in luma samples, a block vector BV, and a variable cIdx, which specifies the color component index of the current block. Output: array predSamples of predicted samples. The derivation process is as follows: When cIdx is equal to 0, that is, the brightness component, for x = xCb..xCb+cbWidth-1 and y = yCb..yCb+cbHeight-1: xVb = (x+(BV[0]>>4))&(IbcBufWidthY-1)yVb = (y+(BV[1]>>4))&(CtbSizeY-1)predSamples[x][y] = ibcVirBuf[0][xVb][yVb] IbcBufWidthY is the width of the brightness pixel of the reconstructed buffer stored in IBC, CtbSizeY is the size of CTU (Coding Tree Unit), and ibcVirBuf is the reconstructed pixel stored in IBC. When cIdx is not equal to 0, that is, the chrominance component, for x = xCb / SubWidthC..xCb / SubWidthC+cbWidth / SubWidthC-1 and y = yCb / SubHeightC..yCb / SubHeightC+cbHeight / SubHeightC-1: xVb = (x+(BV[0]>>5))&(IbcBufWidthC-1) yVb = (y+(BV[1]>>5))&((CtbSizeY / subHeightC)-1) predSamples[x][y] = ibcVirBuf[cIdx][xVb][yVb] The variables SubWidthC and SubHeightC depend on the chroma format sampling structure specified by sps_chroma_format_idc, and the specific correspondence is shown in Table 1. Further, in an embodiment of the present application, the prediction mode corresponding to the current block may be determined first, and when it is determined that the current block uses a prediction mode based on prediction parameters, the prediction parameter determination process may be executed, that is, the above step 1501 may be executed. At the same time, the prediction mode identification information corresponding to the current block may be determined, and the prediction mode identification information may be written into the bitstream. It is understandable that in the embodiment of the present application, at the decoding side, after receiving the video bitstream, the prediction mode identification information corresponding to the current block can be determined first, wherein the prediction mode identification information indicates the encoding mode of the current block and parameters related to the mode. It should be noted that in the implementation of the present application, the prediction mode generally includes a traditional intra-frame prediction mode and a non-traditional intra-frame prediction mode, and the traditional intra-frame prediction mode may include a DC mode, a PLANAR mode, and an angle mode, etc., and the non-traditional intra-frame prediction mode may include a MIP mode, a CCLM mode, an IBC mode, a PLT mode, an IntraTMP mode, etc. It can be understood that in the embodiments of the present application, on the encoder side, predictive coding is performed on the current block. During this process, the prediction mode of the current block can be determined, and the corresponding prediction mode identification information is written into the bitstream and transmitted from the encoder to the decoder. Accordingly, in the present application, at the decoder side, prediction mode identification information corresponding to the current block can be obtained by decoding the bitstream, and then the specific encoding mode of the decoding mode of the current block can be determined according to the prediction mode identification information. It should be noted that, in the embodiment of the present application, the prediction mode identification information can be used to indicate whether the current block uses a prediction mode based on prediction parameters. Exemplarily, in some embodiments, whether the current block uses a prediction mode based on a block vector, for example, a prediction mode based on a block vector such as an IBC mode or an IntraTMP mode, can be determined through the prediction mode identification information. Exemplarily, in some embodiments, when it is determined that the current block uses a prediction mode based on prediction parameters, the value of the prediction mode identification information is determined to be a first value; when it is determined that the current block does not use a prediction mode based on prediction parameters, the value of the prediction mode identification information is determined to be a second value. It should also be noted that in the embodiment of the present application, the first value is different from the second value, and the first value and the second value can be in parameter form or in digital form. Specifically, the first prediction mode identification information and the second prediction mode identification information can be parameters written in the profile, or can be the value of a flag, which is not specifically limited here. In addition, for the first value and the second value, 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. Among them, in the embodiment of the present application, the first value is set to 0 and the second value is set to 1, but it is not specifically limited. Step 1502: Determine a first reference block of the current block according to the prediction parameters of the current block. In the embodiment of the present application, after the prediction parameter corresponding to the current block is determined, the first reference block of the current block may be further determined according to the prediction parameter of the current block. It should be noted that, in the embodiment of the present application, at least one reference block corresponding to the current block may be determined according to the block vector of the current block. It should be noted that, in the embodiment of the present application, at least one reference block corresponding to the current block can be determined according to the motion vector of the current block. It should be noted that, in the embodiment of the present application, the first reference block of the current block can be an initial prediction block directly obtained based on the prediction parameters. For example, the first reference block can be an initial prediction block directly derived using the block vector of the current block, or can be an initial prediction block directly derived based on the motion vector of the current block. Exemplarily, in some embodiments, in the IntraTMP mode, the determined block vector of the current block may be the optimal block vector BV_BEST(pX_BEST, pY_BEST), where pX_BEST and pY_BEST are the horizontal and vertical offsets of the best matching template relative to the current block template, and are also the horizontal and vertical offsets of the best matching reconstructed block relative to the current block. Further, in the embodiment of the present application, when determining the first reference block corresponding to the current block based on the determined block vector, a simple translation copy can be used for implementation. The specific operation is: For x=0...nTbW-1, y=0...nTbH-1; predSamples[x][y]=recSamples[x+pX_BEST][y+pY_BEST] (7) Among them, recSamples represents the reconstructed pixels of the current frame. Exemplarily, in some embodiments, in IBC mode, input: luma position (xCb, yCb), specifies the upper left corner sample of the current coding block relative to the upper left corner luma sample of the current picture, a variable cbWidth, specifies the width of the current coding block in luma samples, a variable cbHeight, specifies the height of the current coding block in luma samples, a block vector BV, a variable cIdx, specifies the color component index of the current block. Output: an array of predicted samples predSamples. When cIdx is equal to 0, that is, the brightness component, for x = xCb..xCb+cbWidth-1 and y = yCb..yCb+cbHeight-1: xVb = (x+(BVL[0]>>4))&(IbcBufWidthY-1)yVb = (y+(BVL[1]>>4))&(CtbSizeY-1)predSamples[x][y] = ibcVirBuf[0][xVb][yVb] IbcBufWidthY is the width of the brightness pixel of the reconstructed buffer stored in IBC, CtbSizeY is the size of CTU (Coding Tree Unit), and ibcVirBuf is the reconstructed pixel stored in IBC. When cIdx is not equal to 0, that is, it is a chrominance component, for x = xCb / SubWidthC..xCb / SubWidthC+cbWidth / SubWidthC-1 and y = yCb / SubHeightC..yCb / SubHeightC+cbHeight / SubHeightC-1: xVb = (x+(BVC[0]>>4))&(IbcBufWidthC-1)yVb = (y+(BVC[1]>>4))&((CtbSizeY / subHeightC)-1)predSamples[x][y] = ibcVirBuf[cIdx][xVb][yVb]. Step 1503: Determine a first transformation parameter of the current block according to a first reference block of the current block. In an embodiment of the present application, after determining a first reference block of the current block according to a prediction parameter of the current block, a first transformation parameter of the current block may be further determined according to the first reference block of the current block. It should be noted that, in the embodiment of the present application, the transformation parameter of the current block, such as the first transformation parameter, may include an index reference (such as LFNST) for indicating the transformation matrix used, or may be the transformation matrix itself. Further, in an embodiment of the present application, when determining a first transformation parameter of a current block according to a first reference block of the current block, a statistical characteristic parameter of the first reference block may be determined first; and then the first transformation parameter may be determined according to the statistical characteristic parameter. It should be noted that, in the embodiment of the present application, the statistical characteristic parameters include a covariance matrix. Further, in an embodiment of the present application, when determining a first transformation parameter of a current block based on a first reference block of the current block, intra-frame mode information corresponding to the current block can be first determined based on the first reference block of the current block; and then the first transformation parameter is determined based on the intra-frame mode information. It can be understood that, in the context of the present application, the intra-frame mode information corresponding to the current block may include indication information of the traditional intra-frame prediction mode determined after intra-frame prediction mode mapping. It should be noted that, in an embodiment of the present application, when determining the intra-frame mode information corresponding to the current block based on the first reference block of the current block, the horizontal gradient and vertical gradient corresponding to the first reference block of the current block can be determined first; and then the intra-frame mode information corresponding to the current block can be determined based on the horizontal gradient and the vertical gradient. It should be noted that in the embodiment of the present application, when determining the horizontal gradient and vertical gradient corresponding to the first reference block of the current block, it is possible to choose to determine the horizontal gradient and vertical gradient corresponding to the first reference block based on a preset operator. Exemplarily, in some embodiments, a preset operator may be used to determine the gradient information, for example, the preset operator may be a Sobel operator, wherein the Sobel operator may complete the calculation of the horizontal gradient and the vertical gradient of the first reference block. Exemplarily, in some embodiments, the Sobel operator includes G x and G y , G x is used to calculate the horizontal gradient, G y It is used to calculate the vertical gradient. Further, in an embodiment of the present application, when determining the intra-frame mode information corresponding to the current block based on the horizontal gradient and the vertical gradient, a first prediction histogram can be first determined based on the horizontal gradient and the vertical gradient; when there is no non-zero amplitude in the first prediction histogram, the intra-frame mode information corresponding to the current block is determined to be the PLANAR mode; when there is a non-zero amplitude in the first prediction histogram, the intra-frame mode information corresponding to the current block is determined based on the gradient direction with the largest amplitude in the first prediction histogram. It should be noted that, in an embodiment of the present application, the intra-frame mode information corresponding to the current block determined according to the gradient direction with the largest amplitude in the first prediction histogram may be a traditional intra-frame prediction mode predModeIntra, where predModeIntra is between [0, 66]. Exemplarily, in some embodiments, based on the first reference block directly obtained through prediction parameters, the vertical gradient and horizontal gradient of all predicted pixels of the first reference block can be calculated, and then the direction with the largest gradient is mapped to a traditional intra-frame prediction mode, that is, the intra-frame mode information predModeIntra corresponding to the current block is determined. That is to say, in an embodiment of the present application, the gradient information between pixels in the first reference block can be used to derive the dominant prediction direction, thereby completing the mapping of the intra-frame prediction mode based on the first reference block and obtaining the corresponding intra-frame mode information predModeIntra. For example, in some embodiments, the horizontal gradient and vertical gradient of the first reference block under Intra TMP can be calculated by Sobel operator, and then the gradient analysis is completed and the traditional intra prediction mode is derived based on the first reference block, that is, the corresponding intra mode information predModeIntra is determined. x is used to calculate the horizontal gradient, G y It is used to calculate the vertical gradient. Exemplarily, in some embodiments, the input is a first reference block based on the BV mode, that is, an initial prediction value p[x][y], where x=0..nTbW-1, y=0..nTbH-1, where nTbW represents the width of the current transform block obtained based on the BV prediction mode, and nTbH represents the height of the current transform block obtained based on the BV prediction mode. Exemplarily, in some embodiments, the output is the intra mode information corresponding to the current block, the traditional intra prediction mode predModeIntra, where predModeIntra is between [0, 66]. Exemplarily, in some embodiments, in the process of performing intra prediction mode mapping based on the first reference block, the following operations may be performed in sequence: Set mapHgV = {{2, 1}, {1, 2}} and mapVgH = {{3, 4}, {4, 3}} Set angTable = {0, 2048, 4096, 6144, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 47104, 53248, 59392, 65536} Set angOffset = {18, 18, 50, 50} Set HoG

[0067] to an array containing the gradient magnitudes for each traditional intra prediction mode. At the beginning of this process, all values ​​in all HOG arrays are initialized to 0. Gradient Histogram For each predicted pixel p[x][y], with x=1…nTbW-2, y=1…nTbH-2, the calculation process is as follows: Calculate the horizontal gradient gHor[x][y] = p[x-1][y-1] + 2.p[x-1][y] + p[x-1][y+1] - p[x+1][y-1] - 2.p[x+1][y] - p[x+1][y+1] Calculate the vertical gradient gVer[x][y] = p[x-1][y-1] + 2.p[x][y-1] + p[x+1][y-1] - p[x-1][y+1] - 2.p[x][y+1] - p[x+1][y+1] Calculate iAmp[x][y]=abs(gHor[x][y])+abs(gVer[x][y]) Calculate signH[x][y]=gHor[x][y]<0? 1:0 Calculate signV[x][y]=gVer[x][y]<0? 1:0 Calculate HgV[x][y]=(abs(gHor[x][y])>abs(gVer[x][y])?1:0) Calculate region[x][y]=(HgV[x][y]==1?mapHgV[signH[x][y]][signV[x][y]]: mapVgH[signH[x][y]][signV[x][y]]) Calculate grad[x][y]=(HgV[x][y]==1? abs(gVer[x][y]) / abs(gHor[x][y]): abs(gVer[x][y]) / abs(gHor[x][y])) Calculate grad[x][y] = round(grad[x][y]×(1<<16)) Calculate the index angIdx[x][y] = argmin i (abs(angTable[i]-grad[x][y])) Angle index Calculate intra mode ipm[x][y] = angOffset[region[x][y]] + angIdx[x][y] intra prediction mode Set HOG[ipm[x][y]]=HOG[ipm[x][y]]+iAmp[x][y] If the HOG has no non-zero magnitude, then: Set predModeIntra to PLANAR otherwise: Set predModeIntra to argmax i (HoG[i]) where argmax i (L[i]), i = 0, ..., N returns the index between 0 and N that maximizes L (if there are multiple maxima, a smaller index is returned) argmin i (L[i]), i = 0, ..., N returns the index between 0 and N that minimizes L (if there are multiple maxima, smaller indices are returned) Finally, the mapping of the intra prediction mode predModeIntra is completed. It should be noted that, in the embodiment of the present application, compared with the final prediction value after subsequent data processing such as filtering, fusion, pixel division, etc., the initial prediction value directly obtained based on the prediction parameter, such as the first reference block directly indicated by BV, has more texture edge information. This is because the data processing such as filtering, fusion, pixel division, etc. performed on the basis of the initial prediction value, such as low-pass filtering, is equivalent to a smoothing operation, which causes the final prediction value obtained after processing to lose some texture edge information. Accordingly, in an embodiment of the present application, in the process of mapping the intra-frame prediction mode based on the prediction value, since the initial prediction value has richer texture edge information, compared with using the final prediction value to map the intra-frame prediction mode, using the initial prediction value can derive a more accurate gradient direction, prediction angle and angle amplitude, thereby determining a more matching traditional intra-frame prediction mode. Furthermore, in an embodiment of the present application, when determining the first transformation parameter according to intra-frame mode information, a transformation core candidate set can be first determined according to the intra-frame mode information corresponding to the current block; wherein the transformation core candidate set includes any number of transformation cores; the transformation core candidate set includes an LFNST transformation core candidate set, an NSPT transformation core candidate set, and any one of the transformation core candidate sets determined based on the prediction direction; then the first transformation core is determined in the transformation core candidate set; and finally the first transformation parameter can be determined according to the first transformation core. It should be noted that, in the embodiments of the present application, the first transformation parameter may be understood as a first transformation kernel, or may be understood as a first transformation matrix, that is, the first transformation kernel may be a first transformation matrix. It should be noted that, in the embodiment of the present application, the matrix size corresponding to the first transformation parameter can be determined based on the size of the current block, that is, the size of the first transformation matrix can be determined based on the size of the current block. That is to say, in an embodiment of the present application, the transform core candidate set determined according to the intra-frame mode information corresponding to the current block can be any one of the transform core candidate sets determined based on the prediction direction. For example, the transform core candidate set can be a LFNST transform core candidate set or a NSPT transform core candidate set, and the present application does not make specific limitations. It should be noted that in an embodiment of the present application, when determining the LFNST transform core candidate set according to the intra-frame mode information corresponding to the current block, the LFNST transform core candidate set corresponding to the intra-frame mode information can be determined according to the mapping relationship between the intra-frame mode and the transform core candidate set. Exemplarily, in some embodiments, after determining that the current block can use the LFNST technology, it is necessary to determine the LFNST transform kernel (which can be represented by kernel) used by the current block. There are 4 transform kernel candidate sets in LFNST, and these 4 transform kernel candidate sets may include set0, set1, set2 and set3. According to the coding parameters of the current block or the coding block where the current block is located, the selected transform kernel candidate set can be implicitly derived; for example, according to the intra-frame prediction mode of the current block, it can be determined which transform kernel candidate set of the four transform kernel candidate sets to use. It can be understood that in the embodiment of the present application, the value of the LFNST index number (which can be represented by SetIdx) can be determined according to the value of the intra mode information predModeIntra corresponding to the current block. Specifically, the value of the LFNST index number is set to indicate that the current block uses LFNST and the index number of the LFNST transform core in the LFNST transform core candidate set. Generally speaking, the LFNST transform set includes 4 transform core candidate sets (set0, set1, set2, set3), corresponding to the values ​​of SetIdx of 0, 1, 2, and 3, respectively. Exemplarily, in some embodiments, the mapping relationship between the intra mode and the transform kernel candidate set may be as shown in Table 4. Based on the value of predModeIntra and Table 4, the corresponding LFNST transform kernel candidate set may be determined. Furthermore, in an embodiment of the present application, a first transform core may be determined in the LFNST transform core candidate set to determine a first transform parameter; then a transform core index number is determined according to the first transform core, and the transform core index number is written into the bitstream. It should be noted that, in the embodiment of the present application, since the LFNST transform core candidate set includes two preset transform cores, by setting the transform core index number, the transform core indicated by the transform core index number can be selected from the LFNST transform core candidate set according to the value of the transform core index number obtained. For example, when the value of the transform core index number is 1, the first group of LFNST transform cores (i.e., the first group of transform matrices) in the LFNST transform core candidate set will be selected; or, when the value of the transform core index number is 2, the second group of LFNST transform cores (i.e., the second group of transform matrices) in the LFNST transform core candidate set will be selected. Further, in the embodiment of the present application, for the value of the transform core index number (i.e., lfnst_idx), when the value of the transform core index number is equal to 0, LFNST will not be used; and when the value of the transform core index number is greater than 0, LFNST will be used, and the index of the transform core is equal to the value of the transform core index number, or the index of the transform core is equal to the value of the transform core index number minus 1. Furthermore, the LFNST transform core used by the current block, i.e., the first transform core, can be further determined according to the transform core index number. Further, in an embodiment of the present application, a primary transform coefficient length parameter and a secondary transform coefficient length parameter may be configured. It is understandable that in the embodiment of the present application, it is also necessary to configure the core parameters. Among them, for configuring the core parameters, it is first necessary to configure the length of the input secondary transform coefficient vector for LFNST calculation (which can be represented by nonZeroSize), that is, configure the secondary transform coefficient length parameter, and also configure the length of the output primary transform coefficient vector (which can be represented by nLfnstOutSzie), that is, the primary transform coefficient length parameter. Furthermore, in an embodiment of the present application, when determining the first transformation parameter based on the first transformation kernel, the transformation matrix size is determined based on the primary transformation coefficient length parameter and / or the secondary transformation coefficient length parameter; thereby, the first transformation parameter can be determined based on the first transformation kernel and the transformation matrix size. It can be understood that, in the embodiment of the present application, the first transformation parameter may be a transformation matrix corresponding to the current block. It should be noted that, in the embodiment of the present application, compared with the final prediction value after subsequent data processing such as filtering, fusion, pixel division, etc., the initial prediction value directly obtained based on the prediction parameter, such as the first reference block directly indicated by BV, has more texture edge information. Therefore, in the process of mapping the intra-frame prediction mode based on the prediction value, using the initial prediction value can derive a more accurate gradient direction, prediction angle, and angle amplitude, so that a more matching traditional intra-frame prediction mode can be determined. Accordingly, in an embodiment of the present application, after determining the corresponding intra-frame prediction mode using the initial prediction value directly obtained by the prediction parameters, such as the first reference block directly indicated by BV, a more accurate LFNST transform kernel can be further obtained, thereby determining a more matching transform matrix. Exemplarily, in some embodiments, as shown in FIG. 12 , when deriving the transformation parameters, that is, the transformation matrix, the following steps may be specifically included: S5.1. Determine the transformation set. When determining the transform set, a selection can be made among four transform sets (set0, set1, set2, set3) according to the previously mapped intra prediction mode predModeIntra, so as to determine the corresponding transform set, that is, determine the corresponding LFNST transform kernel candidate set. S5.2. Determine the transformation matrix group. When determining the transformation matrix group, that is, determining the corresponding transformation kernel, it is necessary to select which of the two transformation matrices in the transformation set is determined according to the lfnst_idx transmitted from the encoding end. When lfnst_idx is 1, the first transformation matrix is ​​selected, and when lfnst_idx is 2, the second transformation matrix is ​​selected. S5.3. Select the transformation matrix size. When selecting the transformation matrix size, each transformation matrix group contains two sizes of basic transformation matrices, and the basic transformation matrix sizes used are 16x16 and 48x16. The selection is made according to nLfnstOutSzie. If nLfnstOutSzie is 16, a 16x16 basic transformation matrix is ​​selected. If nLfnstOutSzie is 48, a 48x16 basic transformation matrix is ​​selected. When nonZeroSize is 8, only the first 8 rows of the transformation matrix are used for matrix multiplication calculations. Step 1504: Determine a prediction block of the current block according to the first reference block of the current block. In an embodiment of the present application, after determining a first reference block of the current block according to a prediction parameter of the current block, a prediction block of the current block may be further determined according to the first reference block of the current block. Further, in an embodiment of the present application, when determining a prediction block of a current block according to a first reference block of the current block, the first reference block may be corrected according to a preset processing strategy to determine the prediction block of the current block. It should be noted that, in the embodiment of the present application, the preset processing strategy includes at least one of the following processing: fusion processing, filtering processing, pixel sub-processing, and pixel flipping processing. Exemplarily, in some embodiments, in the IntraTMP mode, when determining the prediction block of the current block based on the first reference block of the current block, a method of fusing corresponding positions of multiple BVs to obtain prediction values, a method of filtering the reference block corresponding to the BV and then copying it, and a method of pixel-by-pixel interpolating the corresponding reference block of the BV and then copying it can be used. For example, after obtaining the BV candidate list by template matching during the area search process, the first N items (eg, N=3) are selected for weighted fusion. This method may be referred to as the IntraTMP Fusion mode. Alternatively, after obtaining an optimal BV, multiple points are taken around the BV, and the corresponding predicted values ​​of the multiple points are weighted and fused to obtain the predicted value. This method can be called the IntraTMP FLM mode. Alternatively, after obtaining an optimal BV, the templates are sorted using sub-pixel accuracy, the optimal direction and accuracy are selected, and the prediction value is calculated using an interpolation filter. This method can be called the IntraTMP SubPel mode. Exemplarily, in some embodiments, in the IBC mode, in addition to the above basic copying method for obtaining the prediction value, there is also an IBC flipping mode, which requires the prediction area to be flipped horizontally or vertically as a method for obtaining the prediction value. For example, a syntax element is used to indicate whether to flip, and if flipped, whether to flip horizontally or vertically. According to the instruction of the syntax, the pixels of the reference area are rearranged in the horizontal or vertical direction in reverse to obtain the predicted pixel value of the coding block. Or use the template to build a model between the current block and the predicted area, and then process the predicted block according to the model to get the predicted value of the current block. For example, the IBC LIC mode, applied to IBC MEGRE and IBC ABVP, uses a linear equation to compensate for local illumination changes. Similar to the LIC of VVC's inter-frame prediction, the parameters of the linear equation can be expressed by a scaling parameter α and an offset parameter β, that is, α×p[x]+β to compensate for illumination changes, where p[x] is the reference sample pointed to by the position x of BV on the current image. The least squares method is used to derive the linear model parameters. In addition to the above prediction values, there is also the FIBC mode, which builds a linear model between the reference block template corresponding to the BV and the current block template to obtain the filter coefficients, and then applies this linear filter model to the current block to obtain the final prediction value. There is also a prediction mode similar to the IntraTMP Fusion mode, which fuses multiple IBC prediction blocks based on the relationship between multiple prediction blocks and the current block template. On the basis of the above-obtained prediction values, weighted prediction with other intra-frame prediction methods can also be implemented, and the result after weighted prediction is used as the final prediction result. The weighted prediction method includes the CIIP method of inter-frame and intra-frame hybrid prediction based on VVC, that is, weighted combination of the result obtained by the above prediction process and the prediction result obtained by the ordinary intra-frame directional prediction mode at each pixel position; it also includes the GPM method of inter-frame geometric prediction mode based on VVC, that is, based on a wedge division, the results obtained by different prediction modes are used in different wedge areas, and weighted mixing in accordance with certain rules is performed near the wedge division line. Exemplarily, in some embodiments, in the Intra TMP technology, different prediction methods are used according to different prediction modes. For example, in the Intra TMP Fusion technology, after obtaining the block vectors BV corresponding to the N candidate templates, N candidate reconstruction blocks are obtained through BV, and then the N candidate reconstruction blocks are weighted and fused to obtain the prediction block of the current coding block. Specifically, the final prediction value is generated through the following steps: obtaining N candidate reconstruction blocks, determining weighted fusion weights, and then generating a prediction value through weighted fusion. Among them, when obtaining N candidate reconstruction blocks, the block vector BV corresponding to the N candidate templates is obtained, and directly based on BV n Get the candidate reconstruction block RefBlock in the current image n , where BV n The horizontal offset is pX n , the vertical offset is pY n , where n=0, 1…, N-1. It is realized by simple translation copy. The specific operation is: for x = 0...nTbW-1, y = 0...nTbH-1, RefBlock n [x][y]=recSamples[x+pX n ][y+pY n ] Where recSamples represents the reconstructed pixels of the current frame. When determining the weighted fusion weight, after obtaining N candidate reconstruction blocks RefBlock, it is necessary to calculate the weight W of the weighted fusion of the N candidate reconstruction blocks. The weight may be a predefined value or a value adaptively calculated using a cost value, a pixel value, or the like. For example, in some embodiments, the Intra TMP Fusion technology uses the candidate template refT n The reconstruction value and the template to be predicted refpredT n The pixel value of θ minimizes the MSE and derives the weighted fusion weight. Specifically, the MSE minimization process takes the autocorrelation matrix of the first P matching reference samples refT, the cross-correlation vector of the first P matching reference samples refT and the adjacent template samples curT of the current coding block as input, and outputs the weight of the reconstructed block corresponding to each matching reference item. When the prediction value is generated by weighted fusion, the prediction block is calculated according to each candidate reconstructed block and its corresponding weighted fusion weight. Specifically, the value of each candidate reconstructed block and its corresponding weight are multiplied and accumulated to obtain the current prediction block (ie, weighted prediction). For x = 0 ... nTbW-1, y = 0 ... nTbH-1, the prediction value is calculated as shown in formula (2). x,y The spatial storage is the output prediction block of Intra TMP Fusion. Exemplarily, in some embodiments, in the IntraTMP FLM mode, the linear filter model is established using the best matching template obtained in the previous step and the current coding block template. It mainly includes the following two processes: determining the reconstruction area for calculating the filter coefficients, and calculating the filter coefficients. For example, as shown in FIG7, assuming that the number of filter taps nTap is 5, the shape of the filter is shown in the left figure, c0 to c4 are the tap coefficients of the filter, respectively, where the tap coefficient C0 corresponds to the current pixel Y to be predicted. pred [i][j] is the reconstructed pixel ref[i][j] at the corresponding position in the best matching block; the remaining points are the reconstructed pixels in the best matching reconstructed block that are adjacent to the current spatial position. The right point is the predicted pixel Y pred [i][j]. For each current pixel to be predicted (i, j), the pixel position in the filter template is defined as (k, l), then the corresponding reconstructed pixel in the best matching block during filtering is defined as ref[i+k][j+l], and each filter coefficient at the position (k, l) in the filter template is defined as c k,l The specific calculation process is shown in formula (3) to formula (6). Exemplarily, in some embodiments, in the Intra TMP SubPel mode, for the optimal BV, eight directions of 1 / 4, 1 / 2, 3 / 4, up, down, left, right, upper left, upper right, lower left, and lower right are traversed and sorted according to the template cost, and the reference block corresponding to the BV with the smallest template cost is calculated using an interpolation filter. For example, in some embodiments, in the IBC technology, in the IBC flip mode, the prediction area needs to be flipped horizontally or vertically as a method for obtaining the prediction value. For example, a syntax element is used to indicate whether to flip, and if flipped, whether to flip horizontally or vertically. According to the instruction of the syntax, the reference area pixels are rearranged in the horizontal or vertical direction in reverse order to obtain the predicted pixel value of the coding block. Exemplarily, in some embodiments, the IBC LIC mode uses a template to establish a model between the current block and the prediction area, and the prediction block is processed according to the model to obtain the prediction value of the current block. The IBC LIC mode, applied to IBC MEGRE and IBC ABVP, uses a linear equation to compensate for local illumination changes. Similar to the LIC of inter-frame prediction of VVC, the parameters of the linear equation can be expressed by a scaling parameter α and an offset parameter β, that is, α×p[x]+β to compensate for illumination changes, where p[x] is the reference sample pointed to by the position x of BV on the current picture. The least squares method is used to derive the linear model parameters. Exemplarily, in some embodiments, in the Filter IBC mode, a linear model is established using the template of the current block and the reference block template corresponding to BV, and the filter coefficient is obtained and used for the current block to obtain the final prediction value. Wherein, for each current pixel to be predicted (i, j), the pixel position in the filter template is defined as (k, l), then the corresponding reconstructed pixel in the best matching block during filtering is defined as ref[i+k][j+l], and each filter coefficient at the position (k, l) in the filter template is defined as c k,l The specific calculation process is shown in formula (3) to formula (5). On the basis of the above-obtained prediction values, weighted prediction with other intra-frame prediction methods can also be implemented, and the result after weighted prediction is used as the final prediction result. The weighted prediction method includes the CIIP method of inter-frame and intra-frame hybrid prediction based on VVC, that is, weighted combination of the result obtained by the above prediction process and the prediction result obtained by the ordinary intra-frame directional prediction mode at each pixel position; it also includes the GPM method of inter-frame geometric prediction mode based on VVC, that is, based on a wedge division, the results obtained by different prediction modes are used in different wedge areas, and weighted mixing in accordance with certain rules is performed near the wedge division line. An example of the operation process in the BV-based CIIP mode is as follows: the BV-based prediction value of the current block is weightedly fused with the prediction value of a certain intra-frame mode. The BV-based prediction part can be obtained by applying the conventional MEGRE, TM MEGRE, MBVD and ABVP modes. For the case where the BV-based prediction part is in different modes, different weights can be set. For example, when the BV-based prediction part mode is the conventional IBC MEGRE, TM MEGRE, MBVD mode, the weight ratio of BV-based prediction and intra-frame prediction is 13:3, and the intra-frame mode includes the TIMD mode of the current block and the intra-frame prediction mode at the candidate BV. If the second prediction mode in the intra-frame mode is the same as the first prediction mode, it is determined whether the first prediction mode is the PLANAR mode. If so, the second prediction mode is replaced with the horizontal prediction mode, otherwise the second prediction mode is replaced with the PLANAR mode. For the case where the BV-based prediction part is the ABVP mode, the weight ratio of BV-based prediction and intra-frame prediction is 1:1, and the first prediction mode with the TIMD mode as the intra-frame prediction mode is obtained. If the derived prediction mode is the horizontal prediction mode, the second prediction mode with PLANAR as the intra-frame prediction mode is obtained, otherwise, the second prediction mode with the horizontal prediction mode as the intra-frame prediction mode is obtained. An example of the operation process in the BV-based GPM mode: Conventional MEGRE and TM MEGRE can be applied to the BV-based prediction part. For example, a prediction mode with one partition being a BV-based mode and a mode with one partition being an INTRA mode can be implemented, and the intra prediction mode (IPM) candidate list is constructed using the same method as the inter GPM and the IPM candidate list size is predefined as 3. In a specific implementation, there are 48 geometric partitioning modes, which can be divided into two geometric partitioning mode sets, as shown in Table 2 and Table 3. When using BV-based GPM, a flag of the BV-based GPM (e.g., IBC-GPM) geometric partitioning mode set is transmitted to indicate whether the first or second geometric partitioning mode set is selected, and then the geometric partitioning mode index is transmitted; then the partition flag within the BV-based GPM (or IBC-GPM) frame is transmitted to indicate whether intra prediction is used for the first sub-partition. Among them, the intra prediction part needs to transmit the intra prediction mode index; the IBC prediction part needs to transmit the MEGRE index. Step 1505: Determine a reconstructed block corresponding to the current block based on the prediction block of the current block and the first transformation parameter. In an embodiment of the present application, after determining the first reference block and the prediction block of the current block according to the prediction parameters of the current block, a reconstructed block corresponding to the current block may be further determined based on the prediction block and the first transformation parameters of the current block. Further, in an embodiment of the present application, a first transform coefficient corresponding to the prediction residual may be determined. Further, in an embodiment of the present application, when determining a reconstructed block corresponding to the current block based on the prediction block of the current block and the first transformation parameter, the prediction residual can be determined based on the first transformation parameter and the first transformation coefficient; then, the reconstructed block corresponding to the current block can be determined based on the prediction block of the current block and the prediction residual. It should be noted that in an embodiment of the present application, when determining the prediction residual based on the first transformation parameter and the first transformation coefficient, a secondary inverse transformation can be performed based on the first transformation coefficient and the first transformation parameter to determine the second transformation coefficient; then a primary inverse transformation can be performed based on the second transformation coefficient to determine the prediction residual. It can be understood that, in the embodiment of the present application, the first transform coefficient may be an inverse secondary transform coefficient vector u[i], and the second transform coefficient may be an inverse primary transform coefficient vector v[j]. That is to say, in an embodiment of the present application, after determining the first transformation parameter, that is, the transformation matrix, the inverse secondary transformation coefficient vector u[i], i=0…nonZeroSize-1 can be used as input, and the transformation matrix is ​​used to multiply it to obtain the inverse first-transform coefficient vector v[j], j=0…nLfnstOutSzie-1. Then, the one-dimensional inverse first-transform coefficient vector v[j], j=0…nLfnstOutSzie-1 is used to construct the two-dimensional inverse first-transform coefficient matrix d'[x][y] of the current transform block, x=0…nLfnstSize-1, y=0…nLfnstSize-1. Among them, according to different intra-frame prediction modes, there are two filling scanning orders: horizontal and vertical scanning modes. Then, the inverse first-transform coefficient matrix is ​​used to perform an inverse transform to generate a prediction residual. Further, in the embodiment of the present application, the secondary transformation coefficient vector u[i] is taken as input, and the transformation matrix is ​​used to multiply it to obtain the primary transformation coefficient vector v[j], where i=0, 1, ..., nonZeroSize-1, j=0, 1, ..., nLfnstOutSize-1. Assuming that the transformation matrix obtained in the previous step is lowFreqTransMatrix, the specific calculation process of v[j] is as follows: Among them, Clip3 is a clamping operation, which can limit the value of the coefficient between the following two numbers, as shown below: CoeffMin = -(1 < < 15) (11) CoeffMax = (1 < < 15) - 1 (12) Then, after the above matrix calculation, the transformation processing of the transformation coefficients can be realized. Here, for 4×4 LFNST, 16 or 8 coefficients will be input and 16 coefficients will be output; and for 8×8 LFNST, 16 or 8 coefficients will be input and 48 coefficients will be output to realize the LFNST transformation processing of the transformation coefficients. Further, in an embodiment of the present application, after determining the prediction residual corresponding to the current block and the prediction block of the current block, the image reconstruction process of the specified color component specified in the decoding specification can be called. In order to realize the reconstruction operation, the prediction signal and the residual signal need to be added for the mode with residual. In summary, through the encoding method proposed in the above steps 1501 to 1505, the initial prediction value based on BV is selected, that is, the first reference block directly indicated by BV is used to directly derive the prediction direction, thereby guiding the selection of the transform set related to directionality. On the one hand, compared with the final prediction value after subsequent data processing processes such as filtering, fusion, and pixel division, the initial prediction value has richer texture edge information. Therefore, using the initial prediction value can derive more accurate gradient direction, prediction angle, and angle amplitude, so that a more matching traditional intra-frame prediction mode can be determined, and a more accurate LFNST transform kernel can be obtained, and a more matching transform matrix can be determined, thereby effectively improving the encoding and decoding performance. On the other hand, after determining the first reference block directly indicated by BV, the generation of the prediction block, as well as the generation of transform parameters and residuals, can be performed in parallel, shortening the length of the encoding and decoding key path, solving the problem of high complexity, and improving the encoding and decoding efficiency, while facilitating hardware design implementation. Furthermore, in an embodiment of the present application, after determining the first reference block corresponding to the current block, a prediction block of the current block can be determined based on the first reference block of the current block; then, a second transformation parameter corresponding to the current block can be determined based on the prediction block of the current block; and based on the prediction block of the current block and the second transformation parameter corresponding to the current block, a reconstructed block corresponding to the current block can be determined. It should be noted that, in the embodiment of the present application, the transformation parameter of the current block, such as the second transformation parameter, may include an index reference (such as LFNST) for indicating the transformation matrix used, or may be the transformation matrix itself. Furthermore, in an embodiment of the present application, when it is determined that the first transformation parameter is used, the value of the first identification information is determined to be a first value; when it is determined that the second transformation parameter is used, the value of the first identification information is determined to be a second value; and the first identification information is written into the bitstream. That is to say, in the embodiment of the present application, it can be determined whether to use the first transformation parameter determined based on the first reference block or the second transformation parameter determined based on the prediction block according to the first identification information transmitted in the code stream. It can be understood that in the embodiment of the present application, the initial prediction value, that is, the first transform parameter produced by the first reference block of the current block, and the final prediction value, that is, the second transform parameter produced by the prediction block of the current block can be mixed, wherein the prediction direction (or gradient direction) derived from which data can be selected can be determined by certain conditions. For example, the decoding end can determine whether to use the first transform parameter or the second transform parameter based on the first identification information determined by the decoded code stream. It should also be noted that in the embodiment of the present application, the first value is different from the second value, and the first value and the second value can be in parameter form or in digital form. Specifically, the first prediction mode identification information and the second prediction mode identification information can be parameters written in the profile, or can be the value of a flag, which is not specifically limited here. In addition, for the first value and the second value, 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. Among them, in the embodiment of the present application, the first value is set to 0 and the second value is set to 1, but it is not specifically limited. Exemplarily, in some embodiments, at the encoding end, it can be determined whether to directly adopt the prediction direction derived from one of the prediction data based on the consistency between the prediction direction derived from the initial prediction value and the prediction direction derived from the final prediction value, or to use the first identification information in the bitstream to indicate which prediction direction to use. Further, in an embodiment of the present application, a first prediction histogram corresponding to the first reference block and a second prediction histogram corresponding to the prediction block may be determined respectively. Accordingly, in an embodiment of the present application, a first gradient direction and a second gradient direction in a first prediction histogram may be determined; when an amplitude difference between the first gradient direction and the second gradient direction is less than or equal to a preset threshold, a reconstructed block corresponding to the current block is determined based on the first transformation parameter; and when an amplitude difference between the first gradient direction and the second gradient direction is greater than the preset threshold, a reconstructed block corresponding to the current block is determined based on the second transformation parameter. It should be noted that, in an embodiment of the present application, the first gradient direction may be the gradient direction with the highest (largest) amplitude in the first prediction histogram, and the second gradient direction may be the gradient direction with the second highest amplitude in the first prediction histogram. Accordingly, in an embodiment of the present application, the first gradient direction and the second gradient direction in the second prediction histogram can be determined; when the amplitude difference between the first gradient direction and the second gradient direction is less than or equal to a preset threshold, the reconstructed block corresponding to the current block is determined based on the first transformation parameter; when the amplitude difference between the first gradient direction and the second gradient direction is greater than the preset threshold, the reconstructed block corresponding to the current block is determined based on the second transformation parameter. It should be noted that, in an embodiment of the present application, the first gradient direction may be the gradient direction with the highest (largest) amplitude in the second prediction histogram, and the second gradient direction may be the gradient direction with the second highest amplitude in the second prediction histogram. It is understandable that in the embodiment of the present application, the initial prediction value, that is, the first transformation parameter produced by the first reference block of the current block, and the final prediction value, that is, the second transformation parameter produced by the prediction block of the current block, can be mixed, wherein the judgment can be made according to the mode histogram (the first prediction histogram or the second prediction histogram). If the highest amplitude and the second highest amplitude differ greatly, for example, exceeding a preset threshold, that is, it can be considered that there is a peak value, then the prediction value before data processing (initial prediction value) is used for direction deduction, otherwise the prediction value after data processing (final prediction value) is used for direction deduction. Further, in an embodiment of the present application, a template direction corresponding to the first template can be determined; then a first correlation parameter between the gradient direction with the largest amplitude in the first prediction histogram and the template direction is determined; and at the same time, a second correlation parameter between the gradient direction with the largest amplitude in the second prediction histogram and the template direction is determined; when the first correlation parameter is greater than or equal to the second correlation parameter, a reconstructed block corresponding to the current block is determined based on the first transformation parameter; when the first correlation parameter is less than the second correlation parameter, a reconstructed block corresponding to the current block is determined based on the second transformation parameter. It can be understood that in an embodiment of the present application, an initial prediction value, that is, a first transformation parameter produced by a first reference block of the current block, and a final prediction value, that is, a second transformation parameter produced by a prediction block of the current block, can be used in combination, wherein the direction of the template (the template direction of the first template) can be used as a criterion to compare the gradient directions derived from the reference block before data processing (initial prediction value) and the prediction block after data processing (final prediction value), and select the gradient direction close to the template direction as the gradient direction used last, that is, select the transformation matrix corresponding to the prediction data close to the template direction for subsequent transformation processing. Further, in an embodiment of the present application, when determining the first transformation parameter, the horizontal gradient and the vertical gradient corresponding to the first reference block may be determined based on a portion of pixels or all pixels in the first reference block. Further, in an embodiment of the present application, when determining the second transformation parameter, the horizontal gradient and the vertical gradient corresponding to the prediction block may be determined according to a part of the pixels or all of the pixels in the prediction block. That is to say, in the embodiment of the present application, all pixels or part of pixel values ​​may be selected for direction derivation. For example, the CCLM point selection method may be analogous to selecting four points on the upper side and the left side for direction derivation. Furthermore, in an embodiment of the present application, the first reference block of the current block can be corrected according to the first processing strategy to determine the first prediction block corresponding to the first reference block; and then the first prediction block can be corrected according to the second processing strategy to determine the prediction block of the current block. Correspondingly, in an embodiment of the present application, the third transformation parameter corresponding to the current block can also be determined according to the first prediction block; and then the reconstructed block corresponding to the current block is determined based on the prediction block of the current block and the third transformation parameter corresponding to the current block. It should be noted that, in the embodiment of the present application, the transformation parameter of the current block, such as the third transformation parameter, may include an index reference (such as LFNST) for indicating the transformation matrix used, or may be the transformation matrix itself. It is understandable that in the embodiment of the present application, if multiple steps are required between the final prediction value and the initial prediction value, the intermediate prediction value (i.e., the first prediction block) in the middle of the multiple steps can also be selected as the input for determining the prediction direction. For example, when the prediction value based on BV is first filtered and then fused to obtain the final prediction value, the filtered intermediate prediction information can be used as input to determine the corresponding transformation matrix, such as the third transformation parameter. It should be noted that, in the embodiment of the present application, the first processing strategy and the second processing strategy may include at least one of the following processing: fusion processing, filtering processing, pixel sub-processing, and pixel flipping processing. It can be seen that the encoding method proposed in the embodiment of the present application is a method for obtaining reconstruction values ​​based on the BV prediction mode. Focusing on the generation of the prediction value and the residual secondary transformation selection method dependent on the prediction value, the initial prediction value obtained by BV can be derived based on the direction of the DIMD technology, and the transformation selection matrix related to the direction can be inversely transformed to generate the residual. On the one hand, compared with the final prediction value after filtering, fusion, pixel division and other subsequent data processing processes, the initial prediction value has richer texture edge information. Therefore, the use of the initial prediction value can derive a more accurate gradient direction, prediction angle and angle amplitude, so that a more matching traditional intra-frame prediction mode can be determined, and a more accurate LFNST transformation kernel can be obtained. And a more matching transformation matrix is ​​determined, which can effectively improve the encoding and decoding performance. On the other hand, after determining the first reference block directly indicated by BV, the generation of the prediction block, as well as the generation of transformation parameters and residuals can be performed in parallel, shortening the length of the key path of encoding and decoding, solving the problem of high complexity, and improving the efficiency of encoding and decoding, while facilitating hardware design and implementation. Exemplarily, in some embodiments, as shown in FIG13 , during the process of reconstructing pixel values, the process may mainly include the following steps: S1, determining a block vector; S2, generating an initial prediction value; S3, generating a final prediction value; S4, intra-frame prediction mode mapping; S5, determining a transform block matrix; S6, secondary transform inverse transform; S7, primary transform inverse transform; and S8, generating a reconstructed value. Among them, for the intra-frame prediction mode mapping step, the input is no longer the final prediction value corresponding to the current block, but the initial prediction value corresponding to the current block, which is directly indicated by BV, that is, the first reference block of the current block. It should be noted that, in the embodiment of the present application, compared with the final prediction value after subsequent data processing such as filtering, fusion, pixel division, etc., the initial prediction value directly obtained based on the prediction parameter, such as the first reference block directly indicated by BV, has more texture edge information. This is because the data processing such as filtering, fusion, pixel division, etc. performed on the basis of the initial prediction value, such as low-pass filtering, is equivalent to a smoothing operation, which causes the final prediction value obtained after processing to lose some texture edge information. Accordingly, in an embodiment of the present application, in the process of mapping the intra-frame prediction mode based on the prediction value, since the initial prediction value has richer texture edge information, compared with using the final prediction value to map the intra-frame prediction mode, using the initial prediction value can derive a more accurate gradient direction, prediction angle and angle amplitude, thereby determining a more matching traditional intra-frame prediction mode. Accordingly, in an embodiment of the present application, after determining the corresponding intra-frame prediction mode using the initial prediction value directly obtained by the prediction parameters, such as the first reference block directly indicated by BV, a more accurate LFNST transform kernel can be further obtained, thereby determining a more matching transform matrix, thereby effectively improving the encoding and decoding performance. Exemplarily, in some embodiments, as shown in FIG. 14 , during the process of reconstructing pixel values, the process may mainly include the following steps: S1, determining a block vector; S2, generating an initial prediction value; S3, generating a final prediction value; S4, intra-frame prediction mode mapping; S5, determining a transform block matrix; S9, inverse transform; and S8, generating a reconstructed value. Among them, for the intra-frame prediction mode mapping step, the input is no longer the final prediction value corresponding to the current block, but the initial prediction value corresponding to the current block, which is directly indicated by BV, that is, the first reference block of the current block. It should be noted that, in the embodiment of the present application, compared with the final prediction value after subsequent data processing such as filtering, fusion, pixel division, etc., the initial prediction value directly obtained based on the prediction parameter, such as the first reference block directly indicated by BV, has more texture edge information. This is because the data processing such as filtering, fusion, pixel division, etc. performed on the basis of the initial prediction value, such as low-pass filtering, is equivalent to a smoothing operation, which causes the final prediction value obtained after processing to lose some texture edge information. Correspondingly, in an embodiment of the present application, when executing S9 and the inverse transformation, other transformation methods other than LFNST may be used, for example, when a non-separable primary transform (NSPT) is used, the transformation matrix may also be determined using the initial prediction value corresponding to the current block and directly indicated by BV. It should be noted that, in the embodiments of the present application, in the above scheme, the prediction parameter corresponding to the current block takes the block vector BV as an example, and the transformation method takes LFNST as an example to exemplify the encoding method proposed in the embodiments of the present application, but does not limit the prediction parameters and the transformation method, that is, the scheme proposed in the embodiments of the present application can also be applied to other prediction parameters, transformation parameters and transformation methods. The embodiment of the present application provides a coding method, wherein the encoder determines the prediction parameters corresponding to the current block; determines the first reference block of the current block according to the prediction parameters of the current block; determines the first transformation parameters of the current block according to the first reference block of the current block; determines the prediction block of the current block according to the first reference block of the current block; and determines the reconstruction block corresponding to the current block based on the prediction block of the current block and the first transformation parameters. That is, in the embodiment of the present application, after determining the first reference block of the current block based on the prediction parameters, the first reference block that has not been processed by data can be directly used to determine the transformation parameters of the current block, and then the determined transformation parameters are used in combination with the prediction block of the current block obtained after data processing of the first reference block to complete the reconstruction of the current block. Among them, the data processing process will lose the texture edge information of the prediction block to a certain extent, so the initial prediction value before data processing (i.e., the first reference block) has richer texture edge information than the final prediction value after data processing (i.e., the prediction block), and the first reference block is used to derive the prediction direction, which can obtain more accurate transformation parameters, thereby effectively improving the encoding and decoding performance. At the same time, after determining the first reference block directly indicated by the prediction parameter, the generation of the prediction block, the generation of the transform parameters and the residual can be performed in parallel, which shortens the length of the encoding and decoding key path, solves the problem of high complexity, and thus improves the encoding and decoding efficiency. It can be seen that the encoding and decoding method proposed in the embodiment of the present application can improve the encoding and decoding efficiency and performance In yet another embodiment of the present application, based on the same inventive concept as the above-mentioned embodiment, FIG. 16 is a schematic diagram of a composition structure of an encoder proposed in an embodiment of the present application. As shown in FIG. 16 , the encoder 100 may include: a first determining unit 111; wherein, The first determination unit 111 is configured to determine a prediction parameter corresponding to a current block; determine a first reference block of the current block according to the prediction parameter of the current block; determine a first transformation parameter of the current block according to the first reference block of the current block; determine a prediction block of the current block according to the first reference block of the current block; and determine a reconstructed block corresponding to the current block based on the prediction block of the current block and the first transformation parameter. It should be noted that, in the embodiment of the present application, the encoder 100 can also be regarded as a data processing mode (or "entropy encoder"), which is used to encode the values ​​of the grammatical elements to be encoded. It is understandable that in the embodiments of the present application, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course, it may be a module, or it may be non-modular. Moreover, the components in the present embodiment may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional module. If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes. Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 100. The computer-readable storage medium stores a computer program. When the computer program is executed by the first processor, it implements the encoding method described in any one of the aforementioned embodiments. Based on the composition of the above-mentioned encoder 100 and the computer-readable storage medium, Figure 17 is a second schematic diagram of the composition structure of the encoder proposed in an embodiment of the present application. As shown in Figure 17, the encoder 100 may include: a first memory 121 and a first processor 122, a first communication interface 123 and a first bus system 124. The first memory 121, the first processor 122, and the first communication interface 123 are coupled together through the first bus system 124. It can be understood that the first bus system 124 is used to realize the connection and communication between these components. In addition to the data bus, the first bus system 124 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 124 in Figure 10. Among them, The first communication interface 123 is used for receiving and sending signals during the process of sending and receiving information with other external network elements; The first memory 121 is used to store a computer program that can be run on the first processor; The first processor 122 is used to determine the prediction parameters corresponding to the current block when running the computer program; determine the first reference block of the current block according to the prediction parameters of the current block; determine the first transformation parameters of the current block according to the first reference block of the current block; determine the prediction block of the current block according to the first reference block of the current block; and determine the reconstructed block corresponding to the current block based on the prediction block of the current block and the first transformation parameters. It can be understood that the first memory 121 in the embodiment 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 (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM). The first memory 121 of the system and method described in the present application is intended to include but is not limited to these and any other suitable types of memory. The first processor 122 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 122. The above-mentioned first processor 122 can be a general-purpose 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 devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the first memory 121, and the first processor 122 reads the information in the first memory 121 and completes the steps of the above method in combination with its hardware. It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units or combinations thereof for performing functions described in the present application. For software implementation, the technology described in the present application can be implemented by the module (such as process, function, etc.) performing the functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in a processor or outside a processor. Optionally, as another embodiment, the first processor 122 is further configured to execute the method described in any one of the aforementioned embodiments when running the computer program. The present embodiment provides an encoder, which determines the prediction parameters corresponding to the current block; determines the first reference block of the current block according to the prediction parameters of the current block; determines the first transformation parameters of the current block according to the first reference block of the current block; determines the prediction block of the current block according to the first reference block of the current block; and determines the reconstruction block corresponding to the current block based on the prediction block of the current block and the first transformation parameters. That is, in the embodiment of the present application, after determining the first reference block of the current block based on the prediction parameters, the first reference block that has not been processed by data can be directly used to determine the transformation parameters of the current block, and then the determined transformation parameters are combined with the prediction block of the current block obtained after data processing of the first reference block to complete the reconstruction of the current block. Among them, the data processing process will lose the texture edge information of the prediction block to a certain extent, so the initial prediction value before data processing (i.e., the first reference block) has richer texture edge information than the final prediction value after data processing (i.e., the prediction block), and the first reference block is used to derive the prediction direction, which can obtain more accurate transformation parameters, thereby effectively improving the encoding and decoding performance. At the same time, after determining the first reference block directly indicated by the prediction parameter, the generation of the prediction block, and the generation of the transform parameters and the residual can be performed in parallel, which shortens the length of the encoding and decoding key path, solves the problem of high complexity, and thus can improve the encoding and decoding efficiency. It can be seen that the encoding and decoding method proposed in the embodiment of the present application can improve the encoding and decoding efficiency and performance. In yet another embodiment of the present application, based on the same inventive concept as the above-mentioned embodiment, FIG. 18 is a schematic diagram of a structure of a decoder proposed in an embodiment of the present application. As shown in FIG. 18 , the decoder 200 may include: a second determining unit 211; wherein, The second determination unit 211 is configured to determine a prediction parameter corresponding to a current block; determine a first reference block of the current block according to the prediction parameter of the current block; determine a first transformation parameter of the current block according to the first reference block of the current block; determine a prediction block of the current block according to the first reference block of the current block; and determine a reconstructed block corresponding to the current block based on the prediction block of the current block and the first transformation parameter. It should be noted that, in the embodiment of the present application, the decoder 200 can also be regarded as a data processing mode (or "entropy decoder"), which is used to decode the values ​​of the syntax elements to be decoded. It can be understood that in this embodiment, a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module. If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium, which is applied to the decoder 200, and the computer-readable storage medium stores a computer program. When the computer program is executed by the second processor, the method described in any one of the above embodiments is implemented. Based on the composition of the above-mentioned decoder 200 and the computer-readable storage medium, Figure 19 is a second schematic diagram of the composition structure of the decoder proposed in an embodiment of the present application. As shown in Figure 19, the decoder 200 may include: a second memory 221 and a second processor 222, a second communication interface 223 and a second bus system 224. The second memory 221 and the second processor 222, and the second communication interface 223 are coupled together through the second bus system 224. It can be understood that the second bus system 224 is used to realize the connection and communication between these components. In addition to the data bus, the second bus system 224 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are marked as the second bus system 224 in Figure 12. Among them, The second communication interface 223 is used for receiving and sending signals during the process of sending and receiving information with other external network elements; The second memory 221 is used to store a computer program that can be run on the second processor; The second processor 222 is used to determine the prediction parameters corresponding to the current block when running the computer program; determine the first reference block of the current block according to the prediction parameters of the current block; determine the first transformation parameters of the current block according to the first reference block of the current block; determine the prediction block of the current block according to the first reference block of the current block; and determine the reconstructed block corresponding to the current block based on the prediction block of the current block and the first transformation parameters. It can be understood that the second memory 221 in the embodiment 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 (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM). The second memory 221 of the system and method described in the present application is intended to include but is not limited to these and any other suitable types of memory. The second processor 222 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the second processor 222. The above-mentioned second processor 222 can be a general-purpose 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 devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the second memory 221, and the second processor 222 reads the information in the second memory 221 and completes the steps of the above method in combination with its hardware. It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units or combinations thereof for performing functions described in the present application. For software implementation, the technology described in the present application can be implemented by the module (such as process, function, etc.) performing the functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in a processor or outside a processor. Optionally, as another embodiment, the second processor 222 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program. The present embodiment provides a decoder, which determines the prediction parameters corresponding to the current block; determines the first reference block of the current block according to the prediction parameters of the current block; determines the first transformation parameters of the current block according to the first reference block of the current block; determines the prediction block of the current block according to the first reference block of the current block; and determines the reconstruction block corresponding to the current block based on the prediction block of the current block and the first transformation parameters. That is, in the embodiment of the present application, after determining the first reference block of the current block based on the prediction parameters, the first reference block that has not been processed by data can be directly used to determine the transformation parameters of the current block, and then the determined transformation parameters are combined with the prediction block of the current block obtained after data processing of the first reference block to complete the reconstruction of the current block. Among them, the data processing process will lose the texture edge information of the prediction block to a certain extent, so the initial prediction value before data processing (i.e., the first reference block) has richer texture edge information than the final prediction value after data processing (i.e., the prediction block), and the first reference block is used to derive the prediction direction, which can obtain more accurate transformation parameters, thereby effectively improving the encoding and decoding performance. At the same time, after determining the first reference block directly indicated by the prediction parameter, the generation of the prediction block, and the generation of the transform parameters and the residual can be performed in parallel, which shortens the length of the encoding and decoding key path, solves the problem of high complexity, and thus can improve the encoding and decoding efficiency. It can be seen that the encoding and decoding method proposed in the embodiment of the present application can improve the encoding and decoding efficiency and performance. Furthermore, an embodiment of the present application also proposes a code stream, wherein the code stream is generated by bit encoding based on the information to be encoded; wherein the information to be encoded includes at least: prediction mode identification information corresponding to the current block, first identification information, first transform coefficient corresponding to the prediction residual, and transform core index number. It should be noted that, in this application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments. The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments. The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments. The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments. The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims. Industrial Applicability The embodiment of the present application proposes a coding and decoding method, a code stream, an encoder, a decoder and a storage medium, wherein the encoder and decoder determine the prediction parameters corresponding to the current block; determine the first reference block of the current block according to the prediction parameters of the current block; determine the first transformation parameters of the current block according to the first reference block of the current block; determine the prediction block of the current block according to the first reference block of the current block; and determine the reconstruction block corresponding to the current block based on the prediction block of the current block and the first transformation parameters. That is, in the embodiment of the present application, after determining the first reference block of the current block based on the prediction parameters, the first reference block that has not been processed by data can be directly used to determine the transformation parameters of the current block, and then the determined transformation parameters can be used in combination with the prediction block of the current block obtained after data processing of the first reference block to complete the reconstruction of the current block. Among them, the data processing process will lose the texture edge information of the prediction block to a certain extent, so the initial prediction value before data processing (i.e., the first reference block) has richer texture edge information than the final prediction value after data processing (i.e., the prediction block), and the first reference block is used to derive the prediction direction, which can obtain more accurate transformation parameters, thereby effectively improving the coding and decoding performance. At the same time, after determining the first reference block directly indicated by the prediction parameter, the generation of the prediction block, and the generation of the transform parameters and the residual can be performed in parallel, which shortens the length of the encoding and decoding key path, solves the problem of high complexity, and thus can improve the encoding and decoding efficiency. It can be seen that the encoding and decoding method proposed in the embodiment of the present application can improve the encoding and decoding efficiency and performance.

Claims

1. A decoding method, applied to a decoder, the method comprising: Determine the prediction parameters corresponding to the current block; Determine a first reference block of the current block according to a prediction parameter of the current block; Determining a first transformation parameter of the current block according to a first reference block of the current block; Determine a prediction block of the current block according to a first reference block of the current block; A reconstructed block corresponding to the current block is determined based on the prediction block of the current block and the first transformation parameter.

2. The method according to claim 1, wherein: The prediction parameters include a block vector of the current block.

3. The method according to claim 2, wherein: The first reference block and the current block are in the same image; Accordingly, The block vector represents a position offset between the current block and the first reference block.

4. The method according to claim 1, wherein: The prediction parameters include a motion vector of the current block and a reference image index.

5. The method according to claim 4, wherein: The first reference block is located in a reference image indicated by the reference image index; Accordingly, The motion vector represents a position offset between the current block and the first reference block.

6. The method according to claim 1, wherein: The determining a first transformation parameter of the current block according to a first reference block of the current block comprises: determining a statistical characteristic parameter of the first reference block; The first transformation parameter is determined according to the statistical characteristic parameter.

7. The method according to claim 6, wherein: The statistical characteristic parameters include a covariance matrix.

8. The method according to claim 1, wherein: The determining a first transformation parameter of the current block according to a first reference block of the current block comprises: Determine, according to a first reference block of the current block, intra mode information corresponding to the current block; The first transformation parameter is determined according to the intra mode information.

9. The method according to claim 8, wherein: The determining, according to the first reference block of the current block, the intra mode information corresponding to the current block includes: Determine a horizontal gradient and a vertical gradient corresponding to a first reference block of the current block; Intra-frame mode information corresponding to the current block is determined according to the horizontal gradient and the vertical gradient.

10. The method according to claim 9, wherein: The determining the horizontal gradient and the vertical gradient corresponding to the first reference block of the current block includes: Based on a preset operator, the horizontal gradient and the vertical gradient corresponding to the first reference block are determined.

11. The method according to claim 9, wherein: The determining, according to the horizontal gradient and the vertical gradient, the intra-frame mode information corresponding to the current block includes: Determining a first prediction histogram according to the horizontal gradient and the vertical gradient; In a case where there is no non-zero amplitude in the first prediction histogram, determining that the intra mode information corresponding to the current block is a PLANAR mode; In a case where there is a non-zero amplitude in the first prediction histogram, the intra-frame mode information corresponding to the current block is determined according to the gradient direction with the largest amplitude in the first prediction histogram.

12. The method according to claim 9, wherein: The determining the first transformation parameter according to the intra-frame mode information includes: Determine a transform core candidate set according to the intra-frame mode information corresponding to the current block; wherein the transform core candidate set includes any number of transform cores; Determine a first transform kernel in the transform kernel candidate set; The first transform parameter is determined according to the first transform kernel.

13. The method according to claim 12, wherein: The transform kernel candidate set includes any one of a LFNST transform kernel candidate set, a NSPT transform kernel candidate set, and a transform kernel candidate set determined based on a prediction direction.

14. The method according to claim 13, wherein: The determining of the LFNST transform kernel candidate set according to the intra mode information corresponding to the current block includes: According to the mapping relationship between the intra mode and the transform kernel candidate set, the transform kernel candidate set corresponding to the intra mode information is determined.

15. The method according to claim 13, wherein: The method further comprises: Decode the code stream and determine the transform core index number; The first transform core is determined in the transform core candidate set according to the transform core index number to determine the first transform parameter.

16. The method according to claim 13, wherein: The method further comprises: A matrix size corresponding to the first transformation parameter is determined based on the size of the current block.

17. The method according to claim 1, wherein: The determining a prediction block of the current block according to the first reference block of the current block comprises: The first reference block is corrected according to a preset processing strategy to determine a prediction block of the current block.

18. The method according to claim 17, wherein: The preset processing strategy includes at least one of the following processing: fusion processing, filtering processing, pixel sub-processing, and pixel flipping processing.

19. The method according to any one of claims 1 to 18, wherein: The method further comprises: The code stream is decoded to determine a first transform coefficient corresponding to the prediction residual.

20. The method according to claim 19, wherein: The determining, based on the prediction block of the current block and the first transformation parameter, a reconstructed block corresponding to the current block comprises: determining the prediction residual based on the first transform parameter and the first transform coefficient; A reconstructed block corresponding to the current block is determined according to the predicted block of the current block and the prediction residual.

21. The method according to claim 20, wherein: The determining the prediction residual based on the first transform parameter and the first transform coefficient comprises: Perform a secondary inverse transform according to the first transform coefficient and the first transform parameter to determine a second transform coefficient; An inverse transform is performed on the second transform coefficient to determine the prediction residual.

22. The method according to claim 2, wherein: The method further comprises: Determine a prediction block of the current block according to a first reference block of the current block; Determine a second transformation parameter corresponding to the current block according to the prediction block of the current block; A reconstructed block corresponding to the current block is determined based on the prediction block of the current block and a second transformation parameter corresponding to the current block.

23. The method according to claim 22, wherein: The method further comprises: Decoding the code stream to determine the first identification information; When the value of the first identification information is a first value, determining to use the first transformation parameter; When the value of the first identification information is the second value, it is determined to use the second transformation parameter.

24. The method according to claim 22, wherein: The method further comprises: A first prediction histogram corresponding to the first reference block and a second prediction histogram corresponding to the prediction block are determined.

25. The method according to claim 24, wherein: The method further comprises: Determining a first gradient direction and a second gradient direction in the first prediction histogram; When the amplitude difference between the first gradient direction and the second gradient direction is less than or equal to a preset threshold, determining a reconstructed block corresponding to the current block based on the first transformation parameter; When the amplitude difference between the first gradient direction and the second gradient direction is greater than a preset threshold, a reconstructed block corresponding to the current block is determined based on the second transformation parameter.

26. The method according to claim 24, wherein: The method further comprises: Determining a first gradient direction and a second gradient direction in the second prediction histogram; When the amplitude difference between the first gradient direction and the second gradient direction is less than or equal to a preset threshold, determining a reconstructed block corresponding to the current block based on the first transformation parameter; When the amplitude difference between the first gradient direction and the second gradient direction is greater than a preset threshold, a reconstructed block corresponding to the current block is determined based on the second transformation parameter.

27. The method according to claim 9, wherein: The method further comprises: The horizontal gradient and the vertical gradient are determined according to a portion of pixels or all pixels in the first reference block.

28. The method of claim 18, wherein: The method further comprises: Performing correction processing on the first reference block of the current block according to a first processing strategy to determine a first prediction block corresponding to the first reference block; The first prediction block is modified according to a second processing strategy to determine a prediction block of the current block.

29. The method according to claim 28, wherein: The method further comprises: Determine a third transformation parameter corresponding to the current block according to the first prediction block; A reconstructed block corresponding to the current block is determined based on the prediction block of the current block and a third transformation parameter corresponding to the current block.

30. The method of claim 24, wherein: The method further comprises: Determine a first template corresponding to the current block, and determine a preset search area; Search is performed in the preset search area to determine the block vector of the current block.

31. The method of claim 24, wherein: The method further comprises: Determine a first template corresponding to the current block, and determine a preset search area; Searching in the preset search area to construct a block vector candidate list of the current block; A block vector of the current block is determined according to the block vector candidate list.

32. The method of claim 24, wherein: The method further comprises: Determine a block vector of an adjacent block corresponding to the current block; Constructing a block vector candidate list of the current block according to the block vectors of the adjacent blocks; A block vector of the current block is determined according to the block vector candidate list.

33. The method according to any one of claims 30 to 32, wherein: The method further comprises: Determining a template direction corresponding to the first template; Determine a first correlation parameter between the gradient direction with the largest magnitude in the first prediction histogram and the template direction; Determine a second correlation parameter between the gradient direction with the largest magnitude in the second prediction histogram and the template direction; In a case where the first relevant parameter is greater than or equal to the second relevant parameter, determining a reconstructed block corresponding to the current block based on the first transformation parameter; In a case where the first relevant parameter is less than the second relevant parameter, a reconstructed block corresponding to the current block is determined based on the second transformation parameter.

34. The method according to any one of claims 1 to 33, wherein: The method further comprises: Decoding the bitstream to determine the prediction mode identification information corresponding to the current block; In a case where the prediction mode identification information indicates that the current block uses a prediction mode based on the prediction parameters, the prediction parameter determination process is executed.

35. A coding method, using a coder, the method comprising: Determine the prediction parameters corresponding to the current block; Determine a first reference block of the current block according to a prediction parameter of the current block; Determining a first transformation parameter of the current block according to a first reference block of the current block; Determine a prediction block of the current block according to a first reference block of the current block; A reconstructed block corresponding to the current block is determined based on the prediction block of the current block and the first transformation parameter.

36. The method of claim 35, wherein: The prediction parameters include a block vector of the current block.

37. The method of claim 36, wherein: The first reference block and the current block are in the same image; Accordingly, The block vector represents a position offset between the current block and the first reference block.

38. The method of claim 35, wherein: The prediction parameters include a motion vector of the current block and a reference image index.

39. The method of claim 38, wherein: The first reference block is located in a reference image indicated by the reference image index; Accordingly, The motion vector represents a position offset between the current block and the first reference block.

40. The method of claim 35, wherein: The determining a first transformation parameter of the current block according to a first reference block of the current block comprises: determining a statistical characteristic parameter of the first reference block; The first transformation parameter is determined according to the statistical characteristic parameter.

41. The method of claim 40, wherein: The statistical characteristic parameters include a covariance matrix.

42. The method of claim 35, wherein: The determining a first transformation parameter of the current block according to a first reference block of the current block comprises: Determine, according to a first reference block of the current block, intra mode information corresponding to the current block; The first transformation parameter is determined according to the intra mode information.

43. The method of claim 42, wherein: The determining, according to the first reference block of the current block, the intra mode information corresponding to the current block includes: Determine a horizontal gradient and a vertical gradient corresponding to a first reference block of the current block; Intra-frame mode information corresponding to the current block is determined according to the horizontal gradient and the vertical gradient.

44. The method of claim 43, wherein: The determining the horizontal gradient and the vertical gradient corresponding to the first reference block of the current block includes: Based on a preset operator, the horizontal gradient and the vertical gradient corresponding to the first reference block are determined.

45. The method of claim 43, wherein: The determining, according to the horizontal gradient and the vertical gradient, the intra-frame mode information corresponding to the current block includes: Determining a first prediction histogram according to the horizontal gradient and the vertical gradient; In a case where there is no non-zero amplitude in the first prediction histogram, determining that the intra mode information corresponding to the current block is a PLANAR mode; In a case where there is a non-zero amplitude in the first prediction histogram, the intra-frame mode information corresponding to the current block is determined according to the gradient direction with the largest amplitude in the first prediction histogram.

46. ​​The method of claim 43, wherein: The determining the first transformation parameter according to the intra-frame mode information includes: Determine a transform core candidate set according to the intra-frame mode information corresponding to the current block; wherein the transform core candidate set includes any number of transform cores; Determine a first transform kernel in the transform kernel candidate set; The first transform parameter is determined according to the first transform kernel.

47. The method of claim 46, wherein: The transform kernel candidate set includes any one of a LFNST transform kernel candidate set, a NSPT transform kernel candidate set, and a transform kernel candidate set determined based on a prediction direction.

48. The method of claim 47, wherein: The determining of the LFNST transform kernel candidate set according to the intra mode information corresponding to the current block includes: According to the mapping relationship between the intra mode and the transform kernel candidate set, the transform kernel candidate set corresponding to the intra mode information is determined.

49. The method of claim 47, wherein: The method further comprises: Determine a first transform kernel in the transform kernel candidate set to determine the first transform parameter; A transform core index number is determined according to the first transform core, and the transform core index number is written into a bitstream.

50. The method of claim 47, wherein: The method further comprises: A matrix size corresponding to the first transformation parameter is determined based on the size of the current block.

51. The method of claim 35, wherein: The determining a prediction block of the current block according to the first reference block of the current block comprises: The first reference block is corrected according to a preset processing strategy to determine a prediction block of the current block.

52. The method of claim 51, wherein: The preset processing strategy includes at least one of the following processing: fusion processing, filtering processing, pixel sub-processing, and pixel flipping processing.

53. The method according to any one of claims 35 to 52, wherein: The method further comprises: A first transform coefficient corresponding to the prediction residual is determined.

54. The method of claim 53, wherein: The determining, based on the prediction block of the current block and the first transformation parameter, a reconstructed block corresponding to the current block comprises: determining the prediction residual based on the first transform parameter and the first transform coefficient; A reconstructed block corresponding to the current block is determined according to the predicted block of the current block and the prediction residual.

55. The method of claim 54, wherein: The determining the prediction residual based on the first transform parameter and the first transform coefficient comprises: Perform a secondary inverse transform according to the first transform coefficient and the first transform parameter to determine a second transform coefficient; An inverse transform is performed on the second transform coefficient to determine the prediction residual.

56. The method of claim 36, wherein: The method further comprises: Determine a prediction block of the current block according to a first reference block of the current block; Determine a second transformation parameter corresponding to the current block according to the prediction block of the current block; A reconstructed block corresponding to the current block is determined based on the prediction block of the current block and a second transformation parameter corresponding to the current block.

57. The method of claim 56, wherein: The method further comprises: In a case where it is determined to use the first transformation parameter, determining that a value of the first identification information is a first value; In the case of determining to use the second transformation parameter, determining that the value of the first identification information is a second value; The first identification information is written into the code stream.

58. The method of claim 56, wherein: The method further comprises: A first prediction histogram corresponding to the first reference block and a second prediction histogram corresponding to the prediction block are determined.

59. The method of claim 58, wherein: The method further comprises: Determining a first gradient direction and a second gradient direction in the first prediction histogram; When the amplitude difference between the first gradient direction and the second gradient direction is less than or equal to a preset threshold, determining a reconstructed block corresponding to the current block based on the first transformation parameter; When the amplitude difference between the first gradient direction and the second gradient direction is greater than a preset threshold, a reconstructed block corresponding to the current block is determined based on the second transformation parameter.

60. The method of claim 58, wherein: The method further comprises: Determining a first gradient direction and a second gradient direction in the second prediction histogram; When the amplitude difference between the first gradient direction and the second gradient direction is less than or equal to a preset threshold, determining a reconstructed block corresponding to the current block based on the first transformation parameter; When the amplitude difference between the first gradient direction and the second gradient direction is greater than a preset threshold, a reconstructed block corresponding to the current block is determined based on the second transformation parameter.

61. The method of claim 43, wherein: The method further comprises: The horizontal gradient and the vertical gradient are determined according to a portion of pixels or all pixels in the first reference block.

62. The method of claim 52, wherein: The method further comprises: Performing correction processing on the first reference block of the current block according to a first processing strategy to determine a first prediction block corresponding to the first reference block; The first prediction block is modified according to a second processing strategy to determine a prediction block of the current block.

63. The method of claim 62, wherein: The method further comprises: Determine a third transformation parameter corresponding to the current block according to the first prediction block; A reconstructed block corresponding to the current block is determined based on the prediction block of the current block and a third transformation parameter corresponding to the current block.

64. The method of claim 58, wherein: The method further comprises: Determine a first template corresponding to the current block, and determine a preset search area; Search is performed in the preset search area to determine the block vector of the current block.

65. The method of claim 58, wherein: The method further comprises: Determine a first template corresponding to the current block, and determine a preset search area; Searching in the preset search area to construct a block vector candidate list of the current block; A block vector of the current block is determined according to the block vector candidate list.

66. The method of claim 58, wherein: The method further comprises: Determine a block vector of an adjacent block corresponding to the current block; Constructing a block vector candidate list of the current block according to the block vectors of the adjacent blocks; A block vector of the current block is determined according to the block vector candidate list.

67. The method according to any one of claims 64 to 66, wherein: The method further comprises: Determining a template direction corresponding to the first template; Determine a first correlation parameter between the gradient direction with the largest magnitude in the first prediction histogram and the template direction; Determine a second correlation parameter between the gradient direction with the largest magnitude in the second prediction histogram and the template direction; In a case where the first relevant parameter is greater than or equal to the second relevant parameter, determining a reconstructed block corresponding to the current block based on the first transformation parameter; In a case where the first relevant parameter is less than the second relevant parameter, a reconstructed block corresponding to the current block is determined based on the second transformation parameter.

68. The method according to any one of claims 35 to 67, wherein: The method further comprises: In the case where the current block uses a prediction mode based on the prediction parameters, the prediction parameter determination process is executed; prediction mode identification information corresponding to the current block is determined, and the prediction mode identification information is written into a bitstream.

69. A code stream, the code stream is generated by bit encoding according to information to be encoded; wherein, The information to be encoded includes at least one of the following: Prediction mode identification information corresponding to the current block, first identification information, first transform coefficient corresponding to the prediction residual, and transform core index number.

70. An encoder, comprising: The first determining unit; wherein, The first determination unit is configured to determine a prediction parameter corresponding to a current block; determine a first reference block of the current block according to the prediction parameter of the current block; determine a first transformation parameter of the current block according to the first reference block of the current block; determine a prediction block of the current block according to the first reference block of the current block; and determine a reconstructed block corresponding to the current block based on the prediction block of the current block and the first transformation parameter.

71. An encoder, comprising a first memory and a first processor; wherein: The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to execute the method according to any one of claims 35 to 68 when running the computer program.

72. A decoder, the decoder comprising: The second determining unit; wherein, The second determination unit is configured to determine a prediction parameter corresponding to a current block; determine a first reference block of the current block according to the prediction parameter of the current block; determine a first transformation parameter of the current block according to the first reference block of the current block; determine a prediction block of the current block according to the first reference block of the current block; and determine a reconstructed block corresponding to the current block based on the prediction block of the current block and the first transformation parameter.

73. A decoder, comprising a second memory and a second processor; wherein: The second memory is used to store a computer program that can be run on the second processor; The second processor is configured to execute the method according to any one of claims 1 to 34 when running the computer program.

74. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 34 is implemented, or the method according to any one of claims 35 to 68 is implemented.