Intra-frame template matching prediction method, processing node and storage medium
By dividing the search sub-regions and searching for candidate templates in the intra-template matching prediction, the problems of high decoding complexity and information redundancy in the prior art are solved, and more efficient video processing is achieved.
Patent Information
- Application Number
- CN202311710164.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-12
- Publication Date
- 2025-06-13
AI Technical Summary
The existing video encoding technology ignores non-local self-similarity in intra prediction, resulting in high decoding complexity and information redundancy.
A method of intra-template matching prediction is proposed. By determining the search template and search area of the currently predicted block, at least two search sub-regions are divided, and candidate templates matching the search template are searched within each search sub-region, and the target prediction block and target search area are determined according to the candidate template, thereby reducing the search range of the decoding end.
Reduces decoding complexity, reduces information redundancy, and improves video processing efficiency.
Smart Images

Figure CN120151545A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, for example, to a method for intra-frame template matching prediction, a processing node, and a storage medium. Background Art
[0002] Most of the prediction methods adopted by current mainstream video coding technologies use locally adjacent information as a reference, ignoring the spatial non-local self-similarity. In fact, for complex structural textures, there is a probability of capturing similar structures in the reconstructed non-local regions, which is more friendly for the prediction of the lower right corner region of the current block. Based on this, in intra-frame prediction, the encoder can use the reconstructed content as a template and search for non-local similar blocks accordingly. For the decoder, it also needs to perform the same search and matching operations as the encoder, resulting in a relatively high decoding complexity and certain information redundancy. Summary of the Invention
[0003] This application provides a method for intra-frame template matching prediction, a processing node, and a storage medium.
[0004] An embodiment of this application provides a method for intra-frame template matching prediction, including:
[0005] Determine the search template and search area of the current block to be predicted;
[0006] Determine at least two search sub-areas according to the search area;
[0007] Search for at least one candidate template that matches the search template in each search sub-area;
[0008] Determine the target prediction block and the target search area corresponding to the current block to be predicted according to the candidate prediction block corresponding to the candidate template, where the target search area is the area where the candidate template corresponding to the target prediction block is located.
[0009] Another embodiment of this application also provides a method for intra-frame template matching prediction, including:
[0010] Determine the search template and the target search area of the current block to be predicted;
[0011] Search for at least one candidate template that matches the search template in the target search area;
[0012] Determine the target prediction block corresponding to the current block to be predicted according to the candidate prediction block corresponding to the candidate template.
[0013] Another embodiment of this application also provides a processing node, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the program, the above-mentioned method for intra-frame template matching prediction is implemented.
[0014] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned intra-frame template matching prediction method is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flowchart of an intra-frame template matching prediction method provided by an embodiment;
[0016] Figure 2 It is a flowchart of another intra-frame template matching prediction method provided by an embodiment;
[0017] Figure 3 It is a schematic diagram of a search area provided by an embodiment;
[0018] Figure 4 It is a schematic diagram of a search candidate template and weighted fusion of candidate prediction blocks provided by an embodiment.
[0019] Figure 5 It is a schematic structural diagram of an intra-frame template matching prediction device provided by an embodiment;
[0020] Figure 6 It is a schematic structural diagram of another intra-frame template matching prediction device provided by an embodiment;
[0021] Figure 7 It is a schematic hardware structure diagram of a processing node provided by an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0022] The present application will be described below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present application, rather than limiting the present application. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. Additionally, it should be noted that for the sake of description, only the parts related to the present application rather than all the structures are shown in the drawings.
[0023] Intra-frame prediction mainly utilizes the correlation of video signals in the spatial domain, and uses the reconstructed pixels of the current image to predict the current pixels, so as to remove the spatial redundancy of the video. Intra-frame prediction mainly includes the following links: 1) Obtain reference pixels; 2) Establish a mapping from the reference pixels to the predicted value according to the selected prediction mode; 3) Filter the predicted value; 4) Encode the optimal intra-frame prediction mode. Most of the prediction methods adopted by current mainstream video coding technologies use local adjacent information as a reference, ignoring the non-local self-similarity in the spatial domain. In addition, the current intra-template matching prediction (IntraTMP) performs the same intra-frame prediction process at the encoding and decoding ends. By using the matching between the template corresponding to the block to be predicted and the candidate templates, the prediction block corresponding to the optimal template is selected as the prediction of the current block. Since the decoding end needs to perform the same search and matching operations as the encoding end, this will lead to an increase in decoding complexity and there is also a certain amount of information redundancy. The embodiment of this application proposes a prediction mode based on template matching on the basis of intra-frame prediction. Using the reconstructed content as a template, through the matching between the template corresponding to the block to be predicted and the candidate templates, the prediction block corresponding to the optimal template is selected as the target prediction block of the current block to be predicted. For the encoding end, a more accurate target search area can be determined for the target prediction block. For the decoding end, it only needs to match the target prediction block in the target search area, reducing information redundancy, reducing decoding complexity, and improving video processing efficiency.
[0024] Figure 1 FIG. is a flowchart of an intra-template matching prediction method provided for an embodiment. This method can be applied to a first processing node, and the first processing node mainly refers to the encoding end. As Figure 1 shown, the method provided in this embodiment includes the following steps:
[0025] In step 110, determine the search template and search area of the current block to be predicted.
[0026] In step 120, determine at least two search sub-areas according to the search area.
[0027] In step 130, search for at least one candidate template that matches the search template in each search sub-area.
[0028] In step 140, determine the target prediction block corresponding to the current block to be predicted and the target search area according to the candidate prediction blocks corresponding to the candidate templates, where the target search area is the area where the candidate template corresponding to the target prediction block is located, and the target search area is a search sub-area or the search area.
[0029] In this embodiment, the search template can be understood as the template corresponding to the current block to be predicted, and the search area can be understood as the area outside the current block to be predicted where the search operation needs to be performed. At least two search sub-areas can be determined according to the search area. The candidate template can be understood as the template that matches the search template within each search sub-area. Each candidate template corresponds to a candidate prediction block. Among multiple candidate prediction blocks, one is finally determined as the target prediction block corresponding to the current block to be predicted. Among them, the matching between the candidate template and the search template can be understood as that the candidate template has a high similarity with the search template, small distortion, or certain spatial non-local self-similarity, etc. The higher the matching degree between the candidate template and the search template, the greater the probability that the corresponding candidate prediction block will be used as the target prediction block. The target prediction block can provide a reference for the prediction and reconstruction of the current block to be predicted, improving the prediction accuracy. In addition, the first processing node can also determine the area where the target prediction block is located as the target search area and indicate it to the second processing node. The second processing node mainly refers to the decoding end. For example, the identifier, index, coordinates, etc. of the target search area can be indicated to the second processing node. On this basis, the second processing node can search for the optimal target prediction block for the target search area during the decoding process. When the target search area is indicated as a specific search sub-area, the second processing node does not need to search the entire search area, which can improve the search efficiency; when the target search area is indicated as the entire search area, the entire search area can also be searched to improve the accuracy of matching prediction.
[0030] In one embodiment, determining the target prediction block corresponding to the current block to be predicted according to the candidate prediction block corresponding to the candidate template includes multiple situations: for example, one template that is most similar to the search template is searched in each search sub-area as the candidate template. N (N>2) search sub-areas correspond to N candidate templates and N candidate prediction blocks. Then, the candidate prediction block that best matches the current block to be predicted among the N candidate prediction blocks is used as the target prediction block, and the area where it is located is used as the target search area. Another example is that M (M>1) templates that are similar to the search template may be searched in a single search sub-area as candidate templates. The M candidate templates correspond to M candidate prediction blocks. The M candidate prediction blocks can be fused to obtain a fused candidate prediction block. Whether the fused candidate prediction block is used as the target prediction block is determined according to the matching degree between the fused candidate prediction block and the current block to be predicted. If so, the area where the fused candidate prediction block is located is used as the target search area. Another example is that there is only one candidate template and one corresponding candidate prediction block in some search sub-areas, and there are multiple candidate templates and one corresponding fused candidate prediction block in some other search sub-areas. The target prediction block can be determined according to the matching degree between the candidate prediction block or the fused candidate prediction block corresponding to each search sub-area and the current block to be predicted.
[0031] In one embodiment, the search sub-region where a prediction block is located can be determined according to the search sub-region where the pixel point at the upper left corner of the prediction block is located.
[0032] In one embodiment, the method further includes: determining first indication information for indicating whether to adopt an intra-frame template matching prediction mode. In this embodiment, the first indication information can be understood as an IntraTMP mode switch signal. The encoding end can determine the first indication information and transmit it to the decoding end to indicate whether to use IntraTMP. If the IntraTMP mode is used, the encoding end executes the intra-frame template matching prediction method of the above embodiment, and the decoding end can perform a search prediction operation similar to that of the encoding end. The decoding end only needs to search the target search region.
[0033] In one embodiment, the method further includes: determining second indication information for indicating the identifier of the target search region, where the identifier of the target search region is the identifier of the search region or the identifier of one of at least two search sub-regions.
[0034] In this embodiment, the second indication information is mainly used to indicate the region where the target prediction block is located to indicate the specific region for the decoding end to perform a search. The specific content of the second indication information can also be divided into multiple cases: for example, when the target search region is the entire search region, or when candidate templates (or target prediction blocks that are more matched with the current block to be predicted) that are more matched with the search template are distributed in different search sub-regions. In these cases, there are valid candidate templates and candidate prediction blocks in different search sub-regions. To ensure the comprehensiveness and accuracy of the search, the entire search region can be used as the target search region and indicated to the decoding end. Therefore, the second indication information can include the identifier of the entire search region. Another example is when the target search region is one of the search sub-regions, the second indication information can include the identifier of the target search region where the target prediction block is located.
[0035] In some embodiments, the second indication information can be used as a region division switch, that is, the second indication information can be used to indicate whether the entire search region is divided into at least two search sub-regions. If the second indication information includes the identifier of the target search region, it means that the search region is divided into at least two search sub-regions; if the second indication information includes the identifier of the search region (which may also include the identifier of each search sub-region), it means that the search region is not divided into at least two search sub-regions. On this basis, the specific region where the search prediction operation needs to be performed can be indicated to the decoding end.
[0036] In one embodiment, the method further includes: determining third indication information, where the third indication information is used to indicate whether at least two search sub-regions are determined according to the search region. The third indication information can also be understood as a region division switch, and can also be understood as being used to indicate whether the target search region is a search sub-region or the entire search region. In this embodiment, the third indication information can be used as a region division switch, that is, the third indication information can be used to indicate whether the search region is divided into at least two search sub-regions. For example, when the matching degrees between the candidate templates of multiple search sub-regions and the search template are all higher than a set threshold, the matching degrees between the candidate templates of multiple search sub-regions and the search template are similar, the matching degrees between the candidate prediction blocks of multiple search sub-regions and the current prediction block are all higher than a set threshold, the matching degrees between the candidate prediction blocks of multiple search sub-regions and the current prediction block are similar, etc., at least two search sub-regions can no longer be divided, and the target search region is the entire search region. On this basis, the decoding end can perform search prediction operations on the entire search region, rather than being limited to a certain search sub-region.
[0037] In one embodiment, the method further includes: determining fourth indication information, where the fourth indication information is used to indicate the number of candidate templates in each search sub-region, and / or is used to indicate that the target prediction block is a single candidate prediction block or is obtained by weighted fusion of multiple candidate prediction blocks.
[0038] In this embodiment, the fourth indication information can be understood as a weighted fusion switch, which is used to indicate the number of candidate templates in each search sub-region, and / or is used to indicate whether the target prediction block can be obtained by weighted fusion of at least two candidate prediction blocks. For example, if the number of candidate templates in each search sub-region is 1, or the target prediction block cannot be obtained by weighted fusion of at least two candidate prediction blocks, then there is only one candidate template in each search sub-region, corresponding to one candidate prediction block, and the target prediction block is determined by a single candidate prediction block in one of the search sub-regions. For another example, if the number of candidate templates in each search sub-region is greater than 1, or the target prediction block can be obtained by weighted fusion of at least two candidate prediction blocks, then there can be multiple candidate templates in each search sub-region, corresponding to multiple prediction blocks, and the target prediction block can be obtained by weighted fusion of multiple prediction blocks in one of the search sub-regions. For another example, if the number of candidate templates in each search sub-region is greater than or equal to 1, or the target prediction block can be obtained by weighted fusion of at least two candidate prediction blocks or can be determined by a single candidate prediction block, then there can be one or more candidate templates in each search sub-region, corresponding to one or more prediction blocks, and the target prediction block may be obtained by weighted fusion of multiple prediction blocks in one of the search sub-regions, or may be determined by a single prediction block in one of the search sub-regions, which can be specifically determined according to the matching degree between the candidate template and the search template, and the matching degree between the candidate prediction block and the current block to be predicted. For another example, it can indicate both whether the target prediction block can be obtained by weighted fusion of at least two candidate prediction blocks and the number of candidate templates in each search sub-region.
[0039] In some embodiments, for a single search sub-region, if the matching degrees of at least two candidate templates that are relatively well-matched with the search template are both higher than a specified degree, or the matching degrees of at least two candidate templates that are relatively well-matched with the search template are relatively close, then it is possible to allow the number of candidate templates in this search sub-region (or each search sub-region) to be greater than 1, which can also be understood as that the target prediction block can be obtained by weighted fusion of at least two candidate prediction blocks.
[0040] In one embodiment, searching for at least one candidate template that matches the search template in each search sub-region includes one of the following: for each search sub-region, determining at least one candidate template according to the similarity between the search template and each template in the search sub-region; determining at least one candidate template that matches the search template in each search sub-region through a neural network or deep learning.
[0041] In this embodiment, the similarity is used to evaluate the difference or distortion between the template in the search sub-region and the search template. The higher the similarity, the higher the matching degree between the candidate template and the search template. In this embodiment, the candidate template is searched in each search sub-region, and the similarity between each template and the search template is calculated, and the template with a similarity higher than a threshold or the highest similarity is used as the candidate template. A similarity prediction model can also be constructed and trained using a neural network or deep learning, so as to search for a template with a similarity that meets the requirements in each search sub-region as a candidate template. In addition, the candidate template can also be determined using indicators such as the absolute value of the pixel difference (Sum of Absolute Differences, SAD) or the sum of squares of the pixel difference (Sum of Squared Differences, SSD).
[0042] In one embodiment, determining at least one candidate template according to the similarity between the search template and each template in the search sub-region includes: determining the template with the highest similarity between the search sub-region and the search template as the candidate template. In this embodiment, a single search sub-region corresponds to one candidate template and one candidate prediction block.
[0043] In one embodiment, determining at least one candidate template according to the similarity between the search template and each template in the search sub-region includes: sorting the templates according to the similarity between the search template and each template in the search sub-region; and determining at least two templates with the highest ranking as candidate templates. In this embodiment, the templates in a single search sub-region can be sorted from high to low according to the similarity with the search template, and at least two templates with the highest ranking are used as candidate templates.
[0044] In one embodiment, determining the target prediction block corresponding to the current block to be predicted according to the candidate prediction block corresponding to the candidate template includes: determining the target prediction block corresponding to the current block to be predicted according to the similarity between the candidate prediction block corresponding to the candidate template and the current prediction block. In this embodiment, on the basis of determining the candidate templates from each search sub-region, the similarity between the candidate prediction block corresponding to each candidate template and the current prediction block can be calculated, and the target prediction block is determined accordingly. If a single search sub-region corresponds to multiple prediction blocks, the multiple prediction blocks can be merged into one candidate prediction block.
[0045] In one embodiment, determining the target prediction block corresponding to the current block to be predicted according to the similarity between the candidate prediction block corresponding to the candidate template and the current prediction block includes: determining the candidate prediction block with the highest similarity to the current prediction block among the candidate prediction blocks corresponding to the candidate template as the target prediction block. In this embodiment, a single search sub-region corresponds to a candidate prediction block, and the target prediction block is determined by the candidate prediction block with the highest similarity to the current prediction block.
[0046] In one embodiment, when the candidate template includes at least two templates ranked at the top, the candidate prediction block corresponding to the candidate template is obtained by weighting the prediction blocks corresponding to the at least two templates ranked at the top. In this embodiment, the templates in a single search sub-region can be sorted from high to low according to the similarity with the search template, and at least two templates ranked at the top are used as candidate templates. Each candidate template corresponds to a prediction block, and the prediction blocks corresponding to at least two templates can be weighted and fused into a candidate prediction block. The weight can be calculated based on the template matching cost of each prediction block, or can be calculated using a weight derivation method based on a Wiener filter.
[0047] In one embodiment, when there are at least two templates whose similarities with the search template meet the set conditions, and the at least two candidate prediction blocks belong to different search sub-regions, the search area division condition is not met. In this embodiment, the set condition may refer to the similarity being higher than a threshold or the similarity being close. In this case, the candidate templates that are more matched with the search template (or the target prediction blocks that are more matched with the current block to be predicted) are distributed in different search sub-regions, and the search area division condition is not met, and the search sub-region may not be divided.
[0048] In one embodiment, the search template includes one of the following:
[0049] An L-shaped template consisting of a reconstructed area on the top and a reconstructed area on the left of the current block to be predicted;
[0050] A cross-shaped template obtained by extending the reconstructed area on the top and the reconstructed area on the left of the current block to be predicted;
[0051] A T-shaped template is obtained by extending the reconstructed area on the top and the reconstructed area on the left of the current block to be predicted.
[0052] In one embodiment, determining at least two search sub-areas according to the search area includes:
[0053] The search area is determined to be divided into at least two search sub-areas according to the size of the current block to be predicted and the search template.
[0054] In this embodiment, the shape, size, and number of the divided search sub-regions can be adjusted according to the size of the currently to-be-predicted block and the shape and size of the search template, etc., so as to meet different actual requirements.
[0055] In one embodiment, after searching for at least one candidate template that matches the search template in each search sub-region, it further includes: determining the candidate templates that match the sub-template among the at least one candidate template, where the sub-template belongs to a subset of the search template.
[0056] In this embodiment, the sub-template of the search template can be used to perform secondary matching or screening on the candidate templates. For example, if the matching degrees of multiple candidate templates obtained by searching in a single search sub-region with the search template are all higher than the set threshold, or the matching degrees of multiple candidate templates obtained by searching in a single search sub-region with the search template are relatively close, then the sub-template can be used to match the multiple candidate templates again, and the candidate templates with a higher matching degree with the sub-template are determined as the final candidate templates. On this basis, the matching effect of the candidate templates can be improved by using the details of the search template, thereby improving the accuracy of matching and prediction.
[0057] Figure 2 It is a flowchart of another intra-frame template matching prediction method provided by an embodiment. This method can be applied to the second processing node, and the second processing node can be a decoding end. In the embodiments of the present application, the search and prediction operations performed by the second processing node are similar to those of the first processing node. The main difference is that the second processing node can perform search and prediction only for the target search region. Technical details not described in detail in this embodiment can be referred to any of the above embodiments.
[0058] As Figure 2 shown, the method provided by this embodiment includes the following steps:
[0059] In step 210, determine the search template and the target search region of the currently to-be-predicted block.
[0060] In step 220, search for at least one candidate template that matches the search template in the target search region.
[0061] In step 230, determine the target prediction block corresponding to the currently to-be-predicted block according to the candidate prediction block corresponding to the candidate template.
[0062] In this embodiment, the first processing node can indicate the identifier, index, coordinates, etc. of the target search region to the second processing node, and the second processing node can perform search and prediction only for the target search region during the decoding process to obtain the optimal target prediction block.
[0063] In one embodiment, before determining the search template and the target search area of the current block to be predicted, the method further includes: determining to adopt the intra-template matching prediction mode according to the first indication information. If the intra-template matching prediction mode is adopted, the intra-template matching prediction method of the above embodiment is executed.
[0064] In one embodiment, the method further includes: determining second indication information, where the second indication information is used to indicate the identifier of the target search area, and the identifier of the target search area is the identifier of the search area or the identifier of one of at least two search sub-areas.
[0065] In this embodiment, if the second indication information includes the identifier of the entire search area, the decoding end performs a search prediction operation on the entire search area. If the second indication information may include the identifier of the target search area where the target prediction block is located, the decoding end performs a search prediction operation on the target search area. On this basis, the decoding end can clearly determine the specific area for performing the search prediction. In some embodiments, the second indication information can also be used as a region division switch. If the second indication information includes the identifier of the target search area, it means that the search area is divided into at least two search sub-areas; if the second indication information includes the identifier of the search area (which may also include the identifier of each search sub-area), in this case, the target search area is the entire search area.
[0066] In one embodiment, the method further includes: determining third indication information, where the third indication information is used to indicate whether to determine at least two search sub-areas according to the search area.
[0067] In one embodiment, the method further includes: determining fourth indication information, where the fourth indication information is used to indicate the number of candidate templates in each search sub-area, and / or is used to indicate that the target prediction block is a single candidate prediction block or is obtained by weighted fusion of multiple candidate prediction blocks.
[0068] In one embodiment, searching for at least one candidate template that matches the search template in the target search area includes one of the following:
[0069] Determining at least one candidate template according to the similarity between the search template and each template in the target search area;
[0070] Determining at least one candidate template that matches the search template in the target search area through a neural network or deep learning.
[0071] In one embodiment, determining at least one candidate template according to the similarity between the search template and each template in the target search area includes:
[0072] Determine the template with the highest similarity between the target search area and the search template as the candidate template.
[0073] In one embodiment, determining at least one candidate template according to the similarity between the search template and each template in the target search area includes:
[0074] Sort the templates according to the similarity between the search template and each template in the target search area;
[0075] Determine at least two templates with higher rankings as candidate templates.
[0076] In one embodiment, determining the target prediction block corresponding to the current block to be predicted according to the candidate prediction block corresponding to the candidate template includes:
[0077] Determine the target prediction block corresponding to the current block to be predicted according to the similarity between the candidate prediction block corresponding to the candidate template and the current prediction block.
[0078] In one embodiment, determining the target prediction block corresponding to the current block to be predicted according to the similarity between the candidate prediction block corresponding to the candidate template and the current prediction block includes:
[0079] Determine the candidate prediction block with the highest similarity to the current prediction block among the candidate prediction blocks corresponding to the candidate template as the target prediction block.
[0080] In one embodiment, when the candidate template includes at least two templates with higher rankings, the candidate prediction block corresponding to the candidate template is obtained by weighting the prediction blocks corresponding to the at least two templates with higher rankings.
[0081] In one embodiment, when there are at least two templates whose similarity to the search template meets the set conditions and the at least two candidate prediction blocks belong to different search sub-regions, the search region division condition is not satisfied.
[0082] In one embodiment, the search template includes one of the following:
[0083] The L-shaped template formed by the reconstructed area at the top and the reconstructed area on the left of the current block to be predicted;
[0084] The cross-shaped template extended according to the reconstructed area at the top and the reconstructed area on the left of the current block to be predicted;
[0085] The T-shaped template extended according to the reconstructed area at the top and the reconstructed area on the left of the current block to be predicted.
[0086] In one embodiment, at least two search sub-regions are determined according to the search region, including: determining the search region as at least two search sub-regions according to the size of the current block to be predicted and the search template.
[0087] In one embodiment, after searching for at least one candidate template that matches the search template in the target search region, it further includes: determining the candidate templates that match the sub-template among the at least one candidate template, where the sub-template belongs to a subset of the search template.
[0088] The following uses some embodiments to exemplarily illustrate the intra-frame template matching prediction method of the present application.
[0089] Embodiment 1
[0090] For the encoding end, the following processes may be included:
[0091] 1) Determine the search region
[0092] To obtain the target prediction block (which can also be understood as the non-local similar block of the current block to be predicted), first, the search region is determined for the current block to be predicted. Figure 3 FIG. is a schematic diagram of a search region provided for an embodiment. As Figure 3 shown, the total width of the search region is 40, and the length and width of the search region can both be adjusted with reference to the information of the current block to be predicted. Since the non-local block cannot overlap with the current block to be predicted, there are regions that cannot be searched, as Figure 3 shown by the slanted shaded region in. It should be noted that the size of the region that cannot be searched can be determined according to the current block to be predicted and / or the template type, and there may also be no region that cannot be searched.
[0093] 2) Determine at least two search sub-regions according to the search region
[0094] For example, the entire search region is further divided into four search sub-regions, and this template matching algorithm is applicable only when at least two search sub-regions are available. Due to the error in template matching, using only one optimal non-local block as the prediction in the search region may miss better candidates. By dividing the search sub-regions, the number of rate–distortion optimization (RDO) times at the encoding end can be increased, and the prediction quality can be improved. In practical applications, the division rule of the search region can be adjusted according to the actual situation, including the number of search sub-regions, the width of the search sub-regions, and / or the shape of the search sub-regions. The adjustment method is not limited to modifying the configuration data, and can also be adaptively adjusted according to the information of the current block to be predicted. In this embodiment, it is assumed that the total width of the search region is 40, and the widths corresponding to the four search sub-regions are set to 8, 10, 10, and 12 respectively, as Figure 4This increasing design is considered because in the search area closer to the block to be predicted, there is a higher probability of obtaining candidate prediction blocks with similar structures.
[0095] 3) Determine the target search area
[0096] Independently perform the search process of the matching block within each search sub-area. Figure 4 A schematic diagram of a search candidate template and weighted fusion of candidate prediction blocks provided for an embodiment. As Figure 4 shown, the search step can be freely controlled. The search process uses the neighborhood L-shaped reconstructed area as the template, that is, the L-shaped filled area in the figure, and the width of the template is set to 2. Use SSD as the cost function to evaluate the similarity between each candidate template and the template of the block to be predicted, and sort all template positions according to the evaluation result of this similarity.
[0097] According to the sorting result, obtain the prediction block vector of each search sub-area, and calculate the target search area (which can also be understood as the best search area) of the current block to be predicted through the rate-distortion process, that is, the area where the candidate prediction block most similar to the current block to be predicted is located, and record the index of the target search area. The index of the target search area may be the index of the entire search area or the index of one of the search sub-areas. During the weighted prediction process, the weighted rule can be adjusted, for example, adjusting the number of prediction blocks for weighting, adjusting the order position of the selected prediction blocks, and / or adjusting the division criteria for selecting the prediction block weighting method, etc.
[0098] 4) Encode the transmission syntax elements
[0099] Two CU-level syntax elements, intra_tmp_flag (i.e., the first indication information) and intra_tmp_reg (i.e., the second indication information), can be encoded. The syntax elements can be transmitted to the decoding end to indicate whether to use the IntraTMP mode and the target search area identifier. When intra_tmp_flag is 1, it means using the IntraTMP mode, and intra_tmp_reg is used to transmit the target search area index obtained in step 3). Both syntax elements use context-based adaptive binary arithmetic coding (CABAC) for context encoding, and intra_tmp_reg is binarized using the truncated unary code. This mode can be used for both luma and chroma blocks, and the chroma blocks inherit the syntax element values of the corresponding luma blocks at the same position.
[0100] For the decoding end, the following processes can be included:
[0101] 1) Obtain the syntax elements
[0102] Obtain the intra_tmp_flag and intra_tmp_reg syntax elements through entropy decoding parsing. When intra_tmp_flag is 1, it indicates the use of the IntraTMP mode, and intra_tmp_reg represents the optimal search region index of the current block. If the IntraTMP mode is used, the following intra-frame template matching prediction operation is performed.
[0103] 2) Determine the target search region of the current block to be predicted
[0104] The search region width, search sub-region width, and template width are all configurable parameters, which can be directly obtained at the decoding end without decoding. Determine the overall searchable region of the current block to be predicted through the preset region parameters and further divide the searchable region according to the sub-region width. Determine the reference template (i.e., the search template) of the current block required for subsequent template matching through the template information. Determine the final search region (i.e., the target search region) through the intra_tmp_reg optimal search region index obtained by parsing.
[0105] 3) Determine the target prediction block of the current block to be predicted
[0106] The decoding end only performs template matching search operations within the above target search region. The SSD cost function can be used to evaluate the distortion between the candidate template and the template of the block to be predicted, obtain the similarity ranking of the candidate prediction blocks within the current target search region, and obtain the target prediction block of the current block to be predicted according to the ranking result. Compared with the full-region search, the sub-region division greatly reduces the search complexity of the decoding end.
[0107] This embodiment does not limit the values and methods of the search region width, search sub-region width, template width, distortion evaluation function, etc., which can be freely controlled and adjusted according to actual needs.
[0108] In the method of this embodiment, in the IntraTMP mode, by further dividing the search region, calculating the optimal search region (i.e., the target search region) at the encoding end and transmitting the identifier of the optimal search region, the mode matching search range at the decoding end is effectively reduced, which greatly reduces the search complexity at the decoding end. At the same time, the sub-region division can increase the number of RDO times, which helps to obtain a better prediction result.
[0109] Embodiment 2
[0110] In this embodiment, it is not limited to using the L-shaped reconstructed area at the top and left of the current block to be predicted as the search template. Considering factors such as different image texture features, different search template shapes can be supported during the template matching process. Technical details not described in detail in this embodiment can be referred to any of the above embodiments.
[0111] Encoding end process:
[0112] 1) Determine the search area
[0113] 2) Determine at least two search sub-areas according to the search area
[0114] 3) Perform matching search in each search sub-area using any of the following template shapes:
[0115] a. Use an L-shaped template as shown in the vertical line shaded area Figure 3 The L-shaped template.
[0116] b. Use L-shaped templates with different lengths or widths.
[0117] c. Use a cross-shaped template, that is, extend the L-shaped template to the left and upper sides, and the extension length can be freely controlled.
[0118] d. Use a T-shaped template, that is, extend the L-shaped template to the left or upper side, and the extension length can be freely controlled.
[0119] 4) Sort the matching results by similarity, obtain the predicted block vector for each area according to the sorting result, determine the target search area, and record the index of the target search area.
[0120] 5) Encode and transmit syntax elements.
[0121] Embodiment III
[0122] In this embodiment, it is possible to control whether to divide search sub-areas. Considering that deriving the predicted value of the block to be predicted for the candidate templates in only one search sub-area may not fully utilize the spatial non-local information in the search area, by adding a region division switch, a balance between search time and prediction quality is achieved. Technical details not described in detail in this embodiment can be referred to any of the above embodiments.
[0123] Encoding end process:
[0124] 1) Determine the search area
[0125] 2) Determine at least two search sub-areas according to the search area
[0126] 3) Determine the target search area, which can be the search area (i.e., the full search area) or any search sub-area
[0127] Perform reference template matching for the block to be predicted within the full search area. The SSD function can be used to sort the block similarities of the matching results. If the similarity differences of the candidate prediction blocks ranked among the top satisfy a certain threshold and these candidate prediction blocks belong to different sub-search areas, the sub-region division switch (indicating that region division is not required) is turned off, and the entire search area can be used as the target search area. If region division is required, refer to Step 3 of Embodiment 1 to determine the target search area.
[0128] 4) Encode the transmission syntax elements.
[0129] The sub-region division switch can be transmitted through a separate syntax element (the third indication information) or through a specific region index (utilizing the second indication information) without adding additional syntax elements.
[0130] Embodiment 4
[0131] In this embodiment, considering that the candidate templates ranked among the top in different search sub-regions may all have a high similarity to the search template, sub-template secondary matching can be selected to improve the prediction quality.
[0132] Encoding end process:
[0133] 1) Determine the search area
[0134] 2) Determine at least two search sub-regions according to the search area
[0135] 3) Determine the target search area
[0136] Obtain the similarity rankings of all candidate templates in each search sub-region respectively. Use a predefined sub-template to match the candidate templates ranked among the top in similarity in each sub-region. Select the corresponding candidate prediction blocks of the templates with the highest similarity after matching each sub-template as the objects for weighted processing, thereby obtaining the final candidate prediction blocks for each sub-region. On this basis, calculate the target search area and record the target search area index. The sub-template is a subset of the set search template, and several sub-templates can be divided from the search template.
[0137] 4) Encode the transmission syntax elements.
[0138] Decoding end process:
[0139] 1) Obtain the syntax elements.
[0140] The syntax elements include one or more of the first indication information, the second indication information, the third indication information, and the fourth indication information.
[0141] 2) Determine the target search area of the current block to be predicted.
[0142] Determine the target search area according to the second indication information or the third indication information.
[0143] Specifically, if there is third indication information and the third indication information indicates closed area division, the target search area of the current block to be predicted can be determined as the full search area accordingly; if the third indication information indicates area division, the target search area of the current block to be predicted can be determined as the target search area through the second indication information. If there is no indication information, the target search area of the current block to be predicted can also be determined as the full search area or the target search area through the identifier indicated by the second indication information.
[0144] 3) Determine the target prediction block of the current block to be predicted
[0145] Perform template matching within the target search area determined in step 2), use a predefined sub-template to match with the candidate templates ranked in the front in terms of similarity, and respectively select the corresponding candidate prediction blocks of the templates with the highest similarity after each sub-template matching as the objects for weighted processing, thereby obtaining the final best prediction block (i.e., the target prediction block).
[0146] Embodiment 5
[0147] This embodiment mainly describes the syntax elements related to the intra-template matching prediction technology in the video coding bitstream.
[0148] When introducing the IntraTMP technology in the EVM, an IntraTMP switch needs to be added to the sequence header and the picture header respectively. For each CU, two CU-level syntax elements, intra_tmp_flag and intra_tmp_reg, need to be identified. Intra_tmp_flag indicates whether the current CU uses the intraTMP mode, and intra_tmp_reg indicates the sub-region index that the decoding end needs to search. The specific syntax and semantics of the sequence header (Sequence Header) are shown in Table 1. The specific syntax and semantics of the picture header are shown in Table 2. The specific syntax and semantics of the coding unit (coding_unit) are shown in Table 3 or Table 4.
[0149] Table 1 Syntax of Sequence Header
[0150] sequence_header(){ …… intra_tmp_flag u(1) …… }
[0151] Semantics: Intra_tmp_flag: Equal to 1 indicates that the current video sequence adopts the IntraTMP mode.
[0152] Table 2 Syntax of picture header
[0153]
[0154] Semantics: picture_intra_tmp_flag: Equal to 1 indicates that the current frame adopts the IntraTMP mode.
[0155] Table 3 Syntax of coding_unit
[0156]
[0157] Semantics: intra_tmp_flag being 1 indicates that the current coding block uses the IntraTMP technology. If the current block uses the IntraTMP technology, the best search region or the full search region of the current block is identified by intra_tmp_reg. If intra_tmp_flag is 0, the sub-region index transmission is skipped.
[0158] Table 4 Syntax of Another coding_unit
[0159]
[0160]
[0161] Semantics: Refer to the description in Table 3. If the current block uses the IntraTMP technology, it is indicated by intra_tmp_reg_div_flag whether to divide the search sub-region. If intra_tmp_reg_div_flag is 0, it means not to divide the search sub-region. If intra_tmp_reg_div_flag is 1, the target search region of the current block is identified by intra_tmp_reg.
[0162] The intra-frame template matching prediction method according to the embodiments of the present application further divides the entire search area, performs template matching in each search sub-area respectively, and after the candidate prediction blocks corresponding to the templates in each search sub-area and the current block to be predicted pass through the RDO decision, the identifier of the search sub-area where the template corresponding to the selected best candidate prediction block is located is sent to the decoding end. The decoding end can directly perform template matching in the corresponding search sub-area according to the search sub-area identifier, thereby effectively reducing the search area range and achieving the purpose of reducing the complexity of the decoding end. By weighting the prediction blocks corresponding to the templates with the top distortion rankings in each area, more comprehensive non-local information can be utilized. During the search process, the neighborhood L-shaped reconstructed area is used as the template, and through the matching between the template corresponding to the block to be predicted and the candidate template, the prediction block corresponding to the optimal template is selected as the prediction of the current block. The shape of the template can be adjusted, for example, a cross shape or a T shape can be selected, and only the requirement is that the coverage range of the template is the reconstructed area. By judging according to the distortion evaluation results of the candidate templates and the template to be predicted in the full search area, whether to divide the search area is selected to reduce unnecessary calculations. After several best matching templates are found, sub-templates can be selected to perform secondary matching on these best matching templates, and template fusion is performed respectively to obtain the optimal template prediction.
[0163] The embodiments of the present application further provide an intra-frame template matching prediction device. Figure 5 FIG. is a schematic structural diagram of an intra-frame template matching prediction device provided for an embodiment. As Figure 5 shown, the intra-frame template matching prediction device includes:
[0164] A first determination module 310, configured to determine the search template and search area of the current block to be predicted;
[0165] A division module 320, configured to determine at least two search sub-areas according to the search area;
[0166] A search module 330, configured to search for at least one candidate template that matches the search template in each search sub-area;
[0167] A second determination module 340, configured to determine the target prediction block and the target search area corresponding to the current block to be predicted according to the candidate prediction blocks corresponding to the candidate templates, where the target search area is the area where the candidate template corresponding to the target prediction block is located.
[0168] In an embodiment, the device further includes:
[0169] A first indication module, configured to determine first indication information, where the first indication information is used to indicate whether to adopt the intra-frame template matching prediction mode.
[0170] In one embodiment, the apparatus further comprises:
[0171] A second indication module, configured to determine a target search area for second indication information, where the second indication information is used to indicate an identifier of the target search area, and the identifier of the target search area is the identifier of the search area or the identifier of one of at least two search sub-areas.
[0172] In one embodiment, the apparatus further comprises:
[0173] A third indication module, configured to determine third indication information, where the third indication information is used to indicate whether at least two search sub-areas are determined according to the search area.
[0174] In one embodiment, the apparatus further comprises:
[0175] A fourth indication module, configured to determine fourth indication information, where the fourth indication information is used to indicate the number of candidate templates in each search sub-area, and / or is used to indicate that the target prediction block is a single candidate prediction block or is obtained by weighted fusion of multiple candidate prediction blocks.
[0176] In one embodiment, the search module 330 is configured to be one of the following:
[0177] For each search sub-area, determine at least one candidate template according to the similarity between the search template and each template in the search sub-area;
[0178] Determine at least one candidate template that matches the search template in each search sub-area through a neural network or deep learning.
[0179] In one embodiment, the search module 330 is configured to:
[0180] Determine the template with the highest similarity between the search template and the templates in the search sub-area as the candidate template.
[0181] In one embodiment, the search module 330 includes:
[0182] A sorting unit, configured to sort the templates according to the similarity between the search template and each template in the search sub-area;
[0183] A template determination unit, configured to determine at least two templates with a higher ranking as candidate templates.
[0184] In one embodiment, the second determination module 340 is configured to: determine the target prediction block corresponding to the current block to be predicted according to the similarity between the candidate prediction block corresponding to the candidate template and the current prediction block.
[0185] In one embodiment, the second determination module 340 is configured to: determine, as the target prediction block, the candidate prediction block with the highest similarity to the current prediction block among the candidate prediction blocks corresponding to the candidate template.
[0186] In one embodiment, when the candidate template includes at least two templates with a relatively high ranking, the candidate prediction blocks corresponding to the candidate template are obtained by weighting the prediction blocks corresponding to the at least two templates with a relatively high ranking.
[0187] In one embodiment, when there are at least two templates whose similarity to the search template meets the set conditions and the at least two candidate prediction blocks belong to different search sub-regions, the search region division condition is not satisfied.
[0188] In one embodiment, the search template includes one of the following:
[0189] An L-shaped template formed by the reconstructed region at the top and the reconstructed region on the left of the current block to be predicted;
[0190] A cross-shaped template extended according to the reconstructed region at the top and the reconstructed region on the left of the current block to be predicted;
[0191] A T-shaped template extended according to the reconstructed region at the top and the reconstructed region on the left of the current block to be predicted.
[0192] In one embodiment, the division module 320 is configured to:
[0193] Determine the search region as at least two search sub-regions according to the size of the current block to be predicted and the search template.
[0194] In one embodiment, after searching for at least one candidate template matching the search template in each search sub-region, the apparatus further includes:
[0195] A matching module configured to determine the candidate template that matches the sub-template among the at least one candidate template, where the sub-template belongs to a subset of the search template.
[0196] The intra-frame template matching prediction apparatus proposed in this embodiment and the intra-frame template matching prediction method proposed in the above embodiment belong to the same inventive concept. Technical details not described in detail in this embodiment can be referred to in any of the above embodiments, and this embodiment has the same beneficial effects as those of the intra-frame template matching prediction method.
[0197] An embodiment of the present application further provides an intra-frame template matching prediction apparatus. Figure 6 FIG. is a schematic structural diagram of another intra-frame template matching prediction apparatus provided for an embodiment. As Figure 6 shown, the intra-frame template matching prediction apparatus includes:
[0198] A determination module 410, configured to determine a search template and a target search area for a currently to-be-predicted block.
[0199] A search module 420, configured to search for at least one candidate template that matches the search template within the target search area.
[0200] A prediction module 430, configured to determine a target prediction block corresponding to the currently to-be-predicted block according to a candidate prediction block corresponding to the candidate template.
[0201] In one embodiment, before determining the search template and the target search area for the currently to-be-predicted block, the apparatus further includes: a mode determination module, configured to determine to adopt an intra-frame template matching prediction mode according to first indication information.
[0202] In one embodiment, the apparatus further includes:
[0203] An area indication module, configured to determine second indication information, where the second indication information includes one of the following: an identifier of the search area; an identifier of the target search area; an identifier of the search area and identifiers of each search sub-area.
[0204] In one embodiment, the apparatus further includes:
[0205] A division indication module, configured to determine third indication information, where the third indication information is used to indicate whether to determine at least two search sub-areas according to the search area.
[0206] In one embodiment, the apparatus further includes:
[0207] A fusion indication module, configured to determine fourth indication information, where the fourth indication information is used to indicate the number of candidate templates in each search sub-area, and / or is used to indicate that the target prediction block is a single candidate prediction block or is obtained by weighted fusion of multiple candidate prediction blocks.
[0208] In one embodiment, the search module 420 is configured as one of the following:
[0209] Determine at least one candidate template according to the similarity between the search template and each template in the target search area;
[0210] Determine at least one candidate template that matches the search template in the target search area through a neural network or deep learning.
[0211] In one embodiment, the search module 420 is configured to:
[0212] Determine the template with the highest similarity between the search template and the target search area as the candidate template.
[0213] In one embodiment, the search module 420 includes:
[0214] A sorting unit configured to sort the templates according to the similarity between the search template and each template within the target search area;
[0215] A template determination unit configured to determine at least two templates with a higher ranking as candidate templates.
[0216] In one embodiment, the prediction module 430 is configured to: determine the target prediction block corresponding to the current block to be predicted according to the similarity between the candidate prediction block corresponding to the candidate template and the current prediction block.
[0217] In one embodiment, the prediction module 430 is configured to: determine the candidate prediction block with the highest similarity to the current prediction block among the candidate prediction blocks corresponding to the candidate templates as the target prediction block.
[0218] In one embodiment, the prediction module 430 is configured to: when the candidate prediction block corresponding to the candidate template has the highest similarity to the current prediction block, in the case where the candidate template includes at least two templates with a higher ranking, the candidate prediction block corresponding to the candidate template is obtained by weighting the prediction blocks corresponding to the at least two templates with a higher ranking.
[0219] In one embodiment, the prediction module 430 is configured to: when the candidate prediction block corresponding to the candidate template has the highest similarity to the current prediction block, in the case where there are at least two templates whose similarity to the search template meets the set conditions and the at least two candidate prediction blocks belong to different search sub - regions, the search region division condition is not satisfied.
[0220] In one embodiment, the search template includes one of the following:
[0221] An L - shaped template formed by the reconstructed region at the top and the reconstructed region on the left of the current block to be predicted;
[0222] A cross - shaped template extended according to the reconstructed region at the top and the reconstructed region on the left of the current block to be predicted;
[0223] A T - shaped template extended according to the reconstructed region at the top and the reconstructed region on the left of the current block to be predicted.
[0224] In one embodiment, the apparatus further includes:
[0225] A division module configured to determine the search region as at least two search sub - regions according to the size of the current block to be predicted and the search template.
[0226] In one embodiment, after searching for at least one candidate template that matches the search template within the target search area, the apparatus further includes: a matching module configured to determine a candidate template among the at least one candidate template that matches a sub-template, where the sub-template belongs to a subset of the search template.
[0227] The intra-frame template matching prediction apparatus proposed in this embodiment and the intra-frame template matching prediction method proposed in the above embodiment belong to the same inventive concept. Technical details not described in detail in this embodiment can be referred to in any of the above embodiments, and this embodiment has the same beneficial effects as the execution of the intra-frame template matching prediction method.
[0228] An embodiment of the present application also provides a processing node, Figure 7 which is a schematic hardware structure diagram of a processing node provided in an embodiment, as Figure 7 shown. The processing node provided by the present application includes a processor 510 and a memory 520; the processor 510 in the processing node can be one or more, Figure 7 and one processor 510 is taken as an example here; the memory 520 is configured to store one or more programs; the one or more programs are executed by the one or more processors 510, so that the one or more processors 510 implement the intra-frame template matching prediction method as described in the embodiments of the present application.
[0229] The processing node further includes: a communication device 530, an input device 540, and an output device 550.
[0230] The processor 510, memory 520, communication device 530, input device 540, and output device 550 in the processing node can be connected by a bus or other means, Figure 7 and taking connection by bus as an example here.
[0231] The input device 540 can be used to receive input digital or character information, and generate key signal inputs related to user settings and function controls of the processing node. The output device 550 can include a display device such as a display screen.
[0232] The communication device 530 can include a receiver and a transmitter. The communication device 530 is configured to perform information transceiver communication according to the control of the processor 510.
[0233] The memory 520, being a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the intra-frame template matching prediction method described in the embodiments of the present application (for example, the first determination module 310, the division module 320, the search module 330, and the second determination module 340 in the intra-frame template matching prediction device). The memory 520 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of processing nodes, etc. In addition, the memory 520 can include high-speed random access memory and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory 520 can further include a memory remotely disposed relative to the processor 510, and these remote memories can be connected to the processing node through a network. Examples of the above-mentioned network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0234] The embodiments of the present application further provide a storage medium storing a computer program, which when executed by a processor implements any one of the intra-frame template matching prediction methods in the embodiments of the present application. The intra-frame template matching prediction method includes: determining a search template and a search area for a current block to be predicted; determining at least two search sub-areas according to the search area; searching for at least one candidate template matching the search template in each search sub-area; and determining a target prediction block and a target search area corresponding to the current block to be predicted according to the candidate prediction block corresponding to the candidate template, where the target search area is the area where the candidate template corresponding to the target prediction block is located.
[0235] Alternatively, the intra-frame template matching prediction method includes: determining a search template and a target search area for a current block to be predicted; searching for at least one candidate template matching the search template in the target search area; and determining a target prediction block corresponding to the current block to be predicted according to the candidate prediction block corresponding to the candidate template.
[0236] The computer storage medium of the embodiments of the present application may adopt any combination of one or more computer-readable media. The computer-readable media may be computer-readable signal media or computer-readable storage media. The computer-readable storage media may be, for example, but not limited to: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples (non-exhaustive list) of the computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fibers, portable CD-ROMs, optical storage devices, magnetic storage devices, or any suitable combination of the above. The computer-readable storage media may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component.
[0237] The computer-readable signal media may include data signals propagated in a baseband or as part of a carrier wave, which carry computer-readable program codes. Such propagated data signals may take various forms, including but not limited to: electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal media may also be any computer-readable medium other than the computer-readable storage media, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or component.
[0238] The program codes contained on the computer-readable media may be transmitted by any appropriate medium, including but not limited to: wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the above.
[0239] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or, can be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).
[0240] As described above, the above are only exemplary embodiments of this application and are not intended to limit the protection scope of this application.
[0241] Those skilled in the art should understand that the term user terminal covers any suitable type of wireless user equipment, such as a mobile phone, a portable data processing device, a portable network browser, or an in-vehicle mobile station.
[0242] Generally speaking, various embodiments of this application can be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. For example, some aspects can be implemented in hardware, while other aspects can be implemented in firmware or software that can be executed by a controller, a microprocessor, or other computing devices, although this application is not limited thereto.
[0243] Embodiments of this application can be implemented by a data processor of a mobile device executing computer program instructions, for example, in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages.
[0244] Any block diagram of a logical process in the accompanying drawings of the present application may represent program steps, or may represent interconnected logical circuits, modules, and functions, or may represent a combination of program steps and logical circuits, modules, and functions. A computer program may be stored in a memory. The memory may be of any type suitable for the local technical environment and may be implemented using any suitable data storage technology, such as but not limited to Read-Only Memory (ROM), Random Access Memory (RAM), optical memory devices and systems (such as Digital Video Disc (DVD) or Compact Disk (CD), etc.). The computer-readable medium may include a non-transitory storage medium. The data processor may be of any type suitable for the local technical environment, such as but not limited to a general-purpose computer, a special-purpose computer, a microprocessor, a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FGPA), and a processor based on a multi-core processor architecture.
[0245] By way of illustrative and non-limiting examples, a detailed description of exemplary embodiments of the present application has been provided above. However, various modifications and adaptations of the above embodiments will be apparent to those skilled in the art upon consideration of the accompanying drawings and the claims, without departing from the scope of the present application. Accordingly, the proper scope of the present application will be determined in accordance with the claims.
Claims
1. An intra-frame template matching prediction method, It is characterized in that include: Determine the search template and search area of the current block to be predicted; Determine at least two search sub-areas according to the search area; Searching for at least one candidate template matching the search template in each search sub-area; A target prediction block and a target search area corresponding to the current block to be predicted are determined according to the candidate prediction block corresponding to the candidate template, wherein the target search area is the area where the candidate template corresponding to the target prediction block is located, and the target search area is a search sub-area or the search area.
2. The method according to claim 1, It is characterized in that Also includes: Determine first indication information, where the first indication information is used to indicate whether to adopt an intra-frame template matching prediction mode.
3. The method according to claim 1, It is characterized in that Also includes: Second indication information is determined, where the second indication information is used to indicate an identifier of a target search area, where the identifier of the target search area is an identifier of the search area or an identifier of one of the at least two search sub-areas.
4. The method according to claim 1, It is characterized in that Also includes: Determine third indication information, where the third indication information is used to indicate whether to determine at least two search sub-areas based on the search area.
5. The method according to claim 1, It is characterized in that Also includes: Determine fourth indication information, where the fourth indication information is used to indicate the number of candidate templates in each search sub-region and / or to indicate that the target prediction block is a single candidate prediction block or is obtained by weighted fusion of multiple candidate prediction blocks.
6. The method according to claim 1, It is characterized in that Searching for at least one candidate template matching the search template in each search sub-area includes one of the following: For each search sub-region, at least one candidate template is determined according to the similarity between the search template and each template in the search sub-region.
7. The method according to claim 6, It is characterized in that Determining at least one candidate template according to the similarity between the search template and each template in the search sub-area includes: The template with the highest similarity to the search template in the search sub-region is determined as a candidate template.
8. The method according to claim 6, It is characterized in that Determining at least one candidate template according to the similarity between the search template and each template in the search sub-area includes: sorting the templates according to the similarity between the search template and each template in the search sub-region; At least two templates ranked top are determined as candidate templates.
9. The method according to claim 1, It is characterized in that Determining a target prediction block corresponding to the current block to be predicted according to the candidate prediction block corresponding to the candidate template includes: A target prediction block corresponding to the current block to be predicted is determined according to the similarity between the candidate prediction block corresponding to the candidate template and the current prediction block.
10. The method according to claim 9, It is characterized in that Determining a target prediction block corresponding to the current block to be predicted according to a similarity between a candidate prediction block corresponding to the candidate template and the current prediction block includes: A candidate prediction block having the highest similarity with the current prediction block among the candidate prediction blocks corresponding to the candidate template is determined as the target prediction block.
11. The method according to claim 9, It is characterized in that In the case that the candidate templates include at least two templates ranked higher, the candidate prediction blocks corresponding to the candidate templates are obtained by weighting the prediction blocks corresponding to the at least two templates ranked higher.
12. The method according to claim 1, It is characterized in that The search template includes one of the following: An L-shaped template consisting of a reconstructed area on the top and a reconstructed area on the left of the current block to be predicted; A cross-shaped template obtained by extending the reconstructed area on the top and the reconstructed area on the left of the current block to be predicted; A T-shaped template is obtained by extending the reconstructed area on the top and the reconstructed area on the left of the current block to be predicted.
13. The method according to claim 12, It is characterized in that Determining at least two search sub-areas according to the search area includes: The search area is determined to be divided into at least two search sub-areas according to the size of the current block to be predicted and the search template.
14. An intra-frame template matching prediction method, It is characterized in that include: Determine the search template and target search area of the current block to be predicted; Searching for at least one candidate template matching the search template in the target search area; Determine a target prediction block corresponding to the current block to be predicted according to the candidate prediction block corresponding to the candidate template.
15. The method according to claim 14, It is characterized in that Before determining the search template and target search area of the current block to be predicted, it also includes: Determine, according to the first indication information, to adopt the intra-frame template matching prediction mode.
16. The method according to claim 14, It is characterized in that The target search area is determined according to the second indication information; The method further comprises: Second indication information is received, where the second indication information is used to indicate an identifier of a target search area, where the identifier of the target search area is an identifier of a search area of the current block to be predicted or an identifier of one of at least two search sub-areas.
17. The method according to claim 14, It is characterized in that Also includes: Determine third indication information, where the third indication information is used to indicate whether to determine at least two search sub-areas based on the search area.
18. The method according to claim 14, It is characterized in that Also includes: Determine fourth indication information, where the fourth indication information is used to indicate the number of candidate templates in each search sub-region and / or to indicate that the target prediction block is a single candidate prediction block or is obtained by weighted fusion of multiple candidate prediction blocks.
19. The method according to claim 14, It is characterized in that Searching for at least one candidate template matching the search template in the target search area includes one of the following: Determine at least one candidate template according to the similarity between the search template and each template within the target search area.
20. The method according to claim 19, wherein, determining at least one candidate template according to the similarity between the search template and each template within the target search area includes: Determine the template with the highest similarity to the search template within the target search area as the candidate template.
21. The method according to claim 19, wherein, determining at least one candidate template according to the similarity between the search template and each template within the target search area includes: Sort the templates according to the similarity between the search template and each template within the target search area; Determine at least two templates with a higher ranking as candidate templates.
22. The method according to claim 14, wherein, determining the target prediction block corresponding to the current block to be predicted according to the candidate prediction block corresponding to the candidate template includes: Determine the target prediction block corresponding to the current block to be predicted according to the similarity between the candidate prediction block corresponding to the candidate template and the current prediction block.
23. The method according to claim 22, wherein, determining the target prediction block corresponding to the current block to be predicted according to the similarity between the candidate prediction block corresponding to the candidate template and the current prediction block includes: Determine the candidate prediction block with the highest similarity to the current prediction block among the candidate prediction blocks corresponding to the candidate template as the target prediction block.
24. The method according to claim 22, wherein, in the case that the candidate template includes at least two templates with a higher ranking, the candidate prediction block corresponding to the candidate template is obtained by weighting the prediction blocks corresponding to the at least two templates with a higher ranking.
25. The method according to claim 14, wherein, the search template includes one of the following: An L-shaped template formed by the reconstructed area at the top and the reconstructed area on the left of the current block to be predicted; A cross-shaped template extended according to the reconstructed area at the top and the reconstructed area on the left of the current block to be predicted; A T-shaped template extended according to the reconstructed area at the top and the reconstructed area on the left of the current block to be predicted.
26. The method according to claim 25, wherein, further includes: Determine the search area as at least two search sub-areas according to the size of the current block to be predicted and the search template.
27. A processing node, wherein, includes: A memory, and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the intra-frame template matching prediction method according to any one of claims 1-26.
28. A computer-readable storage medium, on which a computer program is stored, wherein, when the program is executed by a processor, it implements the intra-frame template matching prediction method according to any one of claims 1-26.