Encoding method, decoding method, code stream, encoder, decoder, and storage medium
By constructing a list of transformation models and selecting diverse transformation models to determine the linear transformation of the reference block, the problem of insufficient parameter selection in LIC technology is solved, thereby improving encoding and decoding performance and prediction accuracy.
Patent Information
- Application Number
- PCT/CN2023/105611
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2025-01-09
AI Technical Summary
In existing LIC technology, the linear transformation parameters are derived from the reconstructed pixels adjacent to the current block and the reference block, resulting in insufficient diversity in parameter selection and affecting encoding and decoding performance.
A coding and decoding method is provided that constructs a list of transformation models and selects a variety of transformation models to determine the linear transformation of the reference block, thereby improving the diversity of predictions and coding and decoding performance.
By constructing a list of transformation models and selecting a suitable transformation model for linear transformation of the reference block, the prediction accuracy and efficiency of encoding and decoding are improved.
Smart Images

Figure CN2023105611_09012025_PF_FP_ABST
Abstract
Description
Coding and decoding method, code stream, encoder, decoder and storage medium Technical Field
[0001] The present application relates 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
[0002] Intra Block Copy (IBC) is an intra-frame prediction technique that uses block matching to obtain predicted pixels. Similar to inter-frame prediction, prediction is achieved by using a block vector pointing from the current block to a reference block. The difference is that the reference block for inter-frame prediction comes from the encoded reconstructed frame, while the reference block for IBC comes from the reconstructed portion of the current frame. Local Illumination Compensation (LIC) is a block-level linear transformation technique. The LIC method indicates that there is a linear relationship between the current coded block and the reference block.
[0003] In existing technologies, IBC can determine a reference block from the current frame through block compensation. Based on this, IBC can be combined with LIC to perform a linear transformation on the reference block to determine the prediction block, thereby improving prediction accuracy.
[0004] However, the linear transformation parameters in LIC technology are derived from the adjacent reconstructed pixels of the current block and the reference block, which cannot provide a variety of parameter choices and has limitations, affecting the encoding and decoding performance.
[0005] Summary of the Invention
[0006] The present application provides a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium, which can improve the diversity of prediction and thus improve the coding and decoding performance.
[0007] The technical solution of this application can be implemented as follows:
[0008] In a first aspect, an embodiment of the present application provides a decoding method, applied to a decoder, the method comprising:
[0009] Obtaining relevant syntax elements of the current block; wherein the relevant syntax elements are used to indicate whether the current block is predicted using an intra-block copy technology combined with a transform model list;
[0010] Determine a reference block obtained by using the intra block copy technology for the current block;
[0011] Determining, according to the relevant syntax elements, a first transformation model obtained based on a constructed transformation model list; the constructed transformation model list includes at least two types of transformation models;
[0012] A prediction block of a current block is determined based on the reference block and the first transform model.
[0013] In a second aspect, an embodiment of the present application provides an encoding method, applied to an encoder, the method comprising:
[0014] Determine a candidate block vector list for the current block;
[0015] Determining a reference block vector based on the candidate block vector list;
[0016] determining a reference block based on the reference block vector;
[0017] When determining that the prediction mode of the current block is the intra block copy technique combined with the transformation model list for prediction, a first transformation model is obtained from the constructed transformation model list; the constructed transformation model list includes at least two types of transformation models;
[0018] Determining a prediction block for a current block based on the reference block and the first transform model;
[0019] Encode relevant syntax elements of the current block and write the obtained coded bits into the bitstream; wherein the relevant syntax elements are used to indicate whether the current block is predicted using the intra-frame block copy technology combined with the transform model list.
[0020] In a third aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following:
[0021] The first syntax element, the second syntax element, the third syntax element, the fourth syntax element, the fifth syntax element, the sixth syntax element, the size of the current block, the CIIP flag, the GPM flag, the MBVD flag and the skip flag of the current block, and the context model; wherein,
[0022] The first syntax element is used to indicate a prediction mode using an intra block copy technology for the current block;
[0023] The second syntax element is used to indicate whether the current block is predicted using a transform model list;
[0024] The third syntax element is used to indicate whether to use a transform technique for prediction;
[0025] The fourth syntax element is used to indicate the model index of the transformation model in the transformation model list;
[0026] The fifth syntax element is used to indicate the index of the local compensation model when using the multi-mode local compensation technology;
[0027] The sixth syntax element is used to indicate index information of a reference block.
[0028] In a fourth aspect, an embodiment of the present application provides a decoder, including:
[0029] The decoding part is configured to obtain relevant syntax elements of the current block; wherein the relevant syntax elements are used to indicate whether the current block is predicted using an intra-block copy technology combined with a transform model list;
[0030] A first determining part is configured to determine a reference block obtained by using the intra block copy technology for a current block;
[0031] Determining, according to the relevant syntax elements, a first transformation model obtained based on a constructed transformation model list; the constructed transformation model list includes at least two types of transformation models;
[0032] The first prediction part is configured to determine a prediction block of the current block based on the reference block and the first transformation model.
[0033] In a fifth aspect, an embodiment of the present application provides a decoder, comprising a first memory and a first processor; wherein:
[0034] a first memory for storing a computer program capable of running on the first processor;
[0035] The first processor is configured to execute the decoding method as described in the first aspect when running a computer program.
[0036] In a sixth aspect, an embodiment of the present application provides an encoder, including:
[0037] a second determining portion configured to determine a candidate block vector list for the current block; determine a reference block vector based on the candidate block vector list; determine a reference block based on the reference block vector; and, when determining that the prediction mode of the current block is prediction using an intra block copy technique combined with a transform model list, obtain a first transform model from the constructed transform model list; the constructed transform model list including at least two types of transform models;
[0038] A second prediction part is configured to determine a prediction block of a current block based on the reference block and the first transformation model;
[0039] The encoding part is configured to encode relevant syntax elements of the current block and write the obtained coded bits into the bitstream through the writing part; wherein the relevant syntax elements are used to indicate whether the current block is predicted using the intra-frame block copy technology combined with the transform model list.
[0040] In a seventh aspect, an embodiment of the present application provides an encoder, comprising a second memory and a second processor; wherein:
[0041] a second memory for storing a computer program capable of running on the second processor;
[0042] The second processor is used to execute the encoding method as described in the second aspect when running the computer program.
[0043] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a first processor, it implements the decoding method as described in the first aspect, or when it is executed by a second processor, it implements the encoding method as described in the second aspect.
[0044] The embodiments of the present application provide a coding and decoding method, a bitstream, an encoder, a decoder, and a storage medium. The decoder or encoder can select a first transformation model from a transformation model list including at least two types of transformation models; the selected first transformation model is used to transform a reference block, thereby determining a prediction block. Therefore, during the coding and decoding process, the first transformation model used to implement the transformation can be selected and determined from the transformation model list, ensuring a variety of choices, thereby increasing the probability of prediction, improving the diversity of predictions, and ultimately improving coding and decoding performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] FIG1 is a schematic diagram of a prediction process of an Intra TMP technology;
[0046] FIG2 is a schematic diagram of a matching block of an Intra TMP technology;
[0047] FIG3 is a schematic diagram of a template type of Intra TMP technology;
[0048] FIG4A is a schematic diagram of a coarse search process of template matching in an intra TMP technique;
[0049] FIG4B is a schematic diagram of a detailed search process for template matching in an intra TMP technique;
[0050] FIG5 is a schematic diagram of weighted fusion of an IntraTMP fusion prediction technology;
[0051] FIG6A is a schematic diagram of a filter shape;
[0052] FIG6B is a schematic diagram of a filter coefficient derivation method;
[0053] FIG7 is a schematic diagram of a method for dividing a coding block vertically and horizontally;
[0054] Figure 8 is a schematic diagram of the position;
[0055] FIG9A is a schematic block diagram of an encoder provided in an embodiment of the present application;
[0056] FIG9B is a schematic block diagram of a decoder according to an embodiment of the present application;
[0057] FIG10 is a schematic diagram of a network architecture of a coding and decoding system provided in an embodiment of the present application;
[0058] FIG11 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;
[0059] FIG12 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;
[0060] FIG13 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;
[0061] FIG14 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application;
[0062] FIG15 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;
[0063] FIG16 is a schematic diagram of the specific hardware structure of an encoder provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] 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 with reference to the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0066] In the following description, reference is made to "some embodiments," which describe a subset of all possible embodiments. However, 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, and third" 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 understood that "first, second, and third" may be interchanged in a specific order or sequential order 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.
[0067] Before further explaining the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained first. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations:
[0068] Coding Block (CB);
[0069] Block Matching (BM);
[0070] Coding Unit (CU);
[0071] Coding Tree Unit (CTU);
[0072] Block Vector (BV);
[0073] Sum of Absolute Difference (SAD);
[0074] Sum of Absolute Transformed Difference (SATD);
[0075] Mean Square Error (MSE);
[0076] Most Probable Mode (MPM);
[0077] Mean Absolute Deviation (MAD);
[0078] Sequence Parameter Set (SPS);
[0079] Palette (PLT);
[0080] Rate Distortion Optimization (RDO);
[0081] Enhanced Compression Model (ECM) reference software test platform;
[0082] Joint Video Experts Team (JVET);
[0083] Intra Template Matching Prediction (Intra TMP);
[0084] Block Differential Pulse Coded Modulation (BDPCM);
[0085] Intra Block Copy (IBC);
[0086] Local Illumination Compensation (LIC);
[0087] Cross Component Merge (CCMerge).
[0088] 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. These three color components are a luminance component, a blue chrominance component, and a red chrominance component. Specifically, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbol Cb or U, and the red chrominance component is usually represented by the symbol Cr or V. Thus, a video image can be represented in either the YCbCr format or the YUV format.
[0089] 1) IntraTMP technology
[0090] Intra TMP technology, abbreviated as IntraTMP, is a specialized intra-frame prediction technology. It is a specialized intra-frame prediction coding tool primarily used for screen content encoding. IntraTMP is implemented through the following process: Reconstructed pixels adjacent to the current coding block are selected as a template. The most similar template is searched for within the reconstructed region of the given current frame. The reconstructed block corresponding to the most similar template is then used as a matching block, which is then used as the prediction block for the current coding block. The template for the coding block is typically selected from the reconstructed region adjacent to the current coding block.
[0091] For example, taking the adjacent reconstructed area of the current block as an example, as shown in Figure 1, the area filled with a grid represents the reconstructed area. In the reconstructed area, R1, R2, R3 and R4 are search areas. R1 to R4 search for matching blocks in sequence. The adjacent area of the current block is the first template (T); and the adjacent area of the matching block (also called the "reference block") is the second template (i.e., the "reference block template" or "matching template", T_BEST). As shown in Figure 2, both the encoder and the decoder search the predefined search range in the current image through the template (T) of the coding block to determine the matching template (T_BEST) with the smallest template error value, and then use the reconstructed block (Ref Block) corresponding to the matching template as the prediction block of the current coding block (Cur Block). The degree of similarity between templates is represented by the size of the template error value. The smaller the template error value, the higher the degree of similarity. In an embodiment of the present application, the template error value 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.
[0092] For example, taking absolute error and SAD as an example, the template error value at this time is as follows:
[0093] Among them, T i is the template in the search process, and M represents the number of pixels in the template.
[0094] It should be noted that the Intra TMP technology uses the adjacent reconstructed pixels of the current block as templates to search for matching templates within a predefined search area, where the adjacent reconstructed pixels can be the upper reference pixel, upper left reference pixel, upper right reference pixel, left reference pixel, lower left reference pixel, etc. of the current block. Therefore, the template type can be classified and the corresponding template type can be determined based on the availability of the adjacent reconstructed pixels.
[0095] It should also be noted that refTemplateType can be used to represent a template type. Figure 3 shows a schematic diagram of template types for the Intra TMP technology. As shown in Figure 3, the block filled with a grid is the current block, and the adjacent area of the current block is the template T. Six template types are shown here.
[0096] For example, the six template types are as follows:
[0097] 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 Figure 3;
[0098] When only the left reference pixel is available, the value of refTemplateType is 2, and the template shape is shown in (b) in Figure 3;
[0099] When only the upper reference pixel is available, the value of refTemplateType is 3, and the template shape is shown in (c) in Figure 3;
[0100] 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) in Figure 3;
[0101] 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 Figure 3;
[0102] 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 Figure 3.
[0103] In intra TMP technology, the codec uses the flag intra_tmp_flag to indicate whether the current coded block is encoded using the intraTMP mode. If so, the decoder performs the same template matching process to obtain the same predicted block, eliminating the need for additional encoding of the block vector information from the current coded block to the matching block. The following example illustrates intra TMP technology.
[0104] 2) IntraTMP adaptation technology for camera-captured content
[0105] The IntraTMP adaptation for camera-captured content technology builds on the existing IntraTMP technology by performing template matching with a step size S (i.e., every S points in the horizontal and vertical directions, where S>1) (as shown in Figure 4A). For example, rather than searching for matching blocks point by point using a raster scan, the search area is searched for alternate points in the horizontal and vertical directions. For example, if the current template matching block vector is (X0, Y0), the next template matching block vector should be (X0+S, Y0), and the vertical coordinate of the next template matching block vector should be Y0+S. After template matching is complete, the best matching block is refined within a certain range (as shown in Figure 4B, where template matching is performed with a smaller step size S') to optimize the matching result. This technology effectively reduces the complexity of the IntraTMP mode while maintaining good coding efficiency.
[0106] 3) IntraTMP multi-candidate technology
[0107] IntraTMP multi-candidate technology uses a template matching process to obtain N candidate matching blocks within the reference area, or to construct a candidate block list of length N. The candidate matching blocks in the list can be sorted by the template error value between them and the current block. A candidate block in the list is selected as the final prediction block by index. For a coded block using IntraTMP multi-candidate technology, after decoding the IntraTMP flag intra_tmp_flag as true, it continues to decode intra_tmp_idx. The intra_tmp_idx syntax element can represent the index of the selected candidate block.
[0108] intra_tmp_flag
[0109] if(intra_tmp_flag)
[0110] {
[0111] intra_tmp_idx
[0112] }
[0113] Exemplarily, a template matching process for constructing a candidate block list is as follows:
[0114] The first step is to perform the first search with a certain step size, for example, both the horizontal step size and the vertical step size are 4. N optimal matching blocks with a certain spacing are obtained (the first N with the smallest template error value);
[0115] In the second step, a second search is performed in the N neighboring areas of the matching blocks obtained in the first step. These neighboring areas can be set to multiple non-overlapping areas based on the step size in the first step. M optimal matching blocks are obtained from these areas (which may include the matching blocks obtained in the first step).
[0116] The same construction process is used at the encoding and decoding ends to obtain a consistent list of candidate blocks.
[0117] Intra_tmp_idx may use fixed-length encoding or variable-length encoding, for example, truncated binary encoding.
[0118] A variable length encoding method is:
[0119] The smaller the index (the smaller the intra_tmp_idx value), the smaller the template error value of the corresponding candidate block, and the greater the probability of being selected statistically. A shorter codeword can be set for a smaller intra_tmp_idx. For example, as shown in Table 1:
[0120] Table 1
[0121] If the maximum value N of intra_tmp_idx is large, a codeword of the same length can be allocated to the larger intra_tmp_idx. For example, N is 15. As shown in Table 2:
[0122] Table 2
[0123] In Table 2 above, x can be obtained using truncated binary.
[0124] 4) IntraTMP fusion prediction technology, also known as IntraTMP multi-matching block fusion technology
[0125] Through intra-frame template matching, we can obtain the template error values between the reconstructed blocks and the current coding block at different positions. These reconstructed blocks can be represented by block vectors pointing to the reconstructed blocks from the current coding block. A candidate block vector list is constructed to record the block vectors with the smallest template error values during the template matching process. Based on conditions such as the block vector spacing and the template error value, one or more block vectors are selected from the candidate block vector list, and the reconstructed blocks they point to are used as matching blocks for the current coding block. A weight value is determined for each matching block. These matching blocks are then weighted and fused according to their weight values to obtain the final predicted block, thus achieving IntraTMP combined fusion prediction. The process is shown in Figures 5A and 5B.
[0126] The number of matching blocks to be fused can be a fixed value or determined based on the size of the template error values of each matching block. For example, for the N available matching blocks, a threshold Threshold = minSAD << 1 is set, where minSAD is the minimum template error value among these matching blocks. Only matching blocks with a template error value less than or equal to this threshold are used in the fusion process. This method can determine the matching blocks for fusion.
[0127] After the matching blocks for fusion are determined, the weight of each matching block can be determined by using a preset fixed value, calculating based on the template error value, or deducing based on the template.
[0128] 5) IntraTMP filtering
[0129] The matching block (also called the reference block) obtained by intra-frame template matching is usually used directly as the prediction block for the current block. The prediction block can be filtered to improve the prediction effect. A block-level flag can be used to indicate whether the current block uses the filtering process for the prediction block.
[0130] There are many forms of filters. One possible filter form is as follows: PredC = c0C + c1N + c2S + c3E + c4W + c5B (2)
[0131] Where C is the pixel to be filtered, N is the pixel above it, S is the pixel below it, W is the pixel to its left, and E is the pixel to its right, as shown in Figure 6A. B (Bias) is a fixed value, for example, B is the median of the pixel range. c0 to c5 are the filter coefficients.
[0132] One method for determining filter coefficients is to train the filter coefficients using a reference block template and the current block template. For example, the template area is the reconstruction area four rows above and four columns to the left of the current block. For the reference block, an additional row of area above, below, and to the left of the template area is also required as a reference. As shown in Figure 6B, if part of the additional area is not fully encoded, it can be copied from the template area.
[0133] One method for training filter coefficients is to calculate a set of coefficients so that the template error between the filtered reference block template and the current block template is minimized.
[0134] If the current block uses IntraTMP filtering, one method is to filter the prediction block directly obtained from the reference block. One method is to filter each pixel in order from left to right and from top to bottom, and use the filtered value as the prediction value.
[0135] 6) Template-derived IntraTMP fusion
[0136] IntraTMP fusion prediction can obtain multiple reference blocks through the intra-frame template matching process and perform weighted fusion on these reference blocks. The weight value is usually a predefined fixed value or calculated based on the template error of each reference block. For example, the template error values of the reference blocks are SAD1 to SADn, and one way to calculate the weight is formula (3), (4) and (5): SADi = (SADi = = 0)? 1:SADi (3) Wi=(SUM-SADi) / ((n-1)*SUM) (5)
[0137] Where n is the total number of reference blocks, and Wi is the weight value corresponding to the reference block with a template error value of SADi. The form of the prediction block after weighted fusion can be as shown in formula (6):
[0138] The template-derived IntraTMP fusion method uses a method similar to filter coefficient training to obtain weights for fusion prediction based on the training of each reference block template and the current block template. For example, using 5 reference blocks for weighted fusion, the form is shown in formula (7):
[0139] One weighted approach is to calculate a set of coefficients so that the template error between the reference block template and the current block template is minimized.
[0140] 7) Template-based intra-frame mode derivation technology
[0141] The Template-Based Intra Mode Derivation (TIMD) technique uses the reconstructed pixels of the L-shaped portion adjacent to the current coding block as a template. By traversing the MPM list, the predicted pixels of the template area under different intra prediction modes are calculated. The template error values of the predicted and reconstructed pixels under different intra prediction modes are obtained, represented by the Sum of Absolute Transformed Difference (SATD). The optimal intra prediction mode is selected based on the template error value. At the decoding end, the intra prediction mode is obtained through the same derivation method, thereby reducing the coding bits of the mode information.
[0142] 8) Joint intra-frame and inter-frame prediction technology
[0143] Combined Inter and Intra Prediction (CIIP) technology combines intra prediction and inter prediction to obtain the prediction block of the current coding block using a weighted combination of intra prediction blocks and inter prediction blocks. CIIP in ECM is combined with template-based prediction technology, and different weight values are assigned to different regions, further improving the accuracy of prediction. Specifically, its intra prediction block pred_intra is obtained by the TIMD mode, and the inter prediction block pred_inter is obtained by the template-based Merge mode. According to the derived intra prediction mode and the position of the pixel to be predicted, the weight values wIntra and wInter are determined. The final prediction block Pred is calculated as shown in formula (8): Pred = (wIntra*pred_intra+wInter*pred_inter+4)>>3 (8)
[0144] Among them, wIntra and wInter are determined by the intra prediction mode intra_dir derived from TIMD. There are 65 intra-frame angular prediction modes in ECM (2≤intra_dir<=66). When 2≤intra_dir<34, the current coding block is divided into four equal parts vertically; when 34<=intra_dir<=66, the current coding block is divided into four equal parts horizontally. The weight values of wIntra and wInter for each region are shown in Table 3:
[0145] Table 3
[0146] The indexes of each region under vertical or horizontal quartering are shown in Figure 7. In particular, when intra_dir is equal to 0 or 1, no sub-region is divided, and wIntra and wInter are selected from (3, 1), (2, 2), and (1, 3) according to the coding type (intra-frame or inter-frame) of the two coding blocks located on the left and above.
[0147] 9) Intra-frame block copy technology
[0148] Intra Block Copy (IBC) is an intra-frame prediction technique that uses block matching to obtain predicted pixels. Similar to inter-frame prediction, prediction is achieved by using a block vector pointing from the current block to a reference block. The difference is that the reference block for inter-frame prediction comes from the encoded reconstructed frame, while the reference block for IBC comes from the reconstructed portion of the current frame. Block vector information needs to be transmitted in the codestream, so similar to intra-frame prediction, there are IBC-AMVP mode and IBC-Merge mode.
[0149] The IBC-AMVP mode constructs a list of candidate block vectors to obtain a predicted block vector. Based on the predicted block vector, a hash search, full search, and other processes are used to obtain the reference block and the corresponding final block vector for the current block. The final block vector is encoded based on the predicted block vector, improving coding efficiency.
[0150] The IBC-Merge mode predicts by constructing a list of candidate block vectors. Through encoding processes such as SATD and RDO, the best block vector in the list is selected as the final block vector. The reconstructed block it points to is used as the reference block to complete the prediction. The index of the block vector in the list is encoded rather than the block vector itself, improving coding efficiency.
[0151] The candidate block vector list may be composed of coding information such as block vectors of adjacent coded blocks, block vectors of historical coding, and average block vectors.
[0152] The candidate block vector list may include information such as a local illumination compensation LIC flag. If the LIC flag of a candidate is true, when the current block selects the candidate block vector, the LIC flag of the current block is set to true.
[0153] 10) Local illumination compensation technology
[0154] Local illumination compensation technology is a block-level linear transformation technology. The LIC method assumes that there is a linear relationship between the current coding block and the reference block, which can be expressed as formula (9): Pred = α·ref + β (9)
[0155] Among them, α and β can be derived from pixels in a reconstructed area adjacent to the current coding block and pixels in a reconstructed area adjacent to the reference block, and obtained by methods such as the least squares method.
[0156] In addition, a threshold value can be set, and different linear parameters can be selected according to the size relationship between the reference block pixels and the threshold value, which can be expressed as formula (10):
[0157] 11) Non-adjacent candidates for Inter-Merge
[0158] For inter-frame coded blocks in Merge mode, non-adjacent candidates can be added when constructing the merge list. Based on the current block size, non-adjacent points are selected and attempted to be merged candidates. The non-adjacent points and the pixel positions of the current block are shown in Figure 8. Positions numbered 1-5 in Figure 8 are called candidates for adjacent positions, and the remaining positions are called candidates for non-adjacent positions.
[0159] 12) Multi-mode IBC-LIC technology:
[0160] The multi-modal IBC-LIC technique is further divided into multiple sub-methods based on the template area used to derive linear parameters and the number of linear transformation models. One example is to divide IBC-LIC into the following four methods:
[0161] 1. Use L-shaped template area and single model;
[0162] 2. Use the left template area and a single model;
[0163] 3. Use the template area on the right and a single model;
[0164] 4. Use L-shaped template area and two models (select different models for linear transformation according to the threshold).
[0165] In this application, a specific IBC-LIC sub-method can be selected by encoding the index.
[0166] However, IBC can obtain a reference block from the current frame through block compensation. Based on this, IBC can be combined with LIC to perform a linear transformation on the reference block, thereby improving prediction accuracy. A limitation of LIC is that its linear transformation parameters are derived from the reconstructed pixels adjacent to the current and reference blocks, which does not provide a wide range of parameter options.
[0167] This application proposes a method for constructing a list of transform model candidates for the current coding block based on the transform models used in the previous coding blocks, which can improve prediction diversity. The encoder side makes decisions to select the optimal transform model for the current coding block, thereby improving coding efficiency.
[0168] Referring to FIG9A , which shows a block diagram of an encoder provided in an embodiment of the present application. As shown in FIG9A , the encoder (specifically, a “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, an encoding unit 109, and a decoded image cache unit 110, etc., wherein the filtering unit 108 may implement deblocking filtering and sample adaptive offset (SAO) filtering, and the encoding unit 109 may implement header information encoding and 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). 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 on 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 the process of generating a motion vector, which can estimate the motion of the video coding block. The motion compensation unit 104 then calculates the motion vector based on the motion vector determined by the motion estimation unit 105. After determining the intra-frame prediction mode, the intra-frame prediction unit 103 is further configured to provide the selected intra-frame prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated motion vector data to the encoding unit 109. In addition, the inverse transform and inverse quantization unit 106 is configured to reconstruct the video coding block and reconstruct a residual block in the pixel domain. The reconstructed residual block is subjected to the filter control analysis unit 107 and the filtering unit 108 to remove the block effect artifacts. The reconstructed residual block is then added to a predictive block in the frame of the decoded image buffer unit 110 to generate a reconstructed video coding block. The encoding unit 109 is configured 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. The decoded image buffer unit 110 is configured 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 .
[0169] 9B , which shows a schematic block diagram of a decoder provided in an embodiment of the present application. As shown in FIG9B , the decoder (specifically, a "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 buffer unit 206. 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 as shown in FIG8A , a code stream of the video signal is output; the code stream is input to the decoder 200 and first passes through the decoding unit 201 to obtain 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 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 is used to generate a predictive block for 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 with 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 blocking artifacts, thereby improving video quality; the decoded video block is then stored in the decoded image buffer unit 206, which stores reference images used for subsequent intra-frame prediction or motion compensation, and is also used for outputting the video signal, thereby obtaining the restored original video signal.
[0170] Furthermore, an embodiment of the present application also provides a network architecture of a coding and decoding system including an encoder and a decoder, wherein Figure 10 shows a schematic diagram of a network architecture of a coding and decoding system provided by an 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. During implementation, the electronic device can be various types of devices with video coding and decoding functions. 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 sensing device, a server, etc., which are not specifically limited here. In addition, the decoder or encoder described in the embodiment of the present application can be the above-mentioned electronic device.
[0171] It should be noted that the method of the embodiment of the present application is mainly applied to the intra-estimation unit 102 and the intra-frame prediction unit 103 shown in FIG9A , and the intra-frame prediction unit 203 shown in FIG9B . In other words, the embodiment of the present application can be applied to both an encoder and a decoder, or even to both encoders and decoders simultaneously, but the embodiment of the present application is not particularly limited thereto.
[0172] 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.
[0173] In one embodiment of the present application, referring to FIG11 , a flowchart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG11 , the method may include:
[0174] S101, obtaining relevant syntax elements of a current block; wherein the relevant syntax elements are used to indicate whether the current block is predicted using an intra-block copy technique combined with a transform model list;
[0175] S102, determining a reference block obtained by using an intra-block copy technology for the current block;
[0176] S103. Determine, according to the relevant syntax elements, a first transformation model obtained based on a constructed transformation model list; the constructed transformation model list includes at least two types of transformation models;
[0177] S104: Determine a prediction block for the current block based on the reference block and the first transformation model.
[0178] It should be noted that in the embodiments of the present application, the decoding method is applied in a scenario targeting intra-frame block copying technology. During the decoding process of the embodiments of the present application, after determining the reference block of the current block, the reference block can be transformed before determining the prediction block of the current block, or the prediction block can be determined without transforming the reference block. The embodiments of the present application propose a method for transforming the reference block before performing prediction, which can be implemented based on a constructed transformation model list.
[0179] In an embodiment of the present application, transforming the reference block may include performing the transform processing based on a selection of a transform model from a transform model list. Alternatively, transforming the reference block may be performed based on a preset LIC transform, a multi-model LIC transform, or a filter transform. The transform model list may include at least two types of transform models.
[0180] It should be noted that in codec blocks encoded and decoded using Inter, IBC, and IntraTMP, the reference block can be transformed to obtain the prediction block. The transformation of the reference block can be in the following ways:
[0181] LIC transform: The relationship between the predicted block pixel Pred(x,y) and the reference block pixel ref(x,y) is as shown in formula (11): Pred(x,y)=α·ref(x,y)+β (11)
[0182] Multi-model LIC transform: The relationship between the predicted block pixel Pred(x,y) and the reference block pixel ref(x,y) is as shown in formula (12):
[0183] Among them, threshold is the reference pixel threshold, and different parameters are used to perform linear transformation on the reference block pixels that exceed the threshold.
[0184] Filter transform: The relationship between the predicted block pixels Pred(x,y) and the reference block pixels is as follows: Pred(x,y)=c0C+c1N+c2S+c3E+c4W+c5B (2)
[0185] Where C is the reference block pixel at (x, y), N is the pixel above it, S is the pixel below it, W is the pixel to its left, and E is the pixel to its right, as shown in the figure below. B (Bias) is a fixed value, for example, the midpoint of the pixel range. c0 to c5 are the filter coefficients.
[0186] It should be noted that when a filter transform transforms a region of reference pixels, it uses some pixels outside the region as input. It can use pixels within the region to fill in the areas outside the region. Alternatively, if some pixels outside the region have already been reconstructed, the reconstructed values can be used directly.
[0187] In the embodiment of the present application, accordingly, according to the above-mentioned various transformation forms, the required parameter information (such as α i ,β i ,c i , threshold, etc.) as the parameter information and model type corresponding to the position of the codec block. It is used when the subsequent IBC codec block constructs the transformation model candidate list.
[0188] In S101, in an embodiment of the present application, during the decoding process, a bitstream may be acquired or parsed to obtain relevant syntax elements of the current block. The relevant syntax elements are used to indicate whether the current block is predicted using an intra-block copy technique combined with a transform model list. The relevant syntax element information may include multiple syntax elements.
[0189] In some embodiments of the present application, the relevant syntax elements include at least a second syntax element. The second syntax element is used to indicate whether the current block is predicted using the transform model list.
[0190] It should be noted that when the second syntax element indicates that the current block does not use the transform model list for prediction, it can be understood that the decoder can use one of the existing preset LIC transform, multi-model LIC transform, or filter transform to implement the transformation of the reference block, or not transform the reference block. This embodiment of the present application is not limited.
[0191] Exemplarily, in the embodiment of the present application, the second syntax element may be represented by cu_ibc_model_merge_flag, representing a merge flag in the IBC mode.
[0192] In an embodiment of the present application, the relevant syntax elements may further include: a first syntax element; the first syntax element is used to indicate a prediction mode of the current block using an intra block copy technology.
[0193] For example, in an embodiment of the present application, the first syntax element may be represented by pu_merge_flag, which indicates a prediction mode flag bit that indicates that the current block uses intra block copy technology. The prediction mode using intra block copy technology may include: optimized motion vector prediction (IBC-AMVP) mode or merge mode (IBC-Merge).
[0194] For S102-S104, during the decoding process of the decoder, in the process of prediction based on IBC, the decoder obtains the encoding information of the block vector by parsing the bit stream, and based on the candidate block vector list constructed by the candidate block, it can determine the reference block of the current block when using the intra-frame block copy technology.
[0195] When the decoder determines, based on relevant syntax elements, that prediction based on a list of transform models is used for this decoding, it can determine the first transform model from the list of transform models based on the relevant syntax elements. Finally, the decoder transforms the reference block based on the first transform model to obtain a prediction block for the current block, and then determines the predicted value of the prediction block. When the decoder parses the coding residual in the bitstream, it determines the reconstructed value for the current block based on the predicted value and the coding residual, completing the decoding process for the current block.
[0196] In some embodiments of the present application, the decoder parses the bitstream and decodes the first syntax element; determines the prediction mode of the current block using the intra block copy technology based on the first syntax element, and decodes the second syntax element.
[0197] In an embodiment of the present application, when the value of the decoded first syntax element is a first value, it indicates that the prediction mode of the current block using the intra block copy technology is an optimized motion vector prediction mode; when the value of the decoded first syntax element is a second value, it indicates that the prediction mode of the current block using the intra block copy technology is a merge mode.
[0198] It should be noted that, in different prediction modes of the IBC technology, the manner of decoding the second syntax element may be different.
[0199] In an embodiment of the present application, when the value of the decoded second syntax element is a first value, it indicates that the current block is predicted using the transformation model list; when the value of the decoded second syntax element is a second value, it indicates that the current block is not predicted using the transformation model list.
[0200] It should be noted that in the embodiment of the present application, the first value and the second value are different, and the first value and the second value can be in parameter form or in digital form. Specifically, the first identification information can be a parameter written in the profile or the value of a flag, which is not specifically limited here.
[0201] Exemplarily, 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; but this is not specifically limited here.
[0202] In an embodiment of the present application, taking the flag written into the bitstream as an example, assuming that the first value is set to 0 (false) and the second value is set to 1 (true), if the value of the first syntax element is 0 (false), then it can be determined that the optimized motion vector prediction mode is used for the current block; if the value of the first identification information is 1 (true), then it can be determined that the merge mode is used for the current block. If the value of the second syntax element is 0 (false), then it can be determined that the prediction method of the transform model list is not used for the current block, that is, the decoding method based on the transform model list proposed in this application is not used; if the value of the first identification information is 1 (true), then it can be determined that the prediction method of the transform model list is used for the current block, that is, the decoding method based on the transform model list proposed in this application is used.
[0203] It should be noted that the embodiment of the present application does not limit the representation of the first value and the second value. In the embodiment of the present application, the first value is 0 (false) and the second value is 1 (true) as an example for description.
[0204] The decoder determines whether to use the transformation model list for prediction based on the value of the decoded second syntax element, and can further determine which is the first transformation model for prediction and whether transformation processing is required.
[0205] It should be noted that the transformation model list contains multiple transformation models. In the process of encoding each block, a different transformation model can be selected each time. This can increase the diversity of predictions and select a suitable transformation method for each block, rather than using a unified preset transformation model for the same transformation processing, thereby improving decoding performance.
[0206] In some embodiments of the present application, the basic embodiment of the present application provides a flowchart of an optional decoding method. The method may include:
[0207] S201, decoding a first syntax element;
[0208] In the embodiment of the present application, the decoding process of S201 is consistent with the process in the aforementioned embodiment and will not be repeated here.
[0209] S202: When the value of the first syntax element is the first value, determine that the prediction mode using the intra block copy technology for the current block is the optimized motion vector prediction mode, and decode a third syntax element (cu_ibc_lic_flag), where the third syntax element is used to indicate whether a transform technology is used for prediction; the third syntax element is a related syntax element;
[0210] It should be noted that when the first syntax element is represented by pu_merge_flag, indicating that the prediction mode is the merge model, then when the decoder decodes pu_merge_flag to the first value (i.e., false), the decoder can determine that the current block uses the optimized motion vector prediction mode. At this time, the decoder continues to parse the bitstream and can decode the third syntax element. The relevant syntax elements include: the third syntax element. The third syntax element indicates whether the transform technique is used for prediction.
[0211] For example, in this embodiment of the present application, the third syntax element cu_ibc_lic_flag can be used to represent the reference block. cu_ibc_lic_flag indicates whether a transform is used to process the reference block for prediction. If the third syntax element is true, the transform is used; if the third syntax element is false, the transform is not used. However, even if a transform is used to process the reference block, it is necessary to further determine whether the transform model list is used for the transform, because it is also possible to use the same preset transform model to perform the same transform on all blocks.
[0212] It should be noted that the value of the third syntax element can also be the first value and the second value, etc., which is similar to the setting expression of the first syntax element and the second syntax element, and will not be repeated here.
[0213] S203: When the value of the third syntax element is the second value, decode the second syntax element;
[0214] S204: When the value of the second syntax element is the second value, it indicates that the current block is predicted using the transformation model list, the fourth syntax element is decoded, the index information of the transformation model is determined, and the process of the current block inheriting the local compensation flag from the merging candidate block is skipped; the fourth syntax element is used to indicate the model index of the transformation model in the transformation model list; the related syntax element information further includes: a fourth syntax element;
[0215] In this embodiment of the present application, the decoder may decode the third syntax element as either a first value (false) or a second value (true). When the decoded third syntax element takes the second value, indicating that the current block is predicted by transforming the reference block, the decoder needs to continue decoding the second syntax element to determine whether to select a transform model suitable for the current block using a transform model list or directly use a single preset transform model for the transform.
[0216] In this embodiment of the present application, during decoding of the second syntax element, if the decoder decodes the second syntax element as the second value (true), indicating that the current block is predicted using the transform model list, the decoder can continue parsing the bitstream and decode the fourth syntax element included in the relevant syntax element to obtain index information of the transform model in the transform model list. The fourth syntax element is used to indicate the model index of the transform model in the transform model list.
[0217] Exemplarily, in the embodiment of the present application, the decoder may use cu_ibc_model_merge_idx to represent the fourth syntax element.
[0218] S205 : Determine a first transformation model in the constructed transformation model list based on the index information of the transformation model.
[0219] S206: Determine a prediction block for the current block based on the reference block and the first transformation model.
[0220] In this embodiment of the present application, upon decoding the fourth syntax element, the decoder can determine, from the constructed list of transform models, the first transform model corresponding to the index information of the transform model represented by the fourth syntax element. In other words, during the prediction process for the current block, the decoder determines, from the list of transform models, the first transform model that is appropriate for the current block. In this way, the decoder can perform transform processing on the reference block based on the first transform model, thereby obtaining a prediction block for the current block, and then perform subsequent decoding processing based on the prediction block.
[0221] Exemplarily, in the IBC-AMVP mode, a list of transform model candidates is constructed for the current block, and the prediction mode and transform model of the current block are determined by writing the block-level mode flags (first syntax element, second syntax element, third syntax element) and the candidate index (fourth syntax element) of the bitstream.
[0222] The syntax elements are as follows:
[0223] The decoding process is as follows: Decode IBC prediction mode related elements. Decode cu_ibc_lic_flag. If cu_ibc_lic_flag is true, it indicates that the reference block of the coding block needs to be transformed. Further decode cu_ibc_model_merge_flag. If cu_ibc_model_merge_flag is true, it indicates that the transformation model is determined by building a candidate transformation model list. Further decode cu_ibc_model_merge_idx to determine which transformation model in the list is used. If cu_ibc_model_merge_flag is false, it indicates that the coding block uses the IBC-LIC method. If cu_ibc_lic_flag is false, it indicates that other IBC-based prediction methods are used.
[0224] In some embodiments of the present application, cu_ibc_lic_flag and cu_ibc_model_merge_flag can adopt an entropy coding method based on a context model. The value range of cu_ibc_model_merge_idx can be less than or equal to the maximum transform model candidate list length, and variable-length coding can be used. The smaller the index, the shorter the corresponding codeword. For example, the value range of cu_ibc_model_merge_idx is n, and truncated binary code encoding is used. For example, the codewords are shown in Table 4 below, and each bit under different codewords in Table 4 can use context model encoding (Intra_tmp_idx) or equal probability encoding.
[0225] Table 4
[0226] In some embodiments of the present application, the decoder determines the first transformation model in the constructed transformation model list based on the index information of the transformation model, and the process may also include: if the fourth syntax element of the transformation model is the third value, indicating at least one other transformation model in the transformation model list, wherein the other transformation models are transformation methods corresponding to other reference blocks.
[0227] It should be noted that the transformation methods of other IBC reference blocks can also be included as model candidates in the transformation model list, and these methods and the inherited available transformation models can be encoded through a unified syntax element. In other words, a syntax element is used to represent the index of the transformation method corresponding to other reference blocks. The index value may indicate the selection of other LIC models, etc., to achieve multiplexing on the syntax element.
[0228] In some embodiments of the present application, the decoding method further includes:
[0229] S207: When the value of the third syntax element is the first value, decode the second syntax element.
[0230] In the embodiment of the present application, whether to decode the second syntax element can be determined by changing the meaning of the third syntax element. For example, when the third syntax element is true, it indicates that the reference block is not processed by transform. When the third syntax element is false, it indicates that the reference block is processed by transform. In this case, the decoder can decode the second syntax element when the value of the third syntax element is the first value (false).
[0231] S207 is an alternative implementation method to S203, and is not limited in the embodiment of the present application.
[0232] For example, the syntax elements are as follows:
[0233] Decode cu_ibc_lic_flag. If cu_ibc_lic_flag is true, the coded block uses the IBC-LIC method. If cu_ibc_lic_flag is false, further decode cu_ibc_model_merge_flag. If cu_ibc_model_merge_flag is true, it indicates that the transformation model is determined by building a candidate transformation model list. Further decode cu_ibc_model_merge_idx to determine which transformation model in the list to use. If cu_ibc_model_merge_flag is false, it indicates that another IBC-based prediction method is used.
[0234] S208: When the value of the second syntax element is the second value, construct a transformation model list.
[0235] In the embodiment of the present application, when the decoder decodes the second syntax element as true, it indicates that the current block is predicted using a transformation model list, and then the transformation model list needs to be constructed.
[0236] In some embodiments of the present application, the process of constructing the transformation model list by the decoder includes: sequentially adding at least one different transformation model to the initial transformation model list to obtain the transformation model list;
[0237] The at least one transformation model includes at least one of the following:
[0238] a second transformation model corresponding to pixels at at least one adjacent position of the current block;
[0239] a third transformation model corresponding to at least one non-adjacent pixel of the current block;
[0240] The fourth transformation model used in the historical decoding process;
[0241] Available transformation models in the time domain;
[0242] Preset transformation model.
[0243] In the embodiment of the present application, at least one different transformation model is sequentially added to the initial transformation model list. When the transformation model list is obtained, the order in which the models are added can be any order between the second transformation model, the third transformation model, the fourth transformation model, the available transformation model in the time domain, and the preset transformation model. Furthermore, any type of transformation model can include multiple transformation models.
[0244] It should be noted that the order of adding at least one transformation model when constructing the transformation model candidate list may be different, for example, adding historical available transformation models first and then adding non-adjacent available transformation models, etc., which is not limited in this embodiment of the present application.
[0245] It should be noted that the transformation model list has a maximum length, which is not limited in the embodiments of the present application.
[0246] For example, if cu_ibc_model_merge_flag is true, a transform model candidate list is constructed for the current coding block, with a maximum length of N. The list can be composed of the following candidates in sequence:
[0247] The available transformation model of the adjacent position (the second transformation model);
[0248] Available transformation models for non-adjacent positions (third transformation model);
[0249] The available transformation model of history (fourth transformation model);
[0250] Available transformation models in the time domain;
[0251] Default transformation model (preset transformation model).
[0252] The default transformation model may include: the LIC transformation model with parameters α0 and β0, and a transformation model obtained by adjusting the existing transformation models in the list. When constructing the transformation model list, redundancy can be eliminated. For example, a transformation model to be added is only added to the list if it is different from all existing candidates in the list.
[0253] For example, when constructing the transform model candidate list for the current block, the variable model candidates in the time domain can be added. For example, the list is constructed in the following order:
[0254] 1) Available transformation models of adjacent locations;
[0255] 2) Available transformation models in the time domain;
[0256] 3) Available transformation models for non-adjacent locations;
[0257] 4) historically available transformation models;
[0258] 5)Default transformation model.
[0259] In an embodiment of the present application, the preset transformation model includes: a model corresponding to the preset model parameters or a model obtained by offsetting at least one of the second transformation model, the third transformation model and the fourth transformation model, the model corresponding to the preset model parameters and the available transformation model in the time domain.
[0260] It should be noted that the offset here refers to the offset of any parameter in any transformation model.
[0261] It should be noted that when the maximum length is not reached, a new transformation model can be obtained by performing some offsets on the existing candidate transformation model parameters and added to the transformation model list.
[0262] The time domain transformation model is obtained by checking multiple adjacent points in the same frame in the reference frame list. In addition, the variable model candidates of the time domain after translation can also be added. For example, the list is constructed in the following order:
[0263] 1) Available transformation models of adjacent locations;
[0264] 2) Available transformation models in the time domain;
[0265] 3) Available transformation models for non-adjacent locations;
[0266] 4) Available transformation models in the time domain after translation;
[0267] 5) historically available transformation models;
[0268] 6)Default transformation model.
[0269] In the above process, the motion vector used for translation is first obtained based on the neighboring blocks of the current block. This vector is then applied to each checkpoint of the temporal candidate as a new checkpoint to obtain a usable transform model for the temporal domain after the translation. The above temporal candidate acquisition process can refer to the temporal candidate acquisition process in inter-frame prediction.
[0270] In some embodiments of the present application, the prediction type of the blocks corresponding to the second transformation model, the third transformation model and the fourth transformation model included in the transformation model list is any one of intra-frame simulation matching prediction and intra-frame block copy technology.
[0271] That is to say, the second transformation model, the third transformation model and the fourth transformation model can be from the IBC or IntraTMP intra-frame simulation matching prediction block, or only the transformation model from IBC or only the transformation model from IntraTMP can be used, which is not limited in the embodiments of the present application.
[0272] In the embodiment of the present application, the process of acquiring at least one transformation model and adding it to the transformation model list can be obtained only when the transformation condition is met.
[0273] In some embodiments of the present application, for a pixel at any adjacent position of a current block or a pixel at any non-adjacent position of the current block, if the pixel satisfies a transformation condition, a second transformation model corresponding to the adjacent position of the current block is obtained, or a third transformation model corresponding to the pixel at any non-adjacent position of the current block is obtained; wherein the transformation condition includes at least one of the following:
[0274] The block where the pixel is located uses the intra-block copy technology, the transformation model flag is valid, and the size of the block where the pixel is located meets the first preset size.
[0275] For example, taking the transform model flag as valid as an example, the judgment of whether the above-mentioned at least one transform model can be obtained can be as follows: if the codec unit at the location is coded and decoded by IBC mode or IntraTMP mode, and its prediction block is obtained by transforming the reference block, whether there is a transform model, there is a transform model flag (similar to the LIC flag) flag is valid, then the transform model is obtained, and the transform type is saved as a flag, which is convenient for checking the flag when building the list of subsequent blocks, but it is not transmitted by the encoder (the encoder can also transmit the flag, which is a different syntax element), then the model used for transformation belongs to at least one transform model. In addition, it is determined whether the codec unit at the location meets the predefined size limit to determine at least one transform model.
[0276] In some embodiments of the present application, the at least one different transformation model includes at least one of the following: at least one transformation model has a different transformation type, has different model parameters, and uses different template areas under the same transformation type.
[0277] Exemplarily, whether the transformation models are the same may be determined by at least one of the following methods:
[0278] If the transformation types are different, the LIC transformations using different template regions are considered to be of different types;
[0279] If it is LIC transformation, the α coefficient is different;
[0280] If it is a multi-model LIC transformation, any α i Different is different;
[0281] If it is a Filter transformation, any c i Different is different.
[0282] In some embodiments of the present application, the decoder sequentially adds at least one different transformation model to the initial transformation model list. The process of obtaining the transformation model list may be:
[0283] The decoder sequentially adds at least one different transformation model to the initial transformation model list to obtain an intermediate transformation model list; and reorders the intermediate transformation model list to obtain a transformation model list.
[0284] It should be noted that the order of adding the at least one transformation model is not limited. The reordering process is optional and is not limited in the embodiment of the present application.
[0285] In the embodiment of the present application, the decoder reorders the intermediate transformation model list to obtain the transformation model list, including:
[0286] Traverse each transformation model in the intermediate transformation model list and determine the offset value of each transformation model; use each transformation model to predict the reference block template respectively and determine the reference block template prediction of each transformation model; determine the error value between the reference block template prediction of each transformation model and the current block template; based on the error value of each transformation model and its corresponding offset value, determine the template error value of each transformation model; reorder each transformation model according to the template error value of each transformation model to obtain a transformation model list.
[0287] The template error values of each transformation model are from small to large, and the index information of the corresponding transformation model list is from small to large. When the reference block template is unavailable, the error value is determined to be the maximum value.
[0288] It should be noted that for all transformation models in the transformation model list, an offset value is calculated based on the current block template and the reference block template, which is used to calculate the subsequent prediction value. This requires traversing all transformation models to calculate the offset for each transformation model. It is important to note that if no reordering is performed, the offset can be calculated only for the selected transformation model, and it is not necessary to calculate the offset for all candidates. When reordering the transformation model candidate list, the current block template is N rows above and M columns to the left of the current block, and the corresponding adjacent area of the reference block is the reference block template. For a transformation model in the transformation model list, it is applied to the reference block template to obtain a prediction of the reference block template. This results in an error value between the reference block template prediction and the current block template. This error value can be calculated using the SAD and then added to the offset value to obtain the template error value. Finally, the list is reordered based on the template error values corresponding to each transformation model. For example, the transformation model with the smaller template error value has the corresponding model index smaller. When the reference block template is unavailable, the SAD value is set to the maximum value, such as the maximum integer value.
[0289] It is understandable that reordering can reduce the index of the transformation model with better probability and smaller template error value. Once the optimal transformation model is selected, fewer codewords can be transmitted during encoding and decoding, saving codewords.
[0290] In some embodiments of the present application, each transformation model of different transformation types corresponds to a different reference block template area; and the error value of each transformation model is the average template error value of the number of pixels in the respective reference block template.
[0291] It should be noted that when calculating the template error values for each transformation model, different template regions can be used for different transformation types. The average template error value can be calculated based on the number of pixels in the template for comparison. This can also be extended to scenarios where different template regions can be used for different transformation types. For example, if the transformation type is an LIC transformation using the left template, the left template can be used when calculating the offset.
[0292] In some embodiments of the present application, first position information (upper left corner coordinates) of the current block and the current size of the current block are obtained;
[0293] At least one adjacent position of the current block and at least one non-adjacent position of the current block are determined based on the first position information and the current size.
[0294] It should be noted that the determination of adjacent positions and non-adjacent positions may be the same as the method for constructing an inter-coding block Merge list and the method for constructing an IBC Merge list.
[0295] For example, adjacent positions and non-adjacent positions can be determined based on the position and size of the current block. For example, if the coordinates of the upper left corner of the current block are (X, Y), and the width and height are (W, H), then the adjacent positions can be (X-1, Y+H-1), (X+W-1, Y-1), (X-1, Y+H), (X-1, Y-1). For example, non-adjacent positions can be: a 0i =(XW*i-1,Y+H*(i+1)-1),1<=i<=7 (13) a 1i =(X+W*(i+1)-1,YH*i-1),1<=i<=7 (14) a 4i =(XW*i-1,YH*i-1),1<=i<=7 (17) a 5i =(X-1,Y+H*(i+1)-1),2<=i<=7 (18) a 6i =(X+W*(i+1)-1,Y-1),2<=i<=7 (19)
[0296] According to a 01 ,a 11 ,…,a 41 ,a 02 ,…a 82 ,…,a 87 These non-adjacent positions are checked in the order in which they are found.
[0297] The following non-adjacent locations may be additionally checked: b 0i =(XW*i-1,Y+offsetY),1<=i<=7 (24) b 1i =(X+offsetX,YH*i-1),1<=i<=7 (25)
[0298] In some embodiments of the present application, the derived local compensation model is obtained and added to the transformation model list.
[0299] It should be noted that, in the process of constructing the transformation model list, it is possible to,inherit from adjacent positions, but it is also possible to put the rest of the derived LIC models as the first,one in the list.
[0300] In this embodiment of the present application, historically available transformation models may overlap with available transformation models at adjacent locations and available transformation models at non-adjacent locations. However, these historically available transformation models cover more areas and store the most recent historical transformation model for the most recently coded or decoded block in the encoding and decoding order. The decoder maintains a list of historical transformation models, removes duplicates from this list, and then adds them to the candidate transformation model list.
[0301] In some embodiments of the present application, a historical transformation model used in the decoding process is obtained; when the historical transformation model and the historical transformation model list have the same model, the same model in the historical transformation model list is removed, and the historical transformation model is added to the first sequence position of the historical transformation model list; when the historical transformation model and the historical transformation model list do not have the same model, the historical transformation model is added to the first sequence position of the historical transformation model list.
[0302] In some embodiments of the present application, the process of adding a historical transformation model to the first sequence position of a historical transformation model list is: when the historical transformation model list meets the first preset list length, the transformation model in the last sequence position in the historical transformation model list is removed, and then the historical transformation model is added to the first sequence position of the historical transformation model list.
[0303] It should be noted that the fourth transformation model is determined sequentially from the historical transformation models in the order from the first order digit to the last order digit of the historical transformation models.
[0304] It should be noted that a list consisting of transformation models of encoded and decoded blocks can be maintained during the encoding and decoding process, which can be called a historical transformation model list. It is used to add candidates for historical transformation models (i.e., the fourth transformation model) when constructing a transformation model list for subsequent encoding and decoding blocks. The historical coding model list has a maximum length K and is a first-in-first-out list. That is, the transformation model added first is at the bottom of the list, and the transformation model added last is at the top of the list. After the encoding of a certain IBC or IntraTMP block is completed, if there is an available transformation model, the transformation model can be added to the historical list. When adding, it is determined whether there is an identical model in the list. If so, the duplicate model in the historical list is first removed. After that, the model is added to the top of the historical list. If the historical list reaches the maximum length when adding, the model at the bottom is removed first and then the current model is added. When subsequently constructing a candidate transformation model list and adding historical transformation models, each transformation model in the historical transformation model list is tried to be added in order from top to bottom.
[0305] In some embodiments of the present application, when the size of the block corresponding to the historical transformation model to be added meets a second preset size, the historical transformation model list is updated based on the historical transformation model.
[0306] That is, the historical transformation model to be added is added to the historical transformation model list only when the size of the block corresponding to the historical transformation model to be added meets a certain predefined size limit.
[0307] In some embodiments of the present application, after decoding the second syntax element when the value of the third syntax element is the first value, decoding the fifth syntax element when the value of the third syntax element is the second value; the fifth syntax element is used to indicate the index of the local compensation model when using the multi-mode local compensation technology;
[0308] determining a sixth transformation model based on the fifth syntax element;
[0309] Based on the reference block and the sixth transform model, a prediction block of the current block is determined.
[0310] or,
[0311] When the value of the third syntax element is the second value, after decoding the second syntax element, when the value of the third syntax element is the first value, decoding the fifth syntax element; the fifth syntax element is used to indicate the index of the local compensation model when using the multi-mode local compensation technology;
[0312] determining a sixth transformation model based on the fifth syntax element;
[0313] Based on the reference block and the sixth transform model, a prediction block of the current block is determined.
[0314] Among them, the fifth syntax element can be represented by cu_ibc_lic_idc.
[0315] For example, if(!pu_merge_flag)
[0316] Where cu_ibc_lic_idc represents the index of the IBC-LIC sub-method under the multi-mode IBC-LIC technology. Or,
[0317] cu_ibc_lic_idc indicates the index of the LIC sub-method under the multi-mode IBC-LIC.
[0318] It is understood that the transform model list contains multiple transform models. During the encoding process for each block, a different transform model can be selected each time. This increases prediction diversity and allows for a customized transform method to be selected for each block, rather than using a unified preset transform model for the same transform process. This improves decoding performance. When the transform model list is not used for transformation, the LIC transform model or the multi-mode IBC-LIC can also be used to implement the transform process to ensure decoding efficiency.
[0319] In some embodiments of the present application, an optional decoding method is provided. The method may include:
[0320] S301, decoding a first syntax element;
[0321] In the embodiment of the present application, the decoding process of S201 is consistent with the process in the aforementioned embodiment and will not be repeated here.
[0322] S302: When the value of the first syntax element is a second value, determine that the prediction mode of the current block using the intra block copy technology is a merge mode, and decode the second syntax element;
[0323] It should be noted that when the first syntax element is represented by pu_merge_flag, indicating that the prediction mode is the merge model, then when the decoder decodes pu_merge_flag to the second value (true), the decoder can determine that the current block uses the optimized merge mode. At this time, the decoder continues to parse the bitstream and can decode the second syntax element.
[0324] S303: When the value of the second syntax element is the second value, indicating that the current block is predicted using the transform model list, decoding the fourth syntax element (cu_ibc_model_merge_idx), determining the index information of the transform model, and skipping the process of the current block inheriting the local compensation flag from the merge candidate block; the fourth syntax element is used to indicate the model index of the transform model in the transform model list; the related syntax element information further includes: a fourth syntax element;
[0325] S304: Determine a first transformation model in the constructed transformation model list based on the index information of the transformation model.
[0326] S305 : Determine a prediction block for the current block based on the reference block and the first transformation model.
[0327] In the embodiment of the present application, the decoding process of S303-S305 is consistent with the process of S204-S206 in the aforementioned embodiment, and will not be repeated here.
[0328] Exemplarily, in IBC-Merge mode, a list of transform model candidates is constructed for the current coding block, and the prediction mode and transform model of the current coding block are determined by writing the block-level mode flags (first syntax element, second syntax element) and candidate indexes (fourth syntax element) of the bitstream.
[0329] The syntax elements are as follows:
[0330] if(pu_merge_flag)
[0331] {cu_ibc_lic_flag
[0332] cu_ibc_model_merge_flag
[0333] if(cu_ibc_model_merge_flag){
[0334] cu_ibc_model_merge_idx
[0335] }
[0336] }
[0337] If cu_ibc_model_merge_flag is true, the reference block is transformed according to the transformation model selected by cu_ibc_mdel_merge_idx. The decoding process is the same as the above embodiment.
[0338] In some embodiments of the present application, the process of the decoder determining the prediction block of the current block based on the reference block and the first transform model is as follows:
[0339] Using the first transformation model, predicting the reference block template of the current block to determine predicted values of pixels of the reference block template;
[0340] Determine the total error between the predicted value of each pixel and the pixels of the current block template;
[0341] Based on the total error value, averaging each pixel to obtain a first offset value;
[0342] The reference block is transformed using the first transformation model, and the first offset value is compensated in the transformation result corresponding to each pixel to obtain a prediction block of the current block; or, the first offset value is used to compensate the parameters in the first transformation model to obtain an updated first transformation model, and then the updated first transformation model is used to transform the reference block.
[0343] It should be noted that, assuming that the first transformation model is an LIC model or a multi-mode LIC, compensating the parameters in the first transformation model using the first offset value compensates for β in the transformation model, thereby obtaining an updated first transformation model with updated β.
[0344] It should be noted that before using the first transformation model in the transformation model list, an offset value can be calculated based on the pixel values of the current block and the reference block template area (matching template) to adjust the predicted value, for example:
[0345] Assuming that the matching template contains N pixels, the template prediction PredL part of each pixel is calculated based on the reference block template, and the total difference totalDiff and offset offset between the template prediction and the current block template pixel Rec are calculated, as shown in formulas (28) and (29): totalDiff = ∑(Rec-Pred) (28) offset = totalDiff / N (29)
[0346] The final prediction value can be the transformed prediction value plus the offset block. For example, if LIC transformation is used, it can be expressed as formula (30): Pred(x,y)=α·ref(x,y)+β+offset (30)
[0347] In the embodiment of the present application, the calculation in the embodiment of the present application can be implemented by integer-based addition, multiplication and shift operations (rounding can be performed during shift operations), and the embodiment of the present application does not limit this.
[0348] In some embodiments of the present application, when the first transformation model is a local compensation model, pixel values of a first reconstructed region adjacent to the current coding block and pixel values of a second reconstructed region adjacent to the reference block are obtained; a first parameter (α) of the local compensation model is derived based on the pixel values of the first reconstructed region and the second reconstructed region, and its second parameter (β) is determined from the first parameter; the original first parameter and the second parameter of the local compensation model are used to determine a third transformation model; the reference block is transformed using the third transformation model to obtain a prediction block for the current block. (Implicitly, offest = 0)
[0349] It should be noted that the offset calculation method can use the parameter derivation method of the LIC technology (deriving α and β based on the template area, first deriving α based on the minimum error, and then deriving β based on α and the pixel values within the area). In other words, the LIC technology can deduce α and β. When used to calculate the offset, α is obtained from the selected transformation model (inheriting α), and β uses the calculated β. This way, the calculated offest is bias-free and can be considered offest = 0.
[0350] In some embodiments of the present application, when the second syntax element corresponding to the merge candidate block of the current block is predicted using the transform model list (ie, the referenced cu_ibc_model_merge_flag is true), the local compensation flag (LIC flag) of the current block is determined to be a second value.
[0351] It should be noted that when the IBC coding block constructs the Merge list, it refers to a certain position PU to construct the merge candidate. If the cu_ibc_model_merge_flag of the PU is true, the next block, such as the next block on the right, can set the LIC flag of the merge candidate to true and serve as the candidate for the Merge list of the next block.
[0352] Then, the decoder determines the prediction block of the current block based on the reference block and the first transform model by performing a secondary transform on the reference block using the first transform model and the locally compensated transform model indicated by the local compensation flag to determine the prediction block of the current block. Alternatively, the decoder transforms the reference block based on the locally compensated transform model derived from the current block template and the reference block template to determine the prediction block of the current block.
[0353] It should be noted that if the LIC flag is true and cu_ibc_model_merge_flag is also true, the two transforms can be performed simultaneously, in any order. If the IBC block selects the merge candidate, the LIC flag of the block is true, and the LIC transform should be performed on the reference block, with the linear parameters derived from the current block template and the reference block template.
[0354] In some embodiments of the present application, when the second syntax element corresponding to the merge candidate block of the current block is predicted using the transform model list (ie, the referenced cu_ibc_model_merge_flag is true), the local compensation flag (LIC flag) of the current block is determined to be a first value.
[0355] It should be noted that when the reference cu_ibc_model_merge_flag is true, the specific value of the local compensation flag of the current block may be set to more than one value, and this embodiment of the present application does not impose any limitation thereto.
[0356] When constructing a merge list for an IBC coding block, the merge candidate is constructed by referencing a specific PU. The cu_ibc_model_merge_flag of that PU can be ignored. That is, whether the merge candidate undergoes LIC transformation is not determined based on the cu_ibc_model_merge_flag of that PU. Whether the subsequent blocks undergo codec transformation is independent of the cu_ibc_model_merge_flag. That is, if the cu_ibc_model_merge_flag is true, the LIC flag of that merge candidate can be set to false.
[0357] Based on the description of the above embodiment, in the embodiment of the present application, the decoder may further decode the second syntax element according to the decoded information during the process of decoding the second syntax element, wherein the decoded information includes at least one of the following:
[0358] The size of the current block, the CIIP flag, GPM flag, MBVD flag, skip flag and TM_merge flag of the current block.
[0359] In some embodiments of the present application, when the decoded information satisfies the first decoding condition, decoding the second syntax element;
[0360] The first decoding condition includes at least one of the following:
[0361] The value of the CIIP flag is the first value (false);
[0362] The value of the GPM flag is the first value (false);
[0363] MBVD flag is the first value (false);
[0364] The skip flag is the first value (false);
[0365] The TM_merge flag is the first value;
[0366] The size of the current block is smaller than the third preset size;
[0367] The area of the current block is greater than a first preset area threshold.
[0368] For example, the cu_ibc_model_merge_flag flag can be determined based on existing codec information, such as the width and height of the current block, and only when the size meets certain limits. If the conditions are not met, cu_ibc_model_merge_flag is false and cu_ibc_model_merge_idx is not decoded. For example, the CIIP flag, GPM flag, MBVD flag, TM_merge flag, and skip flag of the current block may be used.
[0369] According to the width, height and size of the current block, the decoding method flag of the current block, etc. For example, the decoding process can be:
[0370] The IBC-AMVP mode and the IBC-Merge mode may have different conditions for determining whether to decode the cu_ibc_model_merge_flag, which are not limited in this embodiment of the present application. Furthermore, the corresponding transform model list size, index length, index encoding method, etc. used in these two modes may also be different or the same, which are not limited in this embodiment of the present application.
[0371] It should be noted that whether to decode cu_ibc_model_merge_flag may depend on other decoded mode flags, which is not limited in this embodiment of the present application.
[0372] In some embodiments of the present application, when at least one of a sequence-level syntax element, a frame-level syntax element, a slice-level syntax element, and a size of a current block satisfies a second decoding condition, a second syntax element is decoded.
[0373] It should be noted that whether to decode cu_ibc_model_merge_flag and cu_ibc_model_merge_idx can be determined based on conditions such as frame level, slice level flags, block size, etc.
[0374] For example, if there is a sequence-level flag sps_ibc_model_merge_enable_flag, the decoding process may be:
[0375] In some embodiments of the present application, a reference block of the current block is determined, and at least one prediction based on intra-frame block copy technology-intra-frame / inter-frame joint prediction, intra-frame block copy technology-geometric partitioning mode and intra-frame block copy technology-reconstruction value reordering is performed to obtain a reference prediction block of the reference block; and the reference prediction block is used to update the reference block.
[0376] It should be noted that the aforementioned reference block may also be a prediction block obtained by technologies such as IBC-CIIP, IBC-GPM, and RRIBC.
[0377] In some embodiments of the present application, when the first transformation model is a local compensation model using multi-mode local compensation technology, the update parameters of the multi-mode local compensation model are recalculated based on the current block template and the reference block template; and the first transformation model is updated based on the updated parameters.
[0378] It should be noted that when the selected transformation model candidate is a multi-model candidate, the threshold can be recalculated based on the templates of the current block and the reference block. The threshold in the transformation model list is already there, but it can also be recalculated and used to transform the reference block.
[0379] In some embodiments of the present application, many decoding methods may be used to decode the second syntax element, which is not limited by the present embodiment.
[0380] Determine a first context model from at least one context model according to decoding information of adjacent blocks; decode a second syntax element based on the first context model; or decode the second syntax element using an equal probability decoding method.
[0381] It should be noted that cu_ibc_model_merge_flag can use multiple context models for joint encoding and decoding, select a context model based on the encoding and decoding information of adjacent blocks, or use equal probability encoding and decoding.
[0382] In some embodiments of the present application, decoding the fourth syntax element and determining index information of the transformation model includes at least one of the following:
[0383] Decoding the fourth syntax element using an equal probability decoding method to determine index information of the transformation model;
[0384] Decoding the fourth syntax element using the decoding method of the second context model to determine index information of the transformation model;
[0385] The fourth syntax element is decoded by partially adopting a decoding method of the second context model and partially adopting an equal probability decoding method to determine index information of the transformation model.
[0386] It should be noted that each bit of cu_ibc_model_merge_idx can use context model encoding and decoding, or use equal probability encoding and decoding, or use context model encoding and decoding partially and equal probability encoding and decoding partially.
[0387] In some embodiments of the present application, when the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode, the relationship between the first context model for decoding the second syntax element information and the first context model for decoding the second syntax element information when the prediction mode of the current block using the intra block copy technology is the merge mode includes: the same or different.
[0388] In some embodiments of the present application, when the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode, the relationship between the second context model for decoding the fourth syntax element information and the second context model for decoding the fourth syntax element information when the prediction mode of the current block using the intra block copy technology is the merge mode includes: the same or different.
[0389] It should be noted that cu_ibc_model_merge_flag and cu_ibc_model_merge_idx in IBC-AMVP mode and IBC-Merge mode can use different context models for encoding and decoding, or they can use the same context model for encoding and decoding. For example, the same context model can be used to encode and decode cu_ibc_model_merge_flag or cu_ibc_model_merge_idx.
[0390] In IBC-AMVP or IBC-Merge mode, cu_ibc_model_merge_flag can use multiple context models for encoding and decoding, and the context model to be used is selected based on the encoded and decoded information of the adjacent blocks. For example, if three context models are used, if cu_ibc_model_merge_flag is true for both the left block and the upper block, context model 1 is used; if only cu_ibc_model_merge_flag is true for either the left block or the upper block, context model 2 is used; otherwise, context model 3 is used, etc. This embodiment of the application does not limit this.
[0391] It should be noted that the context models used in the IBC-AMVP or IBC-Merge mode may be the same or different.
[0392] In some embodiments of the present application, an optional decoding method is provided. The method may include:
[0393] S401. Obtain a sixth syntax element of a reference block of a current block, where the sixth syntax element is used to indicate index information of the reference block.
[0394] S402: Determine, based on the sixth syntax element, a reference block obtained by using an intra block copy technique for the current block;
[0395] During decoding, when determining the reference block, the decoder can also decode and obtain the sixth syntax element of the reference block of the current block. The sixth syntax element indicates the index information of the reference block. The decoder can then use this sixth syntax element to determine the reference block obtained using intra block copy technology in the merge list for the current block.
[0396] In this embodiment of the present application, the decoder can determine the reference block of the IBC based on the IBC-Merge related elements. For example, a merge list is constructed for the current block, a merge candidate is determined based on the merge index, and information such as the block vector and block vector accuracy of the current block is obtained, thereby obtaining the reference block of the current block through motion compensation.
[0397] S403: Obtain the second syntax element of the merge candidate of the current block;
[0398] S404: When the value of the second syntax element of the merge candidate block is the second value, determine that the second syntax element of the current block is the second value;
[0399] S405 : Determine a first transformation model for the current block based on a reference transformation model corresponding to the merged candidate block.
[0400] The decoder obtains the second syntax element of the merge candidate block from the reference information source corresponding to the reference block, that is, the cu_ibc_model_merge_flag of the decoded merge candidate block. If the cu_ibc_model_merge_flag of the merge candidate block of the current block is true, then the cu_ibc_model_merge_flag of the current block can be directly set to true, and the first transform model of the current block can be determined according to the transform model of the reference corresponding to the merge candidate block, without parsing the second syntax element of the current block from the code stream, thereby reducing the transmission codewords.
[0401] It should be noted that when constructing the Merge list, a merge candidate is constructed with reference to a certain position PU. If the cu_ibc_model_merge_flag of the candidate PU is true, the cu_ibc_model_merge_flag of the current coding block is set to true, and the transformation model of the PU is set to the transformation model of the current coding block.
[0402] Exemplarily, in IBC-Merge mode, a transform model candidate list is constructed for the current block, and the prediction mode and transform model of the current block are determined based on the encoding and decoding information of the Merge candidate. There is no need to encode cu_ibc_model_merge_flag or cu_ibc_model_merge_idx, that is, cu_ibc_model_merge_flag is not transmitted.
[0403] In some embodiments of the present application, determining the first transform model of the current block based on the reference transform model corresponding to the merge candidate block includes at least one of the following:
[0404] The reference transformation model is used as the first transformation model.
[0405] A first transformation model type of a reference transformation model is determined; and a first transformation model consistent with the first transformation type is re-derived according to the reference block template and the current block template.
[0406] Obtain a flip reference block flag of the merge candidate block; when the flip reference block flag takes a second value, determine a first transformation model of the current block based on a reference transformation model corresponding to the reference block.
[0407] It should be noted that when implicitly inheriting the reference transform model, you can only inherit the type of the reference transform model, and re-derive the model parameters based on the template during actual prediction. Alternatively, when implicitly inheriting cu_ibc_model_merge_flag and the reference transform model, you can determine whether to inherit based on the encoding information of other block-level coding information Merge candidates. For example, if the flip reference block flag of the PU is not 0, the cu_ibc_model_merge_flag and the transform model are not inherited. On the contrary, if it is 0, it is inherited.
[0408] S406: Determine a prediction block for the current block based on the reference block and the first transformation model.
[0409] In the embodiment of the present application, the decoding process of S406 is consistent with the process of S206 in the aforementioned embodiment and will not be repeated here.
[0410] It should be noted that, according to the cu_ibc_model_merge_flag flag of the merge candidate, it is determined whether the current block transforms the reference block. If cu_ibc_model_merge_flag is true, the first transformation model is used to calculate the offset value offset based on the reference pixels of the current block and the reference block template area, and the reference block of the current block is transformed to obtain the final prediction block, thereby completing the encoding and decoding of the current block.
[0411] In some embodiments of the present application, the historical transformation model list is updated based on the first transformation model.
[0412] In an embodiment of the present application, the first transformation model used by the current block is saved and added to the historical transformation model list for use in constructing the transformation model list of subsequent blocks.
[0413] In some embodiments of the present application, when the second syntax element of the current block is the first value, or when the second syntax element of the merge candidate block of the current block is the first value, determining the prediction block of the current block based on the reference block;
[0414] Determining a reconstructed pixel value of the current block based on the prediction block of the current block;
[0415] Based on the reconstructed pixel values of the current block, a fifth transform model of the current block is constructed in the template area or within the block for use in a subsequent decoding process.
[0416] It should be noted that the second syntax element of the current block is the first value, indicating that the prediction method of the transform model list is not applicable. The second syntax element of the merge candidate block of the current block is the first value, indicating that the second syntax element is the first value. In this case, one implementation indicates that the reference block is not processed using the transform technology. In this case, the decoder can determine the prediction block for the current block based on the reference block.
[0417] For all encoded IBC / IntraTMP blocks (or those using non-reference block transforms), a transformation model is derived based on the reconstructed pixel values (template area or within the block) after encoding and decoding, which is used for the subsequent transformation model list construction and inheritance of the method of this application. When the encoded and decoded IBC block is not transformed, a corresponding transformation model is also constructed. When the encoded and decoded block is used as a reference block, it can be inherited by subsequent blocks.
[0418] Based on the above embodiments, in some embodiments of the present application, the decoding method further includes:
[0419] After determining a prediction block of the current block based on the reference block and the first transformation model, the method further includes:
[0420] Determining a reconstructed pixel value of the current block based on the prediction block of the current block;
[0421] constructing a seventh transformation model of the current block in the template region or within the block based on the reconstructed pixel values of the current block;
[0422] The seventh transformation model is used to replace the first transformation model, and the transformation model list is updated; or,
[0423] Adopting the transformation model with the smallest error value between the seventh transformation model and the first transformation model to update the transformation model list; or,
[0424] The seventh transformation model is adopted and the transformation model list is updated.
[0425] It should be noted that for IBC / IntraTMP using reference block transforms, a transformation model is derived within the template region or block for subsequent transformation model list construction and inheritance in the present method. A new transformation model (the type of which can be the same as the original one) can be derived based on the reconstructed value of the current code block (intra-block region or template region) and directly replace the first transformation model used in the prediction process (updating the model in the transformation model list). Alternatively, the error value, such as SAD, can be used to determine whether to replace the existing transformation model in the transformation model list, retaining the model with the smallest error, or retaining both models.
[0426] It should be noted that the decoding method provided in this application can be implemented based on inter-frame prediction or IntraTMP prediction, that is, the IBC coding block in the scheme is replaced by the Inter coding block or the IntraTMP coding block, and the embodiments of this application are not limited thereto.
[0427] In one embodiment of the present application, referring to FIG12 , a schematic flow chart of an encoding method provided by an embodiment of the present application is shown. As shown in FIG12 , the method may include:
[0428] S501, determining a candidate block vector list for the current block;
[0429] S502, determining a reference block vector based on the candidate block vector list;
[0430] S503, determining a reference block based on the reference block vector;
[0431] S504: when it is determined that the prediction mode of the current block is the intra block copy technology combined with the transformation model list for prediction, obtain a first transformation model from the constructed transformation model list; the constructed transformation model list includes at least two types of transformation models;
[0432] S505: Determine a prediction block for the current block based on the reference block and the first transformation model;
[0433] S506 , encode relevant syntax elements of the current block, and write the obtained coded bits into the bitstream; wherein the relevant syntax elements are used to indicate whether the current block is predicted using the intra-block copy technology combined with the transform model list.
[0434] The relevant syntax elements include at least: a second syntax element (cu_ibc_model_merge_flag);
[0435] The second syntax element is used to indicate whether the current block is predicted using a transform model list;
[0436] The related syntax elements further include: a first syntax element (pu_merge_flag), wherein the first syntax element is used to indicate a prediction mode of the current block using an intra block copy technology.
[0437] In one embodiment of the present application, the prediction modes of the intra block copy technology include: a merge mode and an optimized motion vector prediction mode; the method further includes:
[0438] When the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode, encoding the value of the first syntax element as a first value, and encoding a third syntax element; the third syntax element is used to indicate whether a transform technology is used for prediction; the third syntax element belongs to the related syntax element;
[0439] When the value of the third syntax element is the second value (true), encode the second syntax element; or
[0440] encoding the value of the third syntax element as the first value (false) and encoding the second syntax element; or
[0441] When the value of the first syntax element is encoded as a first value, encoding a second syntax element;
[0442] When the value of the second syntax element is the first value, the third syntax element is encoded.
[0443] In one embodiment of the present application, the method further includes:
[0444] When the prediction mode of the current block using the intra block copy technology is the merge mode, the value of the first syntax element is encoded as the second value, and the second syntax element is encoded.
[0445] In one embodiment of the present application, the method further includes:
[0446] When the current block is predicted using a transformation model list, the second syntax element is encoded as a second value, and the index information of the first transformation model in the transformation model list is encoded as a fourth syntax element; the fourth syntax element is used to indicate the model index of the transformation model in the transformation model list; the related syntax element information also includes: the fourth syntax element.
[0447] In one embodiment of the present application, the method further includes:
[0448] When the current block is predicted using the transformation model list, the transformation model list is constructed.
[0449] In one embodiment of the present application, constructing the transformation model list includes:
[0450] adding at least one different transformation model to the initial transformation model list in sequence to obtain the transformation model list;
[0451] The at least one transformation model includes at least one of the following:
[0452] a second transformation model corresponding to pixels at at least one adjacent position of the current block;
[0453] a third transformation model corresponding to at least one non-adjacent pixel of the current block;
[0454] The fourth transformation model used in the historical encoding process;
[0455] Available transformation models in the time domain;
[0456] The preset transformation model.
[0457] In one embodiment of the present application, the preset transformation model includes: a model corresponding to the preset model parameters or a model obtained by offsetting at least one of the second transformation model, the third transformation model and the fourth transformation model, the model corresponding to the preset model parameters and the available transformation model in the time domain.
[0458] In one embodiment of the present application, the method further includes:
[0459] For a pixel at any adjacent position of the current block or a pixel at any non-adjacent position of the current block, if the pixel satisfies a transformation condition, a second transformation model corresponding to the adjacent position of the current block is obtained, or a third transformation model corresponding to the pixel at any non-adjacent position of the current block is obtained; wherein the transformation condition includes at least one of the following:
[0460] The block where the pixel is located uses the intra-block copy technology, the transformation model flag is valid, and the size of the block where the pixel is located meets the first preset size.
[0461] In one embodiment of the present application, the at least one different transformation model includes at least one of the following: the at least one transformation model has a different transformation type, has different model parameters, and uses different template areas under the same transformation type.
[0462] In one embodiment of the present application, sequentially adding at least one different transformation model to the initial transformation model list to obtain the transformation model list includes:
[0463] Sequentially adding at least one different transformation model to the initial transformation model list to obtain an intermediate transformation model list;
[0464] The intermediate transformation model list is reordered to obtain the transformation model list.
[0465] In one embodiment of the present application, reordering the intermediate transformation model list to obtain the transformation model list includes:
[0466] Traversing each transformation model in the intermediate transformation model list, and determining an offset value (offset) of each transformation model;
[0467] Using each of the transformation models, respectively predicting the reference block template, and determining the reference block template prediction of each transformation model;
[0468] determining an error value between the reference block template prediction and the current block template for each transformation model;
[0469] Determining template error values of the respective transformation models based on the error value of each transformation model and its corresponding offset value;
[0470] The transformation models are reordered according to the template error values of the transformation models to obtain the transformation model list.
[0471] In one embodiment of the present application, the template error values of the transformation models are arranged from small to large, and the index information of the corresponding transformation model list is arranged from small to large.
[0472] In one embodiment of the present application, when the reference block template is unavailable, the error value is determined to be a maximum value.
[0473] In one embodiment of the present application, first position information (upper left corner coordinates) of the current block and the current size of the current block are obtained;
[0474] At least one adjacent position of the current block and at least one non-adjacent position of the current block are determined based on the first position information and the current size.
[0475] In one embodiment of the present application, a historical transformation model to be used in the encoding process is obtained;
[0476] When the historical transformation model and the historical transformation model list have the same model, the same model in the historical transformation model list is removed, and the historical transformation model is added to the first order position in the historical transformation model list;
[0477] When the historical transformation model does not have the same model as that in the historical transformation model list, the historical transformation model is added to the first order position in the historical transformation model list.
[0478] In one embodiment of the present application, the adding the historical transformation model to the first order position of the historical transformation model list includes:
[0479] When the historical transformation model list meets a first preset list length, after removing the transformation model at the last order in the historical transformation model list, the historical transformation model is added to the first order in the historical transformation model list.
[0480] In one embodiment of the present application, the fourth transformation model is determined sequentially from the historical transformation models in order from the first order digit to the last order digit of the historical transformation models.
[0481] In an embodiment of the present application, when the size of the block corresponding to the historical transformation model to be added meets a second preset size, the historical transformation model list is updated based on the historical transformation model.
[0482] In one embodiment of the present application, determining a prediction block of the current block based on the reference block and the first transformation model includes:
[0483] Using the first transformation model, predicting the reference block template of the current block to determine predicted values of pixels of the reference block template;
[0484] Determine the total error between the predicted value of each pixel and the pixels of the current block template;
[0485] Based on the total error value, averaging each pixel to obtain a first offset value;
[0486] The reference block is transformed using the first transformation model, and the first offset value is compensated in the transformation result corresponding to each pixel to obtain a prediction block of the current block; or, the parameters in the first transformation model are compensated using the first offset value to obtain an updated first transformation model, and the updated first transformation model is then used to transform the reference block.
[0487] In one embodiment of the present application, when the second syntax element corresponding to the merge candidate block of the current block is predicted using the transform model list (that is, the reference cu_ibc_model_merge_flag is true), the local compensation flag (LIC flag) of the current block is determined to be a second value;
[0488] The determining, based on the reference block and the first transform model, a prediction block of the current block includes:
[0489] The first transform model and the locally compensated transform model indicated by the local compensation flag are used to sequentially perform a secondary transform on the reference block to determine a prediction block for the current block. Alternatively, the reference block is transformed based on a locally compensated transform model derived from a current block template and a reference block template to determine a prediction block for the current block.
[0490] In one embodiment of the present application, encoding the second syntax element includes:
[0491] Encode the second syntax element according to the encoded information, where the encoded information includes at least one of the following:
[0492] The size of the current block, the CIIP flag, GPM flag, MBVD flag, skip flag and TM_merge flag of the current block.
[0493] In one embodiment of the present application, encoding the second syntax element according to the encoded information includes:
[0494] When the encoded information satisfies a first encoding condition, encoding the second syntax element;
[0495] The first encoding condition includes at least one of the following:
[0496] The value of the CIIP flag is the first value (false);
[0497] The value of the GPM flag is the first value (false);
[0498] The MBVD flag is a first value (false);
[0499] The skip flag is a first value (false);
[0500] The TM_merge flag is a first value;
[0501] The size of the current block is smaller than a third preset size;
[0502] The area of the current block is greater than a first preset area threshold.
[0503] In one embodiment of the present application, each transformation model of a different transformation type corresponds to a different reference block template area;
[0504] The error value of each transformation model is an average template error value of the number of pixels in the respective reference block template.
[0505] In one embodiment of the present application, when the current block is predicted using a transform technique and a non-transform model list, a sixth transform model is determined;
[0506] Determining a prediction block of a current block based on the reference block and the sixth transformation model;
[0507] The third syntax element is encoded as the first value or the second value, and a fifth syntax element is encoded; the fifth syntax element is used to indicate an index of a local compensation model when a multi-mode local compensation technology is used.
[0508] In one embodiment of the present application, when the second syntax element corresponding to the merge candidate block of the current block is predicted using a transform model list (ie, the referenced cu_ibc_model_merge_flag is true), the local compensation flag (LIC flag) of the current block is determined to be a first value.
[0509] In one embodiment of the present application, encoding the second syntax element includes:
[0510] When at least one of a sequence-level syntax element, a frame-level syntax element, a slice-level syntax element, and a size of a current block satisfies a second coding condition, the second syntax element is encoded.
[0511] In one embodiment of the present application, if the first transformation model is at least one other transformation model indicated in the transformation model list, the fourth syntax element is encoded as a third value, where the other transformation model is a transformation method corresponding to other reference blocks.
[0512] In one embodiment of the present application, constructing the transformation model list includes:
[0513] The derived local compensation model is obtained, and the local compensation model is added to the transformation model list.
[0514] In one embodiment of the present application, a reference block of the current block is determined to be predicted by performing at least one prediction based on an intra block copy technology-intra / inter joint prediction, an intra block copy technology-geometric partitioning mode, and an intra block copy technology-reconstructed value reordering to obtain a reference prediction block of the reference block;
[0515] The reference block is updated using the reference prediction block.
[0516] In one embodiment of the present application, when the first transformation model is a local compensation model using a multi-mode local compensation technology, update parameters of the multi-mode local compensation model are recalculated based on the current block template and the reference block template;
[0517] Based on the update parameters, the first transformation model is updated.
[0518] In one embodiment of the present application, encoding the second syntax element includes:
[0519] Determining a first context model from at least one context model according to encoding information of adjacent blocks;
[0520] encoding the second syntax element based on the first context model; or
[0521] The second syntax element is encoded using an equal probability coding method.
[0522] In one embodiment of the present application, encoding the index information of the first transformation model in the transformation model list as a fourth syntax element includes at least one of the following:
[0523] Encoding the index information of the first transformation model in the transformation model list as a fourth syntax element using an equal probability coding method;
[0524] Encoding the index information of the first transformation model in the transformation model list as a fourth syntax element using an encoding method of the second context model;
[0525] The index information of the first transformation model in the transformation model list is encoded as a fourth syntax element by partially adopting the encoding method of the second context model and combining it with partially adopting the equal probability encoding method.
[0526] In one embodiment of the present application, when the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode, the relationship between the first context model for encoding the second syntax element information and the first context model for encoding the second syntax element information when the prediction mode of the current block using the intra block copy technology is the merge mode includes: the same or different.
[0527] In one embodiment of the present application, when the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode, the relationship between the second context model for encoding the fourth syntax element information and the second context model for encoding the fourth syntax element information when the prediction mode of the current block using the intra block copy technology is the merge mode includes: the same or different.
[0528] In one embodiment of the present application, index information of a reference block is determined, and the index information of the reference block is encoded as a sixth syntax element, where the sixth syntax element is used to indicate the index information of the reference block.
[0529] In one embodiment of the present application, after determining the reference block based on the reference block vector, the method further includes:
[0530] Obtaining a second syntax element of the reference block;
[0531] When the value of the second syntax element of the merging candidate block of the current block is the second value, determining that the second syntax element of the current block is the second value;
[0532] Based on the reference transformation model corresponding to the merging candidate block, a first transformation model of the current block is determined.
[0533] In one embodiment of the present application, determining the first transformation model of the current block based on the reference transformation model corresponding to the merging candidate block includes:
[0534] The reference transformation model is used as the first transformation model.
[0535] In one embodiment of the present application, determining the first transformation model of the current block based on the reference transformation model corresponding to the merging candidate block includes:
[0536] determining a first transformation model type of the reference transformation model;
[0537] The first transform model consistent with the first transform type is re-derived according to the reference block template and the current block template.
[0538] In one embodiment of the present application, determining the first transformation model of the current block based on the reference transformation model corresponding to the merging candidate block includes:
[0539] Obtain the flip reference block flag of the merge candidate block;
[0540] When the value of the flip reference block flag is the second value, the first transformation model of the current block is determined based on the reference transformation model corresponding to the merge candidate block.
[0541] In one embodiment of the present application, the method further includes:
[0542] When the second syntax element of the current block is a first value, or when the second syntax element of the merge candidate block of the current block is a first value, determining a prediction block of the current block based on the reference block;
[0543] Determining a reconstructed pixel value of the current block based on the prediction block of the current block;
[0544] Based on the reconstructed pixel values of the current block and the reconstructed pixel values of the reference block, a fifth transform model of the current block is constructed in the template area or within the block for use in subsequent encoding processes.
[0545] In one embodiment of the present application, after determining the prediction block of the current block based on the reference block and the first transformation model, the method further includes:
[0546] Determining a reconstructed pixel value of the current block based on the prediction block of the current block;
[0547] constructing a seventh transformation model of the current block in the template region or within the block based on the reconstructed pixel values of the current block and the reconstructed pixel values of the reference block;
[0548] using the seventh transformation model to replace the first transformation model and updating the transformation model list; or,
[0549] Adopting the transformation model with the smallest error value between the seventh transformation model and the first transformation model to update the transformation model list; or,
[0550] The seventh transformation model is adopted to update the transformation model list.
[0551] In one embodiment of the present application, the method further includes:
[0552] When the first transformation model is a local compensation model, obtaining pixel values of a first reconstructed region adjacent to the current coding block and pixel values of a second reconstructed region adjacent to the reference block;
[0553] Derived a first parameter (α) of the local compensation model based on the first reconstructed region pixel value and the second reconstructed region pixel value, and determined a second parameter (β) thereof from the first parameter;
[0554] Determine a third transformation model using the original first parameter of the local compensation model and the second parameter;
[0555] The reference block is transformed using the third transformation model to obtain a prediction block of the current block. (Implicitly, offest=0)
[0556] In an embodiment of the present application, the prediction type of the blocks corresponding to the second transformation model, the third transformation model and the fourth transformation model included in the transformation model list is any one of intra template matching prediction and intra block copy technology.
[0557] In one embodiment of the present application, the historical transformation model list is updated based on the first transformation model.
[0558] In one embodiment of the present application, when it is determined that the prediction mode of the current block is prediction using a non-intra block copy technology, the first syntax element is encoded as a first value.
[0559] It is understood that the encoder can select a first transform model from a transform model list including at least two types of transform models; use the selected first transform model to transform the reference block, and then determine the prediction block. Therefore, during the encoding process, the first transform model used to implement the transformation can be selected and determined from the transform model list, which can ensure the diversity of choices, thereby increasing the probability of the prediction process, improving the diversity of prediction, and ultimately improving encoding performance.
[0560] An embodiment of the present application provides a bitstream, wherein the bitstream is generated by bit encoding according to information to be encoded; wherein the information to be encoded includes at least one of the following: a first syntax element, a second syntax element, a third syntax element, a fourth syntax element, a fifth syntax element, a sixth syntax element, a size of a current block, a CIIP flag bit of the current block, a GPM flag bit, an MBVD flag bit, a skip flag bit, a TM_merge flag bit, and a context model; wherein,
[0561] The first syntax element is used to indicate a prediction mode using an intra block copy technology for the current block;
[0562] The second syntax element is used to indicate whether the current block is predicted using a transform model list;
[0563] The third syntax element is used to indicate whether to use a transform technique for prediction;
[0564] The fourth syntax element is used to indicate the model index of the transformation model in the transformation model list;
[0565] The fifth syntax element is used to indicate the index of the local compensation model when using the multi-mode local compensation technology;
[0566] The sixth syntax element is used to indicate index information of a reference block.
[0567] As shown in FIG13 , an embodiment of the present application provides a decoder 1, comprising:
[0568] The decoding part 11 is configured to obtain relevant syntax elements of the current block; wherein the relevant syntax elements are used to indicate whether the current block is predicted using an intra-block copy technology combined with a transform model list;
[0569] A first determining part 12 is configured to determine a reference block obtained by using the intra block copy technology for the current block;
[0570] Determining, according to the relevant syntax elements, a first transformation model obtained based on a constructed transformation model list; the constructed transformation model list includes at least two types of transformation models;
[0571] The first prediction part 13 is configured to determine a prediction block of the current block based on the reference block and the first transform model.
[0572] In some embodiments of the present application, the relevant syntax elements include at least: a second syntax element;
[0573] The second syntax element is used to indicate whether the current block is predicted using a transform model list.
[0574] The related syntax elements further include: a first syntax element; the first syntax element is used to indicate a prediction mode of the current block using an intra block copy technology.
[0575] In some embodiments of the present application, the decoding part 11 is further configured to decode the first syntax element;
[0576] According to the first syntax element, a prediction mode of the current block using the intra block copy technology is determined, and the second syntax element is decoded.
[0577] In some embodiments of the present application, the first determining part 12 is further configured to determine that the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode when the value of the first syntax element is the first value;
[0578] The decoding part 11 is further configured to decode a third syntax element, the third syntax element being used to indicate whether a transform technique is used for prediction; the third syntax element belongs to the related syntax element;
[0579] When the value of the third syntax element is the second value, decoding the second syntax element; or,
[0580] When the value of the third syntax element is the first value, the second syntax element is decoded.
[0581] Alternatively, the first determining part 12 is further configured to, when the value of the first syntax element is the first value, determine that the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode, and the decoding part 11 is further configured to decode the second syntax element;
[0582] When the value of the second syntax element is the first value, a third syntax element is decoded.
[0583] In some embodiments of the present application, the first determination part 12 is further configured to determine that the prediction mode of the current block using the intra-frame block copy technology is a merge mode when the value of the first syntax element is a second value, and the decoding part 11 is further configured to decode the second syntax element.
[0584] In some embodiments of the present application, the decoding part 11 is further configured to, when the value of the second syntax element is the second value, indicate that the current block is predicted using the transformation model list, decode the fourth syntax element, determine the index information of the transformation model, and skip the process of the current block inheriting the local compensation flag from the merging candidate block; the fourth syntax element is used to indicate the model index of the transformation model in the transformation model list; the relevant syntax element information further includes: the fourth syntax element;
[0585] The first determining part 12 is further configured to determine the first transformation model in the constructed transformation model list based on the index information of the transformation model.
[0586] In some embodiments of the present application, the first determining part 12 is further configured to construct the transformation model list when the value of the second syntax element is the second value.
[0587] In some embodiments of the present application, the first determining part 12 is further configured to sequentially add at least one different transformation model to the initial transformation model list to obtain the transformation model list;
[0588] The at least one transformation model includes at least one of the following:
[0589] a second transformation model corresponding to pixels at at least one adjacent position of the current block;
[0590] a third transformation model corresponding to at least one non-adjacent pixel of the current block;
[0591] The fourth transformation model used in the historical decoding process;
[0592] Available transformation models in the time domain;
[0593] The preset transformation model.
[0594] In some embodiments of the present application, the preset transformation model includes: a model corresponding to the preset model parameters or a model obtained by offsetting at least one of the second transformation model, the third transformation model and the fourth transformation model, the model corresponding to the preset model parameters and the available transformation model in the time domain.
[0595] In some embodiments of the present application, the first determining unit 12 is further configured to, for a pixel at any adjacent position of the current block or a pixel at any non-adjacent position of the current block, obtain a second transformation model for the adjacent position of the current block, or obtain a third transformation model corresponding to the pixel at any non-adjacent position of the current block, if the pixel satisfies a transformation condition; wherein the transformation condition includes at least one of the following:
[0596] The block where the pixel is located uses the intra-block copy technology, the transformation model flag is valid, and the size of the block where the pixel is located meets the first preset size.
[0597] In some embodiments of the present application, the at least one different transformation model includes at least one of the following: at least one transformation model has a different transformation type, has different model parameters, and uses different template areas under the same transformation type.
[0598] In some embodiments of the present application, the first determining part 12 is further configured to sequentially add at least one different transformation model to the initial transformation model list to obtain an intermediate transformation model list;
[0599] The intermediate transformation model list is reordered to obtain the transformation model list.
[0600] In some embodiments of the present application, the first determining part 12 is further configured to traverse each transformation model in the intermediate transformation model list to determine an offset value of each transformation model;
[0601] Using each of the transformation models, respectively predicting the reference block template, and determining the reference block template prediction of each transformation model;
[0602] determining an error value between the reference block template prediction and the current block template for each transformation model;
[0603] Determining template error values of the respective transformation models based on the error value of each transformation model and its corresponding offset value;
[0604] The transformation models are reordered according to the template error values of the transformation models to obtain the transformation model list.
[0605] In some embodiments of the present application, the template error values of the respective transformation models are arranged from small to large, and the index information of the corresponding transformation model list is arranged from small to large.
[0606] In some embodiments of the present application, when the reference block template is unavailable, the error value is determined to be a maximum value.
[0607] In some embodiments of the present application, the first determining part 12 is further configured to obtain first position information of the current block and a current size of the current block;
[0608] At least one adjacent position of the current block and at least one non-adjacent position of the current block are determined based on the first position information and the current size.
[0609] In some embodiments of the present application, the first determining part 12 is further configured to obtain a historical transformation model to be used in the decoding process;
[0610] When the historical transformation model and the historical transformation model list have the same model, the same model in the historical transformation model list is removed, and the historical transformation model is added to the first order position in the historical transformation model list;
[0611] When the historical transformation model does not have the same model as that in the historical transformation model list, the historical transformation model is added to the first order position in the historical transformation model list.
[0612] In some embodiments of the present application, the first determining part 12 is further configured to, when the historical transformation model list meets a first preset list length, remove the transformation model in the last order position in the historical transformation model list and then add the historical transformation model to the first order position of the historical transformation model list.
[0613] In some embodiments of the present application, the fourth transformation model is determined sequentially from the historical transformation models in order from the first order bit to the last order bit of the historical transformation models.
[0614] In some embodiments of the present application, when the size of the block corresponding to the historical transformation model to be added meets a second preset size, the historical transformation model list is updated based on the historical transformation model.
[0615] In some embodiments of the present application, the first prediction part 13 is further configured to use the first transformation model to predict the reference block template of the current block and determine the predicted values of the pixels of the reference block template; determine the total error value between the predicted values of each pixel and the pixels of the current block template; average each pixel based on the total error value to obtain a first offset value; use the first transformation model to transform the reference block, and compensate the transformation result corresponding to each pixel with the first offset value to obtain the predicted block of the current block; or, use the first offset value to compensate the parameters in the first transformation model to obtain an updated first transformation model, and then use the updated first transformation model to transform the reference block.
[0616] In some embodiments of the present application, the first determining part 12 is further configured to determine that the local compensation flag of the current block is a second value when the second syntax element corresponding to the merge candidate block of the current block is predicted using the transform model list;
[0617] The first prediction part 13 is further configured to use the first transformation model and the local compensation transformation model indicated by the local compensation flag to perform secondary transformation on the reference block in sequence to determine a prediction block of the current block.
[0618] In some embodiments of the present application, the decoding part 11 is further configured to decode the second syntax element according to decoded information, wherein the decoded information includes at least one of the following:
[0619] The size of the current block, the CIIP flag, GPM flag, MBVD flag, skip flag and TM_merge flag of the current block.
[0620] In some embodiments of the present application, the decoding part 11 is further configured to decode the second syntax element when the decoded information satisfies a first decoding condition;
[0621] The first decoding condition includes at least one of the following:
[0622] The value of the CIIP flag is the first value;
[0623] The value of the GPM flag is a first value;
[0624] The MBVD flag bit is a first value;
[0625] The skip flag is a first value;
[0626] The TM_merge flag is a first value;
[0627] The size of the current block is smaller than a third preset size;
[0628] The area of the current block is greater than a first preset area threshold.
[0629] In some embodiments of the present application, each transformation model of a different transformation type corresponds to a different reference block template area;
[0630] The error value of each transformation model is an average template error value of the number of pixels in the respective reference block template.
[0631] In some embodiments of the present application, the decoding part 11 is further configured to decode the second syntax element after decoding the second syntax element when the value of the third syntax element is the first value, and then decode a fifth syntax element when the value of the third syntax element is the second value; the fifth syntax element is used to indicate an index of a local compensation model when using a multi-mode local compensation technology;
[0632] The first determining part 12 is further configured to determine a sixth transformation model based on the fifth syntax element;
[0633] The first prediction part 13 is further configured to determine a prediction block of the current block based on the reference block and the sixth transformation model.
[0634] In some embodiments of the present application, the first determining part 12 is further configured to determine that the local compensation flag of the current block is a first value when the second syntax element corresponding to the merge candidate block of the current block is predicted using the transformation model list.
[0635] In some embodiments of the present application, the decoding part 11 is further configured to decode the second syntax element when at least one of the sequence-level syntax element, the frame-level syntax element, the slice-level syntax element, and the size of the current block meets the second decoding condition.
[0636] In some embodiments of the present application, the decoding part 11 is further configured to decode the second syntax element after decoding the third syntax element when the value of the third syntax element is the second value, and then decode the fifth syntax element when the value of the third syntax element is the first value; the fifth syntax element is used to indicate the index of the local compensation model when using the multi-mode local compensation technology;
[0637] The first determining part 12 is further configured to determine a sixth transformation model based on the fifth syntax element;
[0638] The first prediction part 13 is further configured to determine a prediction block of the current block based on the reference block and the sixth transformation model.
[0639] In some embodiments of the present application, the first determination part 12 is further configured to indicate at least one other transformation model in the transformation model list if the fourth syntax element of the transformation model is a third value, wherein the other transformation model is a transformation method corresponding to other reference blocks.
[0640] In some embodiments of the present application, the first determining part 12 is further configured to obtain a derived local compensation model and add the local compensation model to the transformation model list.
[0641] In some embodiments of the present application, the first determining part 12 is further configured to determine a reference block of the current block by performing prediction based on at least one of intra block copy technology-intra / inter joint prediction, intra block copy technology-geometric partitioning mode, and intra block copy technology-reconstructed value reordering, to obtain a reference prediction block of the reference block;
[0642] The reference block is updated using the reference prediction block.
[0643] In some embodiments of the present application, the first determining part 12 is further configured to recalculate update parameters of the multi-mode local compensation model based on the current block template and the reference block template when the first transformation model is a local compensation model using the multi-mode local compensation technology;
[0644] Based on the update parameters, the first transformation model is updated.
[0645] In some embodiments of the present application, the decoding part 11 is further configured to determine a first context model from at least one context model based on decoding information of adjacent blocks;
[0646] decoding the second syntax element based on the first context model; or
[0647] The second syntax element is decoded using an equal probability decoding method.
[0648] In some embodiments of the present application, the decoding part 11 is further configured to include at least one of the following:
[0649] Decoding the fourth syntax element using an equal probability decoding method to determine the index information of the transformation model;
[0650] Decoding the fourth syntax element using a decoding method of the second context model to determine the index information of the transformation model;
[0651] The fourth syntax element is decoded by partially adopting a decoding method of the second context model and partially adopting an equal probability decoding method to determine the index information of the transformation model.
[0652] In some embodiments of the present application, when the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode, the relationship between the first context model for decoding the second syntax element information and the first context model for decoding the second syntax element information when the prediction mode of the current block using the intra block copy technology is the merge mode includes: the same or different.
[0653] In some embodiments of the present application, when the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode, the relationship between the second context model for decoding the fourth syntax element information and the second context model for decoding the fourth syntax element information when the prediction mode of the current block using the intra block copy technology is the merge mode includes: the same or different.
[0654] In some embodiments of the present application, the decoding part 11 is further configured to obtain a sixth syntax element of a reference block of the current block, where the sixth syntax element is used to indicate index information of the reference block;
[0655] The first determining part 12 is further configured to determine, based on the sixth syntax element, a reference block obtained by the current block using the intra block copy technology.
[0656] In some embodiments of the present application, the first determining part 12 is further configured to obtain a second syntax element of a merging candidate block of the current block after determining the reference block obtained by the current block using the intra block copy technology;
[0657] When the value of the second syntax element of the merge candidate block is the second value, determining that the second syntax element of the current block is the second value;
[0658] Based on the reference transformation model corresponding to the merging candidate block, a first transformation model of the current block is determined.
[0659] In some embodiments of the present application, the first determining part 12 is further configured to use the reference transformation model as the first transformation model.
[0660] In some embodiments of the present application, the first determining part 12 is further configured to determine a first transformation model type of the reference transformation model;
[0661] The first transform model consistent with the first transform type is re-derived according to the reference block template and the current block template.
[0662] In some embodiments of the present application, the first determining part 12 is further configured to obtain a flipped reference block flag of the merging candidate block;
[0663] When the value of the flip reference block flag is the second value, the first transformation model of the current block is determined based on the reference transformation model corresponding to the merge candidate block.
[0664] In some embodiments of the present application, the first determining part 12 is further configured to determine, based on the reference block, a prediction block for the current block when the second syntax element of the current block is a first value, or when the second syntax element of the merge candidate block of the current block is a first value;
[0665] Determining a reconstructed pixel value of the current block based on the prediction block of the current block;
[0666] Based on the reconstructed pixel values of the current block and the reconstructed pixel values of the reference block, a fifth transform model of the current block is constructed in the template area or within the block for use in a subsequent decoding process.
[0667] In some embodiments of the present application, the first determining part 12 is further configured to determine, after determining the prediction block of the current block based on the reference block and the first transformation model, a reconstructed pixel value of the current block based on the prediction block of the current block;
[0668] constructing a seventh transformation model of the current block in the template region or within the block based on the reconstructed pixel values of the current block and the reconstructed pixel values of the reference block;
[0669] using the seventh transformation model to replace the first transformation model and updating the transformation model list; or,
[0670] Adopting the transformation model with the smallest error value between the seventh transformation model and the first transformation model to update the transformation model list; or,
[0671] The seventh transformation model is adopted to update the transformation model list.
[0672] In some embodiments of the present application, the first determining part 12 is further configured to, when the first transformation model is a local compensation model, obtain pixel values of a first reconstructed region adjacent to the current coding block and pixel values of a second reconstructed region adjacent to the reference block;
[0673] Derived a first parameter of the local compensation model based on the first reconstructed area pixel value and the second reconstructed area pixel value, and determined a second parameter thereof from the first parameter;
[0674] Determine a third transformation model using the original first parameter of the local compensation model and the second parameter;
[0675] The first prediction part 13 is further configured to transform the reference block using the third transformation model to obtain a prediction block of the current block.
[0676] In some embodiments of the present application, the prediction type of the blocks corresponding to the second transformation model, the third transformation model and the fourth transformation model included in the transformation model list is any one of intra template matching prediction and intra block copy technology.
[0677] In some embodiments of the present application, the historical transformation model list is updated based on the first transformation model.
[0678] It can be understood that each functional unit of the decoder also executes the decoding method described in any one of the aforementioned embodiments.
[0679] It is understandable that in the embodiments of the present application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the various 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 a single unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional modules.
[0680] If the integrated unit is implemented as a software functional 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, or the portion that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0681] Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the decoder 170. The computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, it implements the decoding method described in any one of the aforementioned embodiments.
[0682] Based on the composition of the decoder 170 and the computer-readable storage medium, refer to Figure 14, which shows a specific hardware structure diagram of the decoder 170 provided in an embodiment of the present application. As shown in Figure 14, the decoder 170 may include: a first communication interface 1801, a first memory 1802 and a first processor 1803; each component is coupled together through a first bus system 1804. It can be understood that the first bus system 1804 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 1804 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 1804 in Figure 14. Among them,
[0683] The first communication interface 1801 is used to receive and send signals when sending and receiving information with other external network elements;
[0684] The first memory 1802 is used to store computer programs that can be run on the first processor 1703;
[0685] The first processor 1803 is configured to decode the method when running the computer program.
[0686] It is understood that the first memory 1802 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 and 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 RAM bus random access memory (DRRAM). The first memory 1802 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0687] The first processor 1803 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 1803. The above-mentioned first processor 1803 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the first memory 1802 , and the first processor 1803 reads the information in the first memory 1802 and completes the steps of the above method in combination with its hardware.
[0688] It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or its combination.For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing functions described in the present application or its combination.For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs 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 the processor or outside the processor.
[0689] Optionally, as another embodiment, the first processor 1803 is further configured to execute the decoding method described in any one of the aforementioned embodiments when running the computer program.
[0690] This embodiment provides a decoder that can select a first transform model from a transform model list that includes at least two types of transform models. The decoder then uses the selected first transform model to transform a reference block, thereby determining a prediction block. Therefore, during decoding, the first transform model used to implement the transformation can be selected from the transform model list, ensuring diverse choices. This increases the likelihood of prediction, improves prediction diversity, and ultimately improves decoding performance.
[0691] In yet another embodiment of the present application, based on the same inventive concept as the above embodiment, referring to FIG15 , a schematic diagram of the composition structure of an encoder 2 provided in an embodiment of the present application is shown. The encoder 2 includes:
[0692] The second determining portion 20 is configured to determine a candidate block vector list for the current block; determine a reference block vector based on the candidate block vector list; determine a reference block based on the reference block vector; and when determining that the prediction mode of the current block is the intra block copy technique combined with the transformation model list for prediction, obtain a first transformation model from the constructed transformation model list; the constructed transformation model list includes at least two types of transformation models;
[0693] A second prediction part 21 is configured to determine a prediction block of a current block based on the reference block and the first transformation model;
[0694] The encoding part 22 is configured to encode relevant syntax elements of the current block and write the obtained encoding bits into the bitstream through the writing part 23; wherein the relevant syntax elements are used to indicate whether the current block is predicted using the intra-frame block copy technology combined with the transformation model list.
[0695] In some embodiments of the present application, the relevant syntax elements include at least: a second syntax element;
[0696] The second syntax element is used to indicate whether the current block is predicted using a transform model list;
[0697] The related syntax elements further include: a first syntax element, where the first syntax element is used to indicate a prediction mode of the current block using an intra block copy technology.
[0698] In some embodiments of the present application, the prediction modes of the intra block copy technology include: a merge mode and an optimized motion vector prediction mode;
[0699] The encoding section 22 is further configured to, when the prediction mode using the intra block copy technology for the current block is the optimized motion vector prediction mode, encode the value of the first syntax element as a first value, and encode a third syntax element; the third syntax element is used to indicate whether a transform technology is used for prediction; the third syntax element belongs to the related syntax element;
[0700] When the value of the third syntax element is the second value, encoding the second syntax element; or,
[0701] encoding the value of the third syntax element as the first value and encoding the second syntax element; or,
[0702] When the value of the first syntax element is encoded as a first value, encoding a second syntax element;
[0703] When the value of the second syntax element is the first value, the third syntax element is encoded.
[0704] In some embodiments of the present application, the encoding part 22 is further configured to encode the value of the first syntax element as the second value and encode the second syntax element when the prediction mode of the current block using the intra-frame block copy technology is the merge mode.
[0705] In some embodiments of the present application, the encoding part 22 is further configured to
[0706] When the current block is predicted using a transformation model list, the second syntax element is encoded as a second value, and the index information of the first transformation model in the transformation model list is encoded as a fourth syntax element; the fourth syntax element is used to indicate the model index of the transformation model in the transformation model list; the related syntax element information also includes: the fourth syntax element.
[0707] In some embodiments of the present application, the second determining part 20 is further configured to construct the transformation model list when the current block is predicted using the transformation model list.
[0708] In some embodiments of the present application, the second determining part 20 is further configured to sequentially add at least one different transformation model to the initial transformation model list to obtain the transformation model list;
[0709] The at least one transformation model includes at least one of the following:
[0710] a second transformation model corresponding to pixels at at least one adjacent position of the current block;
[0711] a third transformation model corresponding to at least one non-adjacent pixel of the current block;
[0712] The fourth transformation model used in the historical encoding process;
[0713] Available transformation models in the time domain;
[0714] The preset transformation model.
[0715] In some embodiments of the present application, the preset transformation model includes: a model corresponding to the preset model parameters or a model obtained by offsetting at least one of the second transformation model, the third transformation model and the fourth transformation model, the model corresponding to the preset model parameters and the available transformation model in the time domain.
[0716] In some embodiments of the present application, the second determining portion 20 is further configured to, for a pixel at any adjacent position of the current block or a pixel at any non-adjacent position of the current block, obtain a second transformation model for the adjacent position of the current block, or obtain a third transformation model corresponding to the pixel at any non-adjacent position of the current block, if the pixel satisfies a transformation condition; wherein the transformation condition includes at least one of the following:
[0717] The block where the pixel is located uses the intra-block copy technology, the transformation model flag is valid, and the size of the block where the pixel is located meets the first preset size.
[0718] In some embodiments of the present application, the at least one different transformation model includes at least one of the following: at least one transformation model has a different transformation type, has different model parameters, and uses different template areas under the same transformation type.
[0719] In some embodiments of the present application, the second determining part 20 is further configured to sequentially add at least one different transformation model to the initial transformation model list to obtain an intermediate transformation model list;
[0720] The intermediate transformation model list is reordered to obtain the transformation model list.
[0721] In some embodiments of the present application, the second determining part 20 is further configured to traverse each transformation model in the intermediate transformation model list to determine the offset value of each transformation model;
[0722] Using each of the transformation models, respectively predicting the reference block template, and determining the reference block template prediction of each transformation model;
[0723] determining an error value between the reference block template prediction and the current block template for each transformation model;
[0724] Determining template error values of the respective transformation models based on the error value of each transformation model and its corresponding offset value;
[0725] The transformation models are reordered according to the template error values of the transformation models to obtain the transformation model list.
[0726] In some embodiments of the present application, the template error values of the respective transformation models are arranged from small to large, and the index information of the corresponding transformation model list is arranged from small to large.
[0727] In some embodiments of the present application, when the reference block template is unavailable, the error value is determined to be a maximum value.
[0728] In some embodiments of the present application, the second determining part 20 is further configured to obtain first position information of the current block and a current size of the current block;
[0729] At least one adjacent position of the current block and at least one non-adjacent position of the current block are determined based on the first position information and the current size.
[0730] In some embodiments of the present application, the second determining part 20 is further configured to obtain a historical transformation model to be used in the encoding process;
[0731] When the historical transformation model and the historical transformation model list have the same model, the same model in the historical transformation model list is removed, and the historical transformation model is added to the first order position in the historical transformation model list;
[0732] When the historical transformation model does not have the same model as that in the historical transformation model list, the historical transformation model is added to the first order position in the historical transformation model list.
[0733] In some embodiments of the present application, the second determination part 20 is further configured to, when the historical transformation model list meets the first preset list length, remove the transformation model in the last sequence position in the historical transformation model list and then add the historical transformation model to the first sequence position of the historical transformation model list.
[0734] In some embodiments of the present application, the fourth transformation model is determined sequentially from the historical transformation models in order from the first order bit to the last order bit of the historical transformation models.
[0735] In some embodiments of the present application, the second determining part 20 is further configured to update the historical transformation model list based on the historical transformation model when the size of the block corresponding to the historical transformation model to be added meets a second preset size.
[0736] In some embodiments of the present application, the second prediction part 21 is further configured to use the first transformation model to predict the reference block template of the current block and determine the predicted values of the pixels of the reference block template;
[0737] Determine the total error between the predicted value of each pixel and the pixels of the current block template;
[0738] Based on the total error value, averaging each pixel to obtain a first offset value;
[0739] The reference block is transformed using the first transformation model, and the first offset value is compensated in the transformation result corresponding to each pixel to obtain a prediction block of the current block; or, the parameters in the first transformation model are compensated using the first offset value to obtain an updated first transformation model, and the updated first transformation model is then used to transform the reference block.
[0740] In some embodiments of the present application, the second determining part 20 is further configured to determine that the local compensation flag of the current block is a second value when the second syntax element corresponding to the merge candidate block of the current block is predicted using the transform model list;
[0741] The second prediction part 21 is further configured to use the first transformation model and the local compensation transformation model indicated by the local compensation flag to perform secondary transformation on the reference block in sequence to determine a prediction block of the current block.
[0742] In some embodiments of the present application, the encoding part 22 is further configured to encode the second syntax element according to the encoded information, wherein the encoded information includes at least one of the following:
[0743] The size of the current block, the CIIP flag, GPM flag, MBVD flag, skip flag and TM_merge flag of the current block.
[0744] In some embodiments of the present application, encoding the second syntax element according to the encoded information includes:
[0745] When the encoded information satisfies a first encoding condition, encoding the second syntax element;
[0746] The first encoding condition includes at least one of the following:
[0747] The value of the CIIP flag is the first value;
[0748] The value of the GPM flag is a first value;
[0749] The MBVD flag bit is a first value;
[0750] The skip flag is a first value;
[0751] The TM_merge flag is a first value;
[0752] The size of the current block is smaller than a third preset size;
[0753] The area of the current block is greater than a first preset area threshold.
[0754] In some embodiments of the present application, each transformation model of a different transformation type corresponds to a different reference block template area;
[0755] The error value of each transformation model is an average template error value of the number of pixels in the respective reference block template.
[0756] In some embodiments of the present application, the encoding part 22 is further configured to determine a sixth transform model when the current block is predicted using a transform technique and a non-transform model list;
[0757] The second prediction part 21 is further configured to determine a prediction block of the current block based on the reference block and the sixth transformation model;
[0758] The encoding part 22 is further configured to encode the third syntax element as the first value or the second value, and encode the fifth syntax element; the fifth syntax element is used to indicate the index of the local compensation model when using the multi-mode local compensation technology.
[0759] In some embodiments of the present application, when the second syntax element corresponding to the merge candidate block of the current block is predicted using the transform model list, the local compensation flag of the current block is determined to be a first value.
[0760] In some embodiments of the present application, the encoding part 22 is further configured to encode the second syntax element when at least one of the sequence-level syntax element, the frame-level syntax element, the slice-level syntax element, and the size of the current block meets the second encoding condition.
[0761] In some embodiments of the present application, if the first transformation model is at least one other transformation model indicated in the transformation model list, the fourth syntax element is encoded as a third value, where the other transformation model is a transformation method corresponding to other reference blocks.
[0762] In some embodiments of the present application, the second determining part 20 is further configured to obtain a derived local compensation model and add the local compensation model to the transformation model list.
[0763] In some embodiments of the present application, the second determining part 20 is further configured to determine, for a reference block of the current block, to perform prediction based on at least one of intra block copy technology-intra / inter joint prediction, intra block copy technology-geometric partitioning mode, and intra block copy technology-reconstructed value reordering, to obtain a reference prediction block of the reference block;
[0764] The reference block is updated using the reference prediction block.
[0765] In some embodiments of the present application, the second determining part 20 is further configured to recalculate update parameters of the multi-mode local compensation model based on the current block template and the reference block template when the first transformation model is a local compensation model using the multi-mode local compensation technology;
[0766] Based on the update parameters, the first transformation model is updated.
[0767] In some embodiments of the present application, the encoding part 22 is further configured to determine a first context model from at least one context model based on encoding information of adjacent blocks;
[0768] encoding the second syntax element based on the first context model; or
[0769] The second syntax element is encoded using an equal probability coding method.
[0770] In some embodiments of the present application, the encoding portion 22 is further configured to include at least one of the following:
[0771] Encoding the index information of the first transformation model in the transformation model list as a fourth syntax element using an equal probability coding method;
[0772] Encoding the index information of the first transformation model in the transformation model list as a fourth syntax element using an encoding method of the second context model;
[0773] The index information of the first transformation model in the transformation model list is encoded as a fourth syntax element by partially adopting the encoding method of the second context model and combining it with partially adopting the equal probability encoding method.
[0774] In some embodiments of the present application, when the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode, the relationship between the first context model for encoding the second syntax element information and the first context model for encoding the second syntax element information when the prediction mode of the current block using the intra block copy technology is the merge mode includes: the same or different.
[0775] In some embodiments of the present application, when the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode, the relationship between the second context model for encoding the fourth syntax element information and the second context model for encoding the fourth syntax element information when the prediction mode of the current block using the intra block copy technology is the merge mode includes: the same or different.
[0776] In some embodiments of the present application, index information of a reference block is determined, and the index information of the reference block is encoded as a sixth syntax element, where the sixth syntax element is used to indicate the index information of the reference block.
[0777] In some embodiments of the present application, the second determining part 20 is further configured to obtain a second syntax element of the reference block after determining the reference block based on the reference block vector;
[0778] When the value of the second syntax element of the merging candidate block of the current block is the second value, determining that the second syntax element of the current block is the second value;
[0779] Based on the reference transformation model corresponding to the merging candidate block, a first transformation model of the current block is determined.
[0780] In some embodiments of the present application, the second determining part 20 is further configured to use the reference transformation model as the first transformation model.
[0781] In some embodiments of the present application, the second determining part 20 is further configured to determine a first transformation model type of the reference transformation model;
[0782] The first transform model consistent with the first transform type is re-derived according to the reference block template and the current block template.
[0783] In some embodiments of the present application, the second determining part 20 is further configured to obtain a flipped reference block flag of the merging candidate block;
[0784] When the value of the flip reference block flag is the second value, the first transformation model of the current block is determined based on the reference transformation model corresponding to the merge candidate block.
[0785] In some embodiments of the present application, the second determining part 20 is further configured to determine the prediction block of the current block based on the reference block when the second syntax element of the current block is the first value, or when the second syntax element of the merge candidate block of the current block is the first value;
[0786] Determining a reconstructed pixel value of the current block based on the prediction block of the current block;
[0787] Based on the reconstructed pixel values of the current block and the reconstructed pixel values of the reference block, a fifth transform model of the current block is constructed in the template area or within the block for use in subsequent encoding processes.
[0788] In some embodiments of the present application, the second determining part 20 is further configured to determine, after determining the prediction block of the current block based on the reference block and the first transformation model, a reconstructed pixel value of the current block based on the prediction block of the current block;
[0789] constructing a seventh transformation model of the current block in the template region or within the block based on the reconstructed pixel values of the current block and the reconstructed pixel values of the reference block;
[0790] using the seventh transformation model to replace the first transformation model and updating the transformation model list; or,
[0791] Adopting the transformation model with the smallest error value between the seventh transformation model and the first transformation model to update the transformation model list; or,
[0792] The seventh transformation model is adopted to update the transformation model list.
[0793] In some embodiments of the present application, the second determining part 20 is further configured to, when the first transformation model is a local compensation model, obtain pixel values of a first reconstructed region adjacent to the current coding block and pixel values of a second reconstructed region adjacent to the reference block;
[0794] Derived a first parameter of the local compensation model based on the first reconstructed area pixel value and the second reconstructed area pixel value, and determined a second parameter thereof from the first parameter;
[0795] Determine a third transformation model using the original first parameter of the local compensation model and the second parameter;
[0796] The reference block is transformed using the third transformation model to obtain a prediction block of the current block.
[0797] In some embodiments of the present application, the prediction type of the blocks corresponding to the second transformation model, the third transformation model and the fourth transformation model included in the transformation model list is any one of intra template matching prediction and intra block copy technology.
[0798] In some embodiments of the present application, the second determining part 20 is further configured to update the historical transformation model list based on the first transformation model.
[0799] In some embodiments of the present application, the encoding part 22 is further configured to encode the first syntax element as a first value when it is determined that the prediction mode of the current block is prediction using a non-intra block copy technology.
[0800] It can be understood that each functional unit of the encoder also executes the encoding method described in any one of the aforementioned embodiments.
[0801] It is understood that in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular system. Furthermore, the various components in this embodiment can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The aforementioned integrated units can be implemented in the form of hardware or software functional modules.
[0802] If the integrated unit is implemented as a software functional 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 encoder 190 and stores a computer program. When the computer program is executed by the second processor, it implements the encoding method described in any of the above embodiments.
[0803] Based on the composition of the encoder 190 and the computer-readable storage medium, refer to Figure 16, which shows a specific hardware structure diagram of the encoder 190 provided in an embodiment of the present application. As shown in Figure 16, the encoder 190 may include: a second communication interface 2001, a second memory 2002 and a second processor 2003; each component is coupled together through a second bus system 2004. It can be understood that the second bus system 2004 is used to achieve connection and communication between these components. In addition to the data bus, the second bus system 2004 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 second bus system 2004 in Figure 16. Among them,
[0804] The second communication interface 2001 is used for sending and receiving signals during the process of sending and receiving information with other external network elements;
[0805] The second memory 2002 is used to store computer programs that can be run on the second processor 2003;
[0806] The second processor 2003 is configured to execute the encoding method when running the computer program.
[0807] Optionally, as another embodiment, the second processor 2003 is further configured to execute the encoding method described in any one of the aforementioned embodiments when running the computer program.
[0808] It can be understood that the hardware functions of the second memory 2002 are similar to those of the first memory 1802, and the hardware functions of the second processor 2003 are similar to those of the first processor 1803; they will not be described in detail here.
[0809] This embodiment provides an encoder that can select a first transform model from a transform model list including at least two types of transform models; use the selected first transform model to transform a reference block, and thereby determine a prediction block. Therefore, during the encoding process, the first transform model used to implement the transformation can be selected from the transform model list, ensuring a variety of choices, thereby increasing the likelihood of prediction, improving prediction diversity, and ultimately improving encoding performance.
[0810] It should be noted that, in this application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0811] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0812] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0813] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0814] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0815] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims. Industrial Applicability
[0816] The embodiments of the present application provide a coding and decoding method, a bitstream, an encoder, a decoder, and a storage medium. The decoder or encoder can select a first transformation model from a transformation model list including at least two types of transformation models; the selected first transformation model is used to transform a reference block, thereby determining a prediction block. Therefore, during the coding and decoding process, the first transformation model used to implement the transformation can be selected and determined from the transformation model list, ensuring a variety of choices, thereby increasing the probability of prediction, improving the diversity of predictions, and ultimately improving coding and decoding performance.
Claims
1. A decoding method, applied to a decoder, the method comprising: Obtaining relevant syntax elements of the current block; wherein the relevant syntax elements are used to indicate whether the current block is predicted using an intra-block copy technology combined with a transform model list; Determine a reference block obtained by using the intra-block copying technology for the current block; Determining, according to the relevant syntax elements, a first transformation model obtained based on a constructed transformation model list; the constructed transformation model list includes at least two types of transformation models; Based on the reference block and the first transform model, a prediction block of a current block is determined.
2. The method according to claim 1, wherein: The relevant grammatical elements include at least: a second grammatical element; The second syntax element is used to indicate whether the current block is predicted using a transform model list. The related syntax elements also include: a first syntax element; the first syntax element is used to indicate a prediction mode of the current block using an intra-block copy technology.
3. The method according to claim 2, wherein: The obtaining of the relevant syntax elements of the current block includes: decoding the first syntax element; According to the first syntax element, a prediction mode of the current block using the intra block copy technology is determined, and the second syntax element is decoded.
4. The method according to claim 3, wherein: The step of determining, according to the first syntax element, a prediction mode of the current block using an intra-block copy technology, and decoding the second syntax element comprises: When the value of the first syntax element is the first value, determining that the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode, and decoding a third syntax element, the third syntax element is used to indicate whether to use the transformation technology for prediction; the third syntax element belongs to the related syntax element; When the value of the third syntax element is a second value, decoding the second syntax element; or, When the value of the third syntax element is the first value, the second syntax element is decoded. Alternatively, when the value of the first syntax element is the first value, determining that the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode, and decoding the second syntax element; When the value of the second syntax element is the first value, a third syntax element is decoded.
5. The method according to claim 3, wherein: The step of determining, according to the first syntax element, a prediction mode of the current block using an intra-block copy technology, and decoding the second syntax element comprises: When the value of the first syntax element is a second value, it is determined that the prediction mode of the current block using the intra block copy technology is a merge mode, and the second syntax element is decoded.
6. The method according to any one of claims 3 to 5, wherein: The determining, according to the relevant syntax elements, a first transformation model obtained based on a constructed transformation model list comprises: When the value of the second syntax element is the second value, it indicates that the current block uses the transformation model list for prediction, decodes the fourth syntax element, determines the index information of the transformation model, and skips the process of the current block inheriting the local compensation flag from the merged candidate block; the fourth syntax element is used to indicate the model index of the transformation model in the transformation model list; the related syntax element information also includes: the fourth syntax element; Based on the index information of the transformation model, the first transformation model is determined in the constructed transformation model list.
7. The method according to any one of claims 2 to 6, wherein: The method further comprises: When the value of the second syntax element is a second value, the transformation model list is constructed.
8. The method according to claim 7, wherein: The step of constructing the transformation model list comprises: Adding at least one different transformation model to the initial transformation model list in sequence to obtain the transformation model list; The at least one transformation model comprises at least one of the following: a second transformation model corresponding to pixels at at least one adjacent position of the current block; a third transformation model corresponding to pixels at at least one non-adjacent position of the current block; The fourth transformation model used in the historical decoding process; Available transformation models in the time domain; The preset transformation model.
9. The method according to claim 8, wherein: The preset transformation model includes: a model corresponding to the preset model parameters or a model obtained by offsetting at least one of the second transformation model, the third transformation model and the fourth transformation model, the model corresponding to the preset model parameters and the available transformation model in the time domain.
10. The method according to claim 8 or 9, wherein: The method further comprises: For a pixel at any adjacent position of the current block or a pixel at any non-adjacent position of the current block, if the pixel satisfies a transformation condition, a second transformation model of the adjacent position of the current block is obtained, or a third transformation model corresponding to a pixel at any non-adjacent position of the current block is obtained; wherein the transformation condition includes at least one of the following: The block where the pixel is located uses the intra-block copy technology, the transform model flag is valid, and the size of the block where the pixel is located meets the first preset size.
11. The method according to claim 8 or 9, wherein: The at least one different transformation model includes at least one of the following: the at least one transformation model has a different transformation type, has different model parameters, and uses different template areas under the same transformation type.
12. The method according to any one of claims 8 to 11, wherein: The step of sequentially adding at least one different transformation model to the initial transformation model list to obtain the transformation model list includes: Sequentially adding at least one different transformation model to the initial transformation model list to obtain an intermediate transformation model list; The intermediate transformation model list is reordered to obtain the transformation model list.
13. The method according to claim 12, wherein: The step of reordering the intermediate transformation model list to obtain the transformation model list includes: Traversing each transformation model in the intermediate transformation model list to determine an offset value of each transformation model; Using each of the transformation models, respectively predicting the reference block template, and determining the reference block template prediction of each transformation model; determining an error value between a reference block template prediction and a current block template for each transformation model; Determining the template error value of each transformation model based on the error value of each transformation model and its corresponding offset value; The transformation models are reordered according to the template error values of the transformation models to obtain the transformation model list.
14. The method according to claim 13, wherein: The template error values of the transformation models are from small to large, and the corresponding index information of the transformation model list is from small to large.
15. The method according to claim 13 or 14, wherein: The method further comprises: When the reference block template is not available, the error value is determined to be a maximum value.
16. The method according to any one of claims 8 to 15, wherein: The method further comprises: Obtaining first position information of the current block and the current size of the current block; At least one adjacent position of the current block and at least one non-adjacent position of the current block are determined based on the first position information and the current size.
17. The method according to any one of claims 8 to 16, wherein: The method further comprises: Get the historical transformation model to be used in the decoding process; When the historical transformation model and the historical transformation model list have the same model, the same model in the historical transformation model list is removed, and the historical transformation model is added to the first order position of the historical transformation model list; When there is no identical model between the historical transformation model and the historical transformation model list, the historical transformation model is added to the first order position of the historical transformation model list.
18. The method according to claim 17, wherein: The step of adding the historical transformation model to the first order position of the historical transformation model list comprises: When the historical transformation model list meets the first preset list length, after the transformation model at the last order in the historical transformation model list is removed, the historical transformation model is added to the first order in the historical transformation model list.
19. The method according to claim 17 or 18, wherein: The fourth transformation model is determined sequentially from the historical transformation models in the order of the historical transformation models from the first order bit to the last order bit.
20. The method according to any one of claims 17 to 19, wherein: The method further comprises: When the size of the block corresponding to the historical transformation model to be added meets a second preset size, the historical transformation model list is updated based on the historical transformation model.
21. The method according to any one of claims 1 to 20, wherein: The step of determining a prediction block of a current block based on the reference block and the first transformation model comprises: Using the first transformation model, predicting the reference block template of the current block, and determining the predicted values of the pixels of the reference block template; Determine the total error value between the predicted value of each pixel and the pixel of the current block template; Based on the total error value, averaging each pixel to obtain a first offset value; The reference block is transformed by using the first transformation model, and the first offset value is compensated in the transformation result corresponding to each pixel to obtain a prediction block of the current block; or, the parameters in the first transformation model are compensated by using the first offset value to obtain an updated first transformation model, and then the updated first transformation model is used to transform the reference block.
22. The method according to claim 3, 5 or 6, wherein: The method further comprises: When a second syntax element corresponding to the merge candidate block of the current block is predicted using the transform model list, determining the local compensation flag bit of the current block to be a second value; The step of determining a prediction block of a current block based on the reference block and the first transformation model comprises: The reference block is transformed twice in sequence using the first transformation model and the local compensation transformation model indicated by the local compensation flag to determine the prediction block of the current block; or, the reference block is transformed according to the local compensation transformation model derived from the current block template and the reference block template to determine the prediction block of the current block.
23. The method according to claim 3, 5 or 6, wherein: The decoding of the second syntax element comprises: Decoding the second syntax element according to the decoded information, wherein the decoded information includes at least one of the following: The size of the current block, the CIIP flag, GPM flag, MBVD flag, skip flag and TM_merge flag of the current block.
24. The method according to claim 23, wherein: The step of decoding the second syntax element according to the decoded information includes: When the decoded information satisfies a first decoding condition, decoding the second syntax element; The first decoding condition includes at least one of the following: The value of the CIIP flag bit is a first value; The value of the GPM flag is a first value; The MBVD flag bit is a first value; The skip flag bit is a first value; The TM_merge flag bit is a first value; The size of the current block is smaller than a third preset size; The area of the current block is greater than a first preset area threshold.
25. The method according to any one of claims 13 to 15, wherein: Each transformation model of different transformation types corresponds to a different reference block template area; The error value of each transformation model is an average template error value of the number of pixels in the respective reference block template.
26. The method according to claim 4, wherein: The value of the third syntax element is the first value, and after decoding the second syntax element, the method further includes: When the value of the third syntax element is the second value, decoding a fifth syntax element; the fifth syntax element is used to indicate an index of a local compensation model when using a multi-mode local compensation technology; Based on the fifth syntax element, determining a sixth transformation model; Based on the reference block and the sixth transform model, a prediction block of the current block is determined.
27. The method of claim 3, 5 or 6, wherein: The method further comprises: When the second syntax element corresponding to the merge candidate block of the current block is predicted using the transformation model list, the local compensation flag of the current block is determined to be a first value.
28. The method according to any one of claims 3 to 5, wherein: The decoding of the second syntax element comprises: When at least one of a sequence-level syntax element, a frame-level syntax element, a slice-level syntax element, and a size of a current block satisfies a second decoding condition, the second syntax element is decoded.
29. The method according to claim 4, wherein: The value of the third syntax element is a second value, and after decoding the second syntax element, the method further includes: When the value of the third syntax element is the first value, decoding a fifth syntax element; the fifth syntax element is used to indicate an index of a local compensation model when using a multi-mode local compensation technology; Based on the fifth syntax element, determining a sixth transformation model; Based on the reference block and the sixth transform model, a prediction block of the current block is determined.
30. The method according to claim 6, wherein: The determining the first transformation model in the constructed transformation model list based on the index information of the transformation model includes: If the fourth syntax element of the transformation model is a third value, at least one other transformation model is indicated in the transformation model list, wherein the other transformation model is a transformation mode corresponding to other reference blocks.
31. The method according to claim 7 or 8, wherein: The step of constructing the transformation model list comprises: The derived local compensation model is obtained, and the local compensation model is added to the transformation model list.
32. The method of claim 1, wherein: The method further comprises: Determine a reference block for the current block, perform prediction based on at least one of intra-frame block copy technology-intra-frame / inter-frame joint prediction, intra-frame block copy technology-geometric partition mode, and intra-frame block copy technology-reconstruction value reordering, and obtain a reference prediction block of the reference block; The reference block is updated using the reference prediction block.
33. The method of claim 1, wherein: The method further comprises: When the first transformation model is a local compensation model using a multi-mode local compensation technique, recalculating update parameters of the multi-mode local compensation model based on the current block template and the reference block template; Based on the update parameters, the first transformation model is updated.
34. The method according to any one of claims 3 to 7, wherein: The decoding of the second syntax element comprises: Determine a first context model from at least one context model according to the decoded information of the adjacent blocks; decoding the second syntax element based on the first context model; or, The second syntax element is decoded by using an equal probability decoding method.
35. The method of claim 6, wherein: The decoding of the fourth syntax element to determine the index information of the transformation model includes at least one of the following: Decoding the fourth syntax element by using an equal probability decoding method to determine the index information of the transformation model; Adopting a decoding method of a second context model to decode the fourth syntax element and determine the index information of the transformation model; The fourth syntax element is decoded by partially adopting a decoding method of the second context model and partially adopting an equal probability decoding method to determine the index information of the transformation model.
36. The method of claim 34, wherein: When the prediction mode of the current block using the intra-frame block copy technology is the optimized motion vector prediction mode, the first context model for decoding the second syntax element information, and when the prediction mode of the current block using the intra-frame block copy technology is the merge mode, the relationship between the first context model for decoding the second syntax element information includes: the same or different.
37. The method of claim 35, wherein: When the prediction mode of the current block using the intra-frame block copy technology is the optimized motion vector prediction mode, the second context model for decoding the fourth syntax element information, and when the prediction mode of the current block using the intra-frame block copy technology is the merge mode, the relationship between the second context model for decoding the fourth syntax element information includes: the same or different.
38. The method of claim 1, wherein: The obtaining of the relevant syntax elements of the current block includes: Obtain a sixth syntax element of a reference block of the current block, where the sixth syntax element is used to indicate index information of the reference block; The determining of a reference block obtained by using the intra-block copying technology for the current block comprises: Based on the sixth syntax element, a reference block obtained by using the intra block copy technology for the current block is determined.
39. The method of claim 38, wherein: After determining the reference block obtained by using the intra-block copying technology for the current block, the method further includes: Obtain a second syntax element of a merge candidate block of a current block; When the value of the second syntax element of the merge candidate block is the second value, determining that the second syntax element of the current block is the second value; Based on the reference transformation model corresponding to the merge candidate block, a first transformation model of the current block is determined.
40. The method of claim 39, wherein: The determining, based on the reference transformation model corresponding to the merge candidate block, a first transformation model of the current block comprises: The reference transformation model is used as the first transformation model.
41. The method of claim 39, wherein: The determining, based on the reference transformation model corresponding to the merge candidate block, a first transformation model of the current block comprises: determining a first transformation model type of the reference transformation model; The first transform model consistent with the first transform type is re-derived according to the reference block template and the current block template.
42. The method of claim 39, wherein: The determining, based on the reference transformation model corresponding to the merge candidate block, a first transformation model of the current block comprises: Obtain the flip reference block flag of the merge candidate block; When the value of the flip reference block flag is the second value, a first transformation model of the current block is determined based on a reference transformation model corresponding to the merged candidate block.
43. The method according to any one of claims 2 to 42, wherein: The method further comprises: When the second syntax element of the current block is a first value, or when the second syntax element of the merge candidate block of the current block is a first value, determining a prediction block of the current block based on the reference block; Determining a reconstructed pixel value of the current block based on the prediction block of the current block; Based on the reconstructed pixel values of the current block and the reconstructed pixel values of the reference block, a fifth transform model of the current block is constructed in the template area or within the block for use in a subsequent decoding process.
44. The method according to any one of claims 2 to 42, wherein: After determining the prediction block of the current block based on the reference block and the first transformation model, the method further includes: Determining a reconstructed pixel value of the current block based on the prediction block of the current block; constructing a seventh transformation model of the current block in the template region or within the block based on the reconstructed pixel values of the current block and the reconstructed pixel values of the reference block; using the seventh transformation model to replace the first transformation model, and updating the transformation model list; or, Adopting the transformation model with the smallest error value between the seventh transformation model and the first transformation model to update the transformation model list; or, The seventh transformation model is adopted to update the transformation model list.
45. The method of claim 1, wherein: The method further comprises: When the first transformation model is a local compensation model, obtaining pixel values of a first reconstructed region adjacent to the current coding block and pixel values of a second reconstructed region adjacent to the reference block; Based on the first reconstructed area pixel value and the second reconstructed area pixel value, deriving a first parameter of the local compensation model, and determining a second parameter thereof by the first parameter; Determine a third transformation model using the original first parameter of the local compensation model and the second parameter; The reference block is transformed using the third transformation model to obtain a prediction block of the current block.
46. The method according to any one of claims 8 to 11, wherein: The prediction type of the block corresponding to the second transformation model, the third transformation model and the fourth transformation model included in the transformation model list is any one of intra-frame template matching prediction and intra-frame block copy technology.
47. The method according to any one of claims 1 to 44, wherein: The method further comprises: The historical transformation model list is updated based on the first transformation model.
48. A coding method, applied to an encoder, the method comprising: Determine a candidate block vector list for the current block; Determining a reference block vector based on the candidate block vector list; Based on the reference block vector, determining a reference block; When determining that the prediction mode of the current block is the intra block copy technology combined with the transformation model list for prediction, a first transformation model is obtained from the constructed transformation model list; the constructed transformation model list includes at least two types of transformation models; Determine a prediction block of a current block based on the reference block and the first transform model; Encode the relevant syntax elements of the current block and write the obtained coded bits into the bitstream; wherein the relevant syntax elements are used to indicate whether the current block is predicted using the intra-block copy technology combined with the transformation model list.
49. The method of claim 48, wherein: The relevant grammatical elements include at least: a second grammatical element; The second syntax element is used to indicate whether the current block is predicted using a transform model list; The related syntax elements further include: a first syntax element, and the first syntax element is used to indicate a prediction mode of the current block using an intra-block copy technology.
50. The method of claim 49, wherein: The prediction modes of the intra-frame block copy technology include: a merge mode and an optimized motion vector prediction mode; the method further includes: When the prediction mode of the current block using the intra block copy technology is the optimized motion vector prediction mode, the value of the first syntax element is encoded as a first value, and a third syntax element is encoded; the third syntax element is used to indicate whether to use the transformation technology for prediction; the third syntax element belongs to the related syntax element; When the value of the third syntax element is encoded as the second value, encode the second syntax element; or, encoding the value of the third syntax element as the first value and encoding the second syntax element; or, When the value of the first syntax element is encoded as a first value, a second syntax element is encoded; When the value of encoding the second syntax element is the first value, encoding the third syntax element.
51. The method of claim 49, wherein: The method further comprises: When the prediction mode of the current block using the intra block copy technology is the merge mode, the value of the first syntax element is encoded as a second value, and the second syntax element is encoded.
52. The method according to any one of claims 49 to 51, wherein: The method further comprises: When the current block is predicted using a transformation model list, the second syntax element is encoded as a second value, and the index information of the first transformation model in the transformation model list is encoded as a fourth syntax element; the fourth syntax element is used to indicate the model index of the transformation model in the transformation model list; the related syntax element information also includes: the fourth syntax element.
53. A method according to any one of claims 49 to 52, wherein: The method further comprises: When the current block is predicted using the transformation model list, the transformation model list is constructed.
54. A method according to any one of claims 49 to 53, wherein: The step of constructing the transformation model list comprises: Adding at least one different transformation model to the initial transformation model list in sequence to obtain the transformation model list; The at least one transformation model comprises at least one of the following: a second transformation model corresponding to pixels at at least one adjacent position of the current block; a third transformation model corresponding to pixels at at least one non-adjacent position of the current block; The fourth transformation model used in the historical encoding process; Available transformation models in the time domain; The preset transformation model.
55. The method of claim 54, wherein: The preset transformation model includes: a model corresponding to the preset model parameters or a model obtained by offsetting at least one of the second transformation model, the third transformation model and the fourth transformation model, the model corresponding to the preset model parameters and the available transformation model in the time domain.
56. The method of claim 54 or 55, wherein: The method further comprises: For a pixel at any adjacent position of the current block or a pixel at any non-adjacent position of the current block, if the pixel satisfies a transformation condition, a second transformation model of the adjacent position of the current block is obtained, or a third transformation model corresponding to a pixel at any non-adjacent position of the current block is obtained; wherein the transformation condition includes at least one of the following: The block where the pixel is located uses the intra-block copy technology, the transform model flag is valid, and the size of the block where the pixel is located meets the first preset size.
57. The method of claim 54 or 55, wherein: The at least one different transformation model includes at least one of the following: the at least one transformation model has a different transformation type, has different model parameters, and uses different template areas under the same transformation type.
58. A method according to any one of claims 54 to 58, wherein: The step of sequentially adding at least one different transformation model to the initial transformation model list to obtain the transformation model list includes: Sequentially adding at least one different transformation model to the initial transformation model list to obtain an intermediate transformation model list; The intermediate transformation model list is reordered to obtain the transformation model list.
59. The method of claim 58, wherein: The step of reordering the intermediate transformation model list to obtain the transformation model list includes: Traversing each transformation model in the intermediate transformation model list to determine an offset value of each transformation model; Using each of the transformation models, respectively predicting the reference block template, and determining the reference block template prediction of each transformation model; determining an error value between a reference block template prediction and a current block template for each transformation model; Determining the template error value of each transformation model based on the error value of each transformation model and its corresponding offset value; The transformation models are reordered according to the template error values of the transformation models to obtain the transformation model list.
60. The method of claim 59, wherein: The template error values of the transformation models are from small to large, and the corresponding index information of the transformation model list is from small to large.
61. The method of claim 59 or 60, wherein: When the reference block template is not available, the error value is determined to be a maximum value.
62. The method according to any one of claims 54 to 61, wherein: The method further comprises: Obtaining first position information of the current block and the current size of the current block; At least one adjacent position of the current block and at least one non-adjacent position of the current block are determined based on the first position information and the current size.
63. The method according to any one of claims 54 to 62, wherein: The method further comprises: Obtain a historical transformation model to be used in the encoding process; When the historical transformation model and the historical transformation model list have the same model, the same model in the historical transformation model list is removed, and the historical transformation model is added to the first order position of the historical transformation model list; When there is no identical model between the historical transformation model and the historical transformation model list, the historical transformation model is added to the first order position of the historical transformation model list.
64. The method of claim 63, wherein: The step of adding the historical transformation model to the first order position of the historical transformation model list comprises: When the historical transformation model list meets the first preset list length, after the transformation model at the last order in the historical transformation model list is removed, the historical transformation model is added to the first order in the historical transformation model list.
65. The method of claim 63 or 64, wherein: The fourth transformation model is determined sequentially from the historical transformation models in the order of the historical transformation models from the first order bit to the last order bit.
66. A method according to any one of claims 63 to 65, wherein: The method further comprises: When the size of the block corresponding to the historical transformation model to be added meets a second preset size, the historical transformation model list is updated based on the historical transformation model.
67. A method according to any one of claims 48 to 66, wherein: The step of determining a prediction block of a current block based on the reference block and the first transformation model comprises: Using the first transformation model, predicting the reference block template of the current block, and determining the predicted values of the pixels of the reference block template; Determine the total error value between the predicted value of each pixel and the pixel of the current block template; Based on the total error value, averaging each pixel to obtain a first offset value; The reference block is transformed by using the first transformation model, and the first offset value is compensated in the transformation result corresponding to each pixel to obtain a prediction block of the current block; or, the parameters in the first transformation model are compensated by using the first offset value to obtain an updated first transformation model, and then the updated first transformation model is used to transform the reference block.
68. The method of claim 51, wherein: The method further comprises: When a second syntax element corresponding to the merge candidate block of the current block is predicted using the transform model list, determining the local compensation flag bit of the current block to be a second value; The step of determining a prediction block of a current block based on the reference block and the first transformation model comprises: Using the first transformation model and the local compensation transformation model indicated by the local compensation flag, the reference block is transformed twice in sequence to determine the prediction block of the current block, or; or, according to the local compensation transformation model inferred from the current block template and the reference block template, the reference block is transformed to determine the prediction block of the current block.
69. The method of claim 50 or 51, wherein: The encoding of the second syntax element comprises: Encode the second syntax element according to the encoded information, wherein the encoded information includes at least one of the following: The size of the current block, the CIIP flag, GPM flag, MBVD flag, skip flag and TM_merge flag of the current block.
70. The method of claim 69, wherein: The step of encoding the second syntax element according to the encoded information comprises: When the encoded information satisfies a first encoding condition, encoding the second syntax element; The first encoding condition includes at least one of the following: The value of the CIIP flag bit is a first value; The value of the GPM flag is a first value; The MBVD flag bit is a first value; The skip flag bit is a first value; The TM_merge flag bit is a first value; The size of the current block is smaller than a third preset size; The area of the current block is greater than a first preset area threshold.
71. The method according to any one of claims 59 to 61, wherein: Each transformation model of different transformation types corresponds to a different reference block template area; The error value of each transformation model is an average template error value of the number of pixels in the respective reference block template.
72. The method of claim 50, wherein: The method further comprises: When the current block is predicted using the transform technique and the non-transform model list, determining a sixth transform model; Determine a prediction block of a current block based on the reference block and the sixth transform model; The third syntax element is encoded as the first value or the second value, and a fifth syntax element is encoded; the fifth syntax element is used to indicate an index of a local compensation model when a multi-mode local compensation technology is used.
73. The method of claim 50 or 51, wherein: The method further comprises: When the second syntax element corresponding to the merge candidate block of the current block is predicted using the transformation model list, the local compensation flag of the current block is determined to be a first value.
74. The method of claim 50 or 51, wherein: The encoding of the second syntax element comprises: When at least one of a sequence-level syntax element, a frame-level syntax element, a slice-level syntax element, and a size of a current block satisfies a second encoding condition, the second syntax element is encoded.
75. The method of claim 48, wherein: The method further comprises: If the first transformation model is at least one other transformation model indicated in the transformation model list, the fourth syntax element is encoded as a third value, wherein the other transformation model is a transformation mode corresponding to other reference blocks.
76. The method of claim 54 or 55, wherein: The step of constructing the transformation model list comprises: The derived local compensation model is obtained, and the local compensation model is added to the transformation model list.
77. The method of claim 48, wherein: The method further comprises: Determine a reference block for the current block, perform prediction based on at least one of intra-frame block copy technology-intra-frame / inter-frame joint prediction, intra-frame block copy technology-geometric partition mode, and intra-frame block copy technology-reconstruction value reordering, and obtain a reference prediction block of the reference block; The reference block is updated using the reference prediction block.
78. The method of claim 48, wherein: The method further comprises: When the first transformation model is a local compensation model using a multi-mode local compensation technique, recalculating update parameters of the multi-mode local compensation model based on the current block template and the reference block template; Based on the update parameters, the first transformation model is updated.
79. The method of claim 50 or 51, wherein: The encoding of the second syntax element comprises: Determine a first context model from at least one context model according to the coding information of the adjacent block; encoding the second syntax element based on the first context model; or, The second syntax element is encoded by adopting an equal probability encoding method.
80. The method of claim 52, wherein: The encoding of the index information of the first transformation model in the transformation model list as a fourth syntax element includes at least one of the following: Using an equal probability coding method, encoding the index information of the first transformation model in the transformation model list as a fourth syntax element; Using an encoding method of a second context model, encoding index information of the first transformation model in the transformation model list as a fourth syntax element; The index information of the first transformation model in the transformation model list is encoded as a fourth syntax element by partially adopting the encoding method of the second context model and partially adopting the equal probability encoding method.
81. The method of claim 79, wherein: When the prediction mode of the current block using the intra-frame block copy technology is the optimized motion vector prediction mode, the first context model for encoding the second syntax element information, and when the prediction mode of the current block using the intra-frame block copy technology is the merge mode, the relationship between the first context model for encoding the second syntax element information includes: the same or different.
82. The method of claim 80, wherein: When the prediction mode of the current block using the intra-frame block copy technology is the optimized motion vector prediction mode, the second context model for encoding the fourth syntax element information, and when the prediction mode of the current block using the intra-frame block copy technology is the merge mode, the relationship between the second context model for encoding the fourth syntax element information includes: the same or different.
83. The method of claim 1, wherein: The method further comprises: Determine index information of a reference block, and encode the index information of the reference block as a sixth syntax element, where the sixth syntax element is used to indicate the index information of the reference block.
84. The method of claim 83, wherein: After determining the reference block based on the reference block vector, the method further includes: Obtaining a second syntax element of the reference block; When the value of the second syntax element of the merge candidate block of the current block is the second value, determining that the second syntax element of the current block is the second value; Based on the reference transformation model corresponding to the merge candidate block, a first transformation model of the current block is determined.
85. The method of claim 84, wherein: The determining, based on the reference transformation model corresponding to the merge candidate block, a first transformation model of the current block comprises: The reference transformation model is used as the first transformation model.
86. The method of claim 84, wherein: The determining, based on the reference transformation model corresponding to the merge candidate block, a first transformation model of the current block comprises: determining a first transformation model type of the reference transformation model; The first transform model consistent with the first transform type is re-derived according to the reference block template and the current block template.
87. The method of claim 84, wherein: The determining, based on the reference transformation model corresponding to the merge candidate block, a first transformation model of the current block comprises: Obtain the flip reference block flag of the merge candidate block; When the value of the flip reference block flag is the second value, a first transformation model of the current block is determined based on a reference transformation model corresponding to the merged candidate block.
88. The method according to any one of claims 49 to 87, wherein: The method further comprises: When the second syntax element of the current block is a first value, or when the second syntax element of the merge candidate block of the current block is a first value, determining a prediction block of the current block based on the reference block; Determining a reconstructed pixel value of the current block based on the prediction block of the current block; Based on the reconstructed pixel values of the current block and the reconstructed pixel values of the reference block, a fifth transform model of the current block is constructed in the template area or within the block for use in a subsequent encoding process.
89. The method according to any one of claims 49 to 87, wherein: After determining the prediction block of the current block based on the reference block and the first transformation model, the method further includes: Determining a reconstructed pixel value of the current block based on the prediction block of the current block; constructing a seventh transformation model of the current block in the template region or within the block based on the reconstructed pixel values of the current block and the reconstructed pixel values of the reference block; using the seventh transformation model to replace the first transformation model, and updating the transformation model list; or, Adopting the transformation model with the smallest error value between the seventh transformation model and the first transformation model to update the transformation model list; or, The seventh transformation model is adopted to update the transformation model list.
90. The method of claim 48, wherein: The method further comprises: When the first transformation model is a local compensation model, obtaining pixel values of a first reconstructed region adjacent to the current coding block and pixel values of a second reconstructed region adjacent to the reference block; Based on the first reconstructed area pixel value and the second reconstructed area pixel value, deriving a first parameter of the local compensation model, and determining a second parameter thereof by the first parameter; Determine a third transformation model using the original first parameter of the local compensation model and the second parameter; The reference block is transformed using the third transformation model to obtain a prediction block of the current block.
91. The method according to any one of claims 54 to 57, wherein: The prediction type of the block corresponding to the second transformation model, the third transformation model and the fourth transformation model included in the transformation model list is any one of intra-frame template matching prediction and intra-frame block copy technology.
92. The method according to any one of claims 48 to 88, wherein: The method further comprises: The historical transformation model list is updated based on the first transformation model.
93. The method of claim 49, wherein: The method further comprises: When it is determined that the prediction mode of the current block is prediction using a non-intra block copy technology, the first syntax element is encoded as a first value.
94. A code stream, wherein The bitstream is generated by bit encoding according to information to be encoded; wherein the information to be encoded includes at least one of the following: a first syntax element, a second syntax element, a third syntax element, a fourth syntax element, a fifth syntax element, a sixth syntax element, a size of a current block, a CIIP flag bit of the current block, a GPM flag bit, an MBVD flag bit, a skip flag bit, a TM_merge flag bit and a context model; wherein, The first syntax element is used to indicate a prediction mode of a current block using an intra-block copy technology; The second syntax element is used to indicate whether the current block is predicted using a transform model list; The third syntax element is used to indicate whether to use a transform technique for prediction; The fourth syntax element is used to indicate a model index of the transformation model in the transformation model list; The fifth syntax element is used to indicate the index of the local compensation model when using the multi-mode local compensation technology; The sixth syntax element is used to indicate index information of a reference block.
95. A decoder, wherein include: The decoding part is configured to obtain relevant syntax elements of the current block; wherein the relevant syntax elements are used to indicate whether the current block is predicted using an intra-block copy technology combined with a transform model list; A first determining part is configured to determine a reference block obtained by using the intra-block copying technology for a current block; Determining, according to the relevant syntax elements, a first transformation model obtained based on a constructed transformation model list; the constructed transformation model list includes at least two types of transformation models; The first prediction part is configured to determine a prediction block of a current block based on the reference block and the first transform model.
96. A decoder 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 1 to 47 when running the computer program.
97. An encoder, wherein include: A second determining part is configured to determine a candidate block vector list of the current block; Determining a reference block vector based on the candidate block vector list; Based on the reference block vector, determining a reference block; when determining that the prediction mode of the current block is the intra block copy technology combined with the transformation model list for prediction, obtaining a first transformation model from the constructed transformation model list; the constructed transformation model list includes at least two types of transformation models; A second prediction part is configured to determine a prediction block of a current block based on the reference block and the first transformation model; The encoding part is configured to encode the relevant syntax elements of the current block, and write the obtained encoding bits into the bitstream through the writing part; wherein the relevant syntax elements are used to indicate whether the current block is predicted using the intra-frame block copy technology combined with the transformation model list.
98. An encoder 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 48 to 93 when running the computer program.
99. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, which implements the method according to any one of claims 1 to 47 when executed by a first processor, or implements the method according to any one of claims 48 to 93 when executed by a second processor.
Citation Information
Patent Citations
METHOD AND APPARATUS FOR VIDEO CODING, computer equipment and storage medium
CN112135134A
Harmonization between local illumination compensation and inter prediction coding
CN112868238A
Prediction method and device of current block, equipment and storage medium
CN114402616A
Harmonization between different video process mode
US20210360232A1
Spatial local illumination compensation
WO2022167322A1
Cited By
Processing method, processing equipment and storage medium
CN121691725A
Encoding method, decoding method, encoder, decoder and storage medium
WO2026183721A1
