Prediction mode processing method, device and equipment
By filtering the template pixels of the image block, the amplitude of the intra-frame prediction mode is obtained, which solves the problem that the decoder cannot obtain DIMD candidate mode information and improves image processing efficiency.
Patent Information
- Application Number
- CN202410430089.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2025-10-17
AI Technical Summary
In the intra-frame prediction mode derivation at the decoding end, the DIMD candidate mode information cannot be obtained, resulting in reduced image processing efficiency.
The template pixels of the target image block are filtered to obtain the filtered template pixels. The amplitude of the intra-prediction mode is obtained through the template pixel histogram, and the candidate mode information of the intra-prediction mode (DIMD) of the target decoder is determined based on the amplitude.
This increases the probability of obtaining DIMD candidate mode information for image blocks, thereby improving image processing efficiency.
Smart Images

Figure CN120812286A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of coding technology, and particularly relates to a processing method, device and equipment of a prediction mode. BACKGROUND
[0002] In a related decoder-side intra mode derivation (DIMD) technology, a decoder applies horizontal and vertical Sobel filters to pixels in a template with a width of N around a block to perform gradient histogram calculation, then converts the direction of the gradient into an intra angular prediction mode, and accumulates the intensity of the gradient as the amplitude of the corresponding intra angular mode, and derives the intra prediction mode by comparing the amplitude in the gradient histogram. In the related technology, the DIMD candidate mode information in the DIMD merge mode list is obtained based on the DIMD candidate mode information of the coded image block, and if there is no coded image block at present, the DIMD candidate mode information cannot be obtained based on the DIMD merge mode list. Therefore, there is a possibility that the DIMD candidate mode information cannot be obtained based on the DIMD merge mode list, and further, a prediction block cannot be generated based on the corresponding DIMD candidate mode information, thereby reducing the processing efficiency of the image. SUMMARY
[0003] Embodiments of the present application provide a processing method, device and equipment of a prediction mode, which can solve the problem of how to reduce the probability that the decoder cannot obtain the DIMD candidate mode information.
[0004] In a first aspect, a processing method of a prediction mode is provided, which is executed by an electronic device and includes the following steps.
[0005] Filtering processing is performed on template pixels corresponding to a target image block to obtain filtered template pixels, the template pixels including at least part of reconstructed pixels in a neighboring pixel region of the target image block;
[0006] According to the filtered template pixels, the amplitudes of at least one intra prediction mode are obtained.
[0007] According to the amplitudes of the at least one intra prediction mode, target decoder-derived intra prediction mode (DIMD) candidate mode information is determined.
[0008] In a second aspect, a processing device of a prediction mode is provided, which includes the following modules.
[0009] A first obtaining module is configured to perform filtering processing on template pixels corresponding to a target image block to obtain filtered template pixels, the template pixels including at least part of reconstructed pixels in a neighboring pixel region of the target image block;
[0010] a second obtaining module, configured to obtain an amplitude of at least one intra prediction mode according to the filtered template pixels;
[0011] a determining module, configured to determine target decoder derived intra mode (DIMD) candidate mode information according to the amplitude of the at least one intra prediction mode.
[0012] In a third aspect, an electronic device is provided, which includes a processor and a memory. The memory stores programs or instructions executable on the processor. When the programs or instructions are executed by the processor, the steps of the method according to the first aspect are implemented.
[0013] In a fourth aspect, an electronic device is provided, which includes a processor and a communication interface. The processor is configured to perform filtering processing on template pixels corresponding to a target image block to obtain filtered template pixels. The template pixels include at least part of reconstructed pixels in a neighboring pixel region of the target image block. The processor is further configured to obtain an amplitude of at least one intra prediction mode according to the filtered template pixels, and determine target decoder derived intra mode (DIMD) candidate mode information according to the amplitude of the at least one intra prediction mode.
[0014] In a fifth aspect, a readable storage medium is provided. The readable storage medium stores programs or instructions. When the programs or instructions are executed by a processor, the steps of the method according to the first aspect are implemented.
[0015] In a sixth aspect, a chip is provided. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to run programs or instructions to implement the method according to the first aspect.
[0016] In a seventh aspect, a computer program / program product is provided. The computer program / program product is stored in a storage medium. The computer program / program product is executed by at least one processor to implement the steps of the method according to the first aspect.
[0017] In the embodiments of the present application, filtering processing is performed on template pixels corresponding to a target image block to obtain filtered template pixels. The template pixels include at least part of reconstructed pixels in a neighboring pixel region of the target image block. An amplitude of at least one intra prediction mode is obtained according to the filtered template pixels. Target decoder derived intra mode (DIMD) candidate mode information is determined according to the amplitude of the at least one intra prediction mode. Since the image block basically has corresponding template pixels, each image block can determine the target DIMD candidate mode information based on the filtered template pixels, thereby greatly improving the probability of obtaining the DIMD candidate mode information of the image block, and further effectively improving the image processing efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 A flowchart of a processing method of a prediction mode of an embodiment of the present application is shown in FIG. 1;
[0019] Figure 2 A schematic diagram of filtered template pixels in an embodiment of the present application is shown in FIG. 2;
[0020] Figure 3 A schematic diagram of filtered template pixels in an embodiment of the present application is shown in FIG. 3;
[0021] Figure 4 A schematic diagram of a first part of pixels and a second part of pixels in an embodiment of the present application is shown in FIG. 4;
[0022] Figure 5 A module schematic diagram of a processing device of a prediction mode of an embodiment of the present application is shown in FIG. 5;
[0023] Figure 6 A structure block diagram of an electronic device of an embodiment of the present application is shown in FIG. 6;
[0024] Figure 7 A structure block diagram of a terminal of an embodiment of the present application is shown in FIG. 7. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of them. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.
[0026] The terms "first", "second", etc. in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second" are usually a category, and are not limited to the number of objects, for example, the first object can be one or more. In addition, "or" in the present application means at least one of the connected objects. For example, "A or B" covers three scenarios, namely, scenario one: including A and not including B; scenario two: including B and not including A; scenario three: including A and including B. The character " / " generally represents that the objects before and after are in an "or" relationship.
[0027] The term "indication" in the present application can be a direct indication (or explicit indication) or an indirect indication (or implicit indication). The direct indication can be understood as that the sender explicitly informs the receiver of specific information, operation to be performed or requested result, etc. in the sent indication. The indirect indication can be understood as that the receiver determines the corresponding information according to the indication sent by the sender, or judges and determines the operation to be performed or the requested result according to the judgment result.
[0028] In order for those skilled in the art to better understand the embodiments of the present application, the following is first described.
[0029] In video coding, a frame of image is divided into many macroblocks, and a prediction block is obtained by using intra prediction or inter prediction. The difference between the original block and the prediction block is a residual block, and then the residual block is transformed, quantized and entropy coded.
[0030] (1) Intra prediction;
[0031] There are many prediction modes for intra prediction to deal with various types of textures in the image, including DC, planar and some angle prediction modes. The prediction values of the current prediction block are obtained by using the surrounding reconstructed pixels as input and by using the specified prediction mode, so as to achieve the purpose of removing spatial redundancy. The specified prediction mode index can be explicitly obtained from the code stream, or can be implicitly inferred from the decoding end.
[0032] (2) DIMD;
[0033] DIMD mode is a technology for implicitly deriving an intra prediction mode. At the decoding end, the gradient histogram calculation is performed by applying horizontal and vertical Sobel filters to the pixels in a template with a width of N around the block, then the direction of the gradient is converted into an intra angle prediction mode, and the intensity of the gradient is accumulated as the amplitude of the corresponding intra angle mode, and the intra prediction mode is derived by comparing the amplitude size in the gradient histogram. The template pixels are at least part of the pixel region adjacent to the target image block.
[0034] For the luminance component, up to 5 intra prediction modes and their corresponding weights are derived by using the histogram, and the planar mode (with a fixed weight of 16 / 64) is derived, and up to 6 intra prediction modes are fused to obtain the final luminance prediction value.
[0035] For the chrominance component, the DIMD chrominance mode uses the DIMD derivation method to derive the chrominance intra prediction mode of the current block based on the adjacent reconstructed luminance and chrominance (Cb and Cr) samples in the second adjacent row and column. Specifically, the horizontal gradient and the vertical gradient are calculated based on the same position of the reconstructed luminance sample and the reconstructed chrominance sample of the current chrominance block to construct a histogram.
[0036] (3) DIMD Merge mode candidate list;
[0037] The DIMD Merge mode candidate list may include at least one of the following:
[0038] A1: DIMD candidate mode information from the adjacent spatial domain, that is, the DIMD candidate mode information of the adjacent image block is used as the DIMD candidate mode information of the current image block;
[0039] A2: DIMD candidate mode information from non-adjacent spatial domains, that is, the DIMD candidate mode information of non-adjacent image blocks is used as the DIMD candidate mode information of the current image block;
[0040] A3: DIMD candidate information derived using MHoG;
[0041] The DIMD candidate information includes at least one intra prediction mode and corresponding weight information.
[0042] MhoG: New DIMD candidate information is derived using DIMD candidate information of at least two image blocks. The at least two image blocks may be adjacent to the current image block or non-adjacent to the current image block, or some of the at least two image blocks may be adjacent to the current image block and the other may be non-adjacent to the current image block. Specifically, the new DIMD candidate information may be derived using a certain algorithm based on the DIMD candidate information of the at least two image blocks, such as by superimposing the DIMD candidate information of the at least two image blocks.
[0043] The following describes in detail the processing method of the prediction model provided by the embodiment of the present application through some embodiments and their application scenarios in combination with the accompanying drawings.
[0044] like Figure 1 As shown, an embodiment of the present application provides a method for processing a prediction mode, which is executed by an electronic device. The method includes:
[0045] Step 101: filtering the template pixels corresponding to the target image block to obtain filtered template pixels, where the template pixels include at least part of the reconstructed pixels in the adjacent pixel area of the target image block.
[0046] The target image block is an image block that needs to be intra-predicted.
[0047] Optionally, a distance between pixels in the adjacent pixel area and pixels of the target image block is less than or equal to a preset distance.
[0048] Step 102: obtaining an amplitude of at least one intra prediction mode according to the filtered template pixels.
[0049] As an implementation manner, the step 102 comprises:
[0050] obtaining a template pixel histogram according to the filtered template pixels, the template pixel histogram being used to indicate a correspondence between an identity of the at least one intra prediction mode and the amplitude of the intra prediction mode;
[0051] obtaining the at least one intra prediction mode and the amplitude of the at least one intra prediction mode according to the template pixel histogram.
[0052] Optionally, in a case that all the template pixels are filtered, the at least one intra prediction mode and the amplitude of the at least one intra prediction mode are obtained based on the filtered template pixels.
[0053] In a case that part of the template pixels are filtered, the at least one intra prediction mode and the amplitude of the at least one intra prediction mode are obtained based on the filtered template pixels and the template pixels that are not filtered, or based on the filtered template pixels.
[0054] It should be noted that, in the embodiments of the present application, the filtered template pixels refer to the reconstructed pixels in the template pixels that are filtered, and the template pixels that are not filtered refer to the reconstructed pixels in the template pixels that are not filtered.
[0055] Filtering the template pixels can enhance the main texture direction in the template pixels, so that the intra prediction mode of the main texture direction can be obtained based on the filtered template pixels, and the prediction result is more accurate.
[0056] Step 103: determining target decoder-derived intra prediction mode (DIMD) candidate mode information according to the amplitude of the at least one intra prediction mode.
[0057] The target DIMD candidate mode information comprises a target intra prediction mode determined from the at least one intra prediction mode, or comprises the target intra prediction mode determined from the at least one intra prediction mode and a preset parameter corresponding to the target intra prediction mode.
[0058] The electronic device can generate a prediction block of the target image block by using the target DIMD candidate mode information.
[0059] Optionally, the electronic device is a decoder.
[0060] In the embodiment of the present application, the template pixels corresponding to the target image block are filtered to obtain filtered template pixels, the template pixels including at least part of the reconstructed pixels in the adjacent pixel region of the target image block; the amplitudes of at least one intra prediction mode are obtained according to the filtered template pixels; and the target decoding-side derived intra prediction mode (DIMD) candidate mode information is determined according to the amplitudes of the at least one intra prediction mode. Since the image block basically has corresponding template pixels, each image block can determine the target DIMD candidate mode information based on the filtered template pixels, thereby greatly improving the probability of obtaining the DIMD candidate mode information of the image block, and further effectively improving the image processing efficiency.
[0061] Optionally, the determining the target decoding-side derived intra prediction mode (DIMD) candidate mode information according to the amplitudes of the at least one intra prediction mode comprises:
[0062] determining a target intra prediction mode from the at least one intra prediction mode according to the amplitudes of the at least one intra prediction mode, and determining a preset parameter corresponding to the target intra prediction mode;
[0063] obtaining the target DIMD candidate mode information according to the target intra prediction mode and the preset parameter.
[0064] As an implementation manner, M intra prediction modes with the largest amplitudes are selected from the at least two intra prediction modes as the target intra prediction modes, wherein M is a positive integer.
[0065] Optionally, M is less than N, N is the number of the intra prediction modes determined based on the unfiltered template pixels and used for predicting the target image block, and N is a positive integer.
[0066] Here, the M intra prediction modes with the largest amplitudes can obtain the intra prediction mode of the main texture direction in the template pixels, and can achieve the purpose of predicting based on the main texture direction, while reducing the encoding complexity.
[0067] Optionally, the prediction parameter includes a weight, and can also include other parameters, which are not limited here.
[0068] Optionally, the method of the embodiment of the present application further comprises:
[0069] obtaining a target list according to the target DIMD candidate mode information.
[0070] For example, the target DIMD candidate mode information is added to the target list.
[0071] Optionally, the target list is a DIMD merge mode candidate list.
[0072] In the embodiments of the present application, different target DIMD candidate mode information can be obtained through different filters. The target list includes at least one target DIMD candidate mode information.
[0073] Optionally, the target list further includes at least one of the following:
[0074] B1: first DIMD candidate mode information, which is obtained based on the prediction mode information of the image block adjacent to the target image block. For example, the prediction mode information of the image block adjacent to the target image block is taken as the prediction mode information of the current image block (i.e. the first DIMD candidate mode information). The first DIMD candidate mode information can also be described as the DIDM candidate mode information obtained based on the adjacent spatial domain DIMD candidate mode information.
[0075] B2: second DIMD candidate mode information, which is obtained based on the prediction mode of the image block not adjacent to the target image block. The second DIMD candidate mode information can also be described as the DIDM candidate mode information obtained based on the non-adjacent spatial domain DIMD candidate mode information.
[0076] For example, the prediction mode information of the image block not adjacent to the target image block is taken as the prediction mode information of the current image block (i.e. the second DIMD candidate mode information).
[0077] B3: third DIMD candidate mode information, which is obtained based on the prediction mode information of at least two image blocks. The third DIMD candidate mode information can also be described as the DIDM candidate mode information obtained based on the MHoG, i.e. the DIDM candidate mode information obtained based on the DIMD candidate mode information of at least two image blocks.
[0078] For example, the prediction mode information of at least two image blocks is processed according to a preset algorithm to obtain the prediction mode information of the current image block (i.e. the third DIMD candidate mode information).
[0079] In the embodiments of the present application, the DIMD merge mode candidate list contains target DIMD candidate mode information determined based on the filtered template pixels and at least one of the DIDM candidate mode information obtained based on the above-mentioned adjacent spatial domain-based DIMD candidate mode information, the DIDM candidate mode information obtained based on the non-adjacent spatial domain-based DIMD candidate mode information, and the DIMD candidate mode information obtained based on the MHoG, so that the types of the DIMD candidate mode information in the DIMD merge mode candidate list are more diversified. That is, by adding the target DIMD candidate mode information determined based on the filtered template pixels in the DIMD merge mode candidate list, the candidate mode information in the DIMD merge mode candidate list is more diversified.
[0080] Optionally, the method of the embodiments of the present application further comprises:
[0081] According to the prediction cost corresponding to each DIMD candidate mode information in the target list, the DIMD candidate mode information in the target list is sorted.
[0082] The prediction cost is the sum of the absolute transform differences corresponding to each position of the target image block, or the sum of the absolute values of the difference values corresponding to each position of the target image block.
[0083] The absolute transform difference corresponding to each position is the absolute transform difference (i.e., the absolute value of the difference) between the prediction value of the template corresponding to each position and the reconstructed value of the template, and the difference value corresponding to each position is the difference between the prediction value of the template corresponding to each position and the reconstructed value of the template.
[0084] For example, the prediction cost of the target image block is the sum of the absolute transform difference corresponding to position 1 of the target image block (the absolute transform difference between the prediction value of the template corresponding to position 1 and the reconstructed value of the pixel value of the template corresponding to position 1) and the absolute transform difference corresponding to position 2 of the target image block (the absolute transform difference between the prediction value of the template corresponding to position 2 and the reconstructed value of the pixel value of the template corresponding to position 2).
[0085] Optionally, the smaller the prediction cost is, the earlier the DIMD candidate mode information is arranged in the DIMD merge mode candidate list.
[0086] Here, the smaller the prediction cost is, the more accurate the corresponding DIMD candidate mode information is predicted. Arranging the DIMD merge mode candidate list with a small prediction cost in the front position achieves the purpose of arranging the DIMD candidate mode information with high prediction accuracy in the front position, and can reduce the number of bits required for transmitting the mode candidate index.
[0087] As an implementation, the sorting of the DIMD candidate mode information in the target list according to the prediction cost corresponding to each DIMD candidate mode information in the target list comprises:
[0088] multiplying the prediction cost corresponding to each DIMD candidate mode information in the target list by a corresponding weight value to obtain a target prediction cost of each DIMD candidate mode information;
[0089] sorting the DIMD candidate mode information in the target list according to the target prediction cost of each DIMD candidate mode information.
[0090] Here, the product of the prediction cost and the corresponding weight value is taken as the target prediction cost of the DIMD candidate mode information, and the DIMD candidate mode information with a smaller target prediction cost is arranged in a front position in the target list.
[0091] Optionally, the obtaining of the target list according to the target DIMD candidate mode information comprises:
[0092] In a case where the number of the DIMD candidate mode information in the target list is less than or equal to N1, the target DIMD candidate mode information is added to the target list, wherein N1 is an integer greater than or equal to 0.
[0093] The N1 can be a preset number of the DIMD candidate mode information in the target list.
[0094] In a case where the number of the DIMD candidate mode information in the target list is less than or equal to N1, the addition of the target DIMD candidate mode information can effectively increase the number of the DIMD candidate mode information in the target list, and ensure that the number of the DIMD candidate mode information in the target list is a preset number.
[0095] For example, in a case where the number of the DIMD candidate mode information in the DIMD merge mode candidate list is equal to 0, i.e., in a case where no valid DIMD candidate mode information can be derived through the DIMD merge mode candidate list, the addition of the target DIMD candidate mode information to the DIMD merge mode candidate list can derive valid DIMD candidate mode information, improve the prediction efficiency, and improve the coding efficiency of the inter-frame prediction frame and reduce the time complexity of the intra-frame prediction frame.
[0096] Optionally, after the obtaining of the target list according to the target DIMD candidate mode information, the method further comprises:
[0097] In a case where the number of the DIMD candidate mode information in the target list is greater than or equal to N2, the first N2 DIMD candidate mode information in the target list is reserved, where N2 is an integer greater than 0.
[0098] The N1 can be the number of the DIMD candidate mode information in the preset DIMD merge mode candidate list. The N2 can be the same as the N1 or different from the N1.
[0099] Optionally, the DIMD candidate mode information in the target list is sorted based on a prediction cost, and the smaller the prediction cost is, the higher the ranking position is.
[0100] For example, if the number of the DIMD candidate mode information exceeds the preset number after the target DIMD candidate mode information is added to the DIMD merge mode candidate list, a part of the DIMD candidate mode information with a lower ranking position is removed to ensure that the DIMD candidate mode information in the DIMD merge mode candidate list is the preset number of DIMD candidate mode information with the best prediction cost.
[0101] Optionally, the template pixels corresponding to the target image block are filtered to obtain filtered template pixels, including:
[0102] In a case where the filter identifier corresponding to the target image block is a first filter identifier, the template pixels corresponding to the target image block are filtered to obtain the filtered template pixels, where the first filter identifier is used to indicate that the template pixels corresponding to the target image block are filtered.
[0103] Or, in a case where the value of the first target parameter of the template pixels is less than or equal to a preset threshold, the template pixels corresponding to the target image block are filtered to obtain the filtered template pixels.
[0104] The first target parameter includes at least one of noise intensity, image energy, and image entropy.
[0105] In the embodiments of the present application, the first filter identifier can be obtained from a bitstream or derived at a decoding end. For example, in a case where the filter identifier is 1 (i.e., the first filter identifier), it is indicated that the template pixels corresponding to the target image block are filtered, and in a case where the filter identifier is 0 (i.e., a second filter identifier), it is indicated that the template pixels corresponding to the target image block are not filtered.
[0106] In the embodiments of the present application, the noise intensity can be obtained in the following manner:
[0107] Statistical analysis is performed on the image pixel values, and mean, variance, standard deviation and other indicators of the image are calculated, and the noise intensity of the image is determined based on the indicators.
[0108] In the embodiments of the present application, the image energy can be obtained in the following manner:
[0109] The square of each pixel value in the image is added, and the result of the addition is divided by the total number of pixels to obtain the image energy.
[0110] In the embodiments of the present application, the image entropy can be obtained in the following manner:
[0111] The probability of occurrence of each pixel value in the image is obtained, the probability of occurrence of each pixel value is multiplied by the logarithm of the probability to obtain a multiplication result, and the image entropy is obtained by adding a plurality of multiplication results.
[0112] In the embodiments of the present application, in the case that the value of the first target parameter is greater than the preset threshold, filtering can cause the image to become distorted or unclear, so that the histogram statistics are not accurate, therefore, in the case that the value of the first target parameter is less than or equal to the preset threshold, the template pixels are filtered to improve the accuracy of histogram statistics.
[0113] It should be noted that the filtering identifier in the embodiments of the present application can be frame level (i.e. each image frame corresponds to one filtering identifier), or block level (i.e. one image block corresponds to one filtering identifier).
[0114] Optionally, the method of the embodiments of the present application further comprises:
[0115] In the case that the value of the first target parameter of the template pixel is less than or equal to the preset threshold, the filtering identifier corresponding to the target image block is determined as the first filtering identifier.
[0116] Alternatively, in the case that the value of the first target parameter of the template pixel is greater than or equal to the preset threshold, the filtering identifier corresponding to the target image block is determined as the second filtering identifier.
[0117] Optionally, the filtering processing of the template pixels corresponding to the target image block to obtain the filtered template pixels comprises:
[0118] According to the target filtering intensity identifier corresponding to the target image block, a target filter is determined, the target filter corresponds to the target filtering intensity identifier, or according to the value of the second target parameter of the template pixel, a target filter is determined, the second target parameter comprises at least one of noise intensity, image energy and image entropy;
[0119] According to the target filter, the template pixels corresponding to the target image block are filtered to obtain the filtered template pixels.
[0120] The second target parameter in the embodiments of the present application can be the same as or different from the first target parameter.
[0121] Since the filter can enhance the noise of the image, when filtering is performed using the filter, the strength of the filter needs to be controlled to avoid the case of over-enhancement of the image.
[0122] As an implementation manner, the decoding end determines the target filter based on the target filter strength identifier, which can be obtained from the code stream or derived by the decoding end. In the case where the target filter strength identifier is derived by the decoding end, optionally, the method of the embodiments of the present application further includes:
[0123] According to the second target parameter of the template pixel, a target filter strength identifier corresponding to the target image block is determined, wherein different noise strengths correspond to different target filter strength identifiers.
[0124] For example, the filter strength identifier is 0, and the corresponding target filter is:
[0125]
[0126] The filter strength identifier is 1, and the corresponding target filter is:
[0127]
[0128] The filter strength identifier is 2, and the corresponding target filter is:
[0129]
[0130] Wherein, the smaller the filter strength identifier is 0, the greater the filter strength of the corresponding target filter, that is, the filter strength of the filter F0 is greater than the filter strength of the filter F1, and the filter strength of the filter F1 is greater than the filter strength of the filter F2.
[0131] As another implementation manner, the decoding end directly determines the target filter based on the value of the second target parameter of the template pixel. Specifically, the image noise strength is determined based on the value of the second target parameter, and the target filter is determined based on the image noise strength.
[0132] For example, if the noise strength is less than threshold 1, filter F0 is selected, if the noise strength is greater than threshold 1 and less than threshold 2, filter F1 is selected, and if the noise strength is greater than threshold 2, filter F2 is selected.
[0133] Optionally, the target filter includes at least one of a high-pass filter and a low-pass filter.
[0134] It is assumed that the template pixels are filtered by the filter F1 to obtain an S-row and S-column filtered pixel template. In the case of S = 2, the filtered pixel template is as shown in FIG. 8A, and in the case of S = 1, the filtered pixel template is as shown in FIG. 8B. Figure 2 Figure 3
[0135] As shown in FIG. 8A, after the filtered pixel template is obtained, a 2x3 operator can be used to calculate the gradient of the template pixels (first part of pixels) above the target image block. A 3x2 operator is used to calculate the gradient of the template pixels (second part of pixels) on the left side of the template image block. Figure 4
[0136] For example, in the embodiment of the present application, a high-pass filter can be used to filter the chrominance component and the luminance component, or a high-pass filter can be used to filter the luminance component, and a low-pass filter can be used to filter the chrominance component.
[0137] Specifically, for the luminance component, the most M-1 intra prediction modes and the corresponding weights and the planar mode (the weight is fixed as 16 / 64) are derived from a histogram, and the most M intra prediction modes are fused to obtain a final luminance prediction value. Optionally, M is less than 5.
[0138] For the chrominance component, before calculating the horizontal gradient and the vertical gradient based on the same position of the reconstructed luminance samples of the target chrominance block corresponding to the target image block, the low-pass filter is used to filter the reconstructed luminance samples.
[0139] Optionally, the low-pass filter can be the following filter:
[0140]
[0141] Since the characteristics of the chrominance component are usually composed of color changes and color textures in the image, these characteristics usually have no strong directionality in space. Based on the low-pass filter, the pixel values can be averaged, the noise and details of the surrounding pixels are averaged, thereby reducing the noise and details in the image and making the image smoother.
[0142] Optionally, the filtering processing of the template pixels corresponding to the target image block to obtain the filtered template pixels comprises:
[0143] In the case that the template position identifier of the template pixel is the first position identifier, the first part of the pixels in the template pixel is filtered to obtain the filtered template pixel;
[0144] Or, in the case that the template position identifier of the template pixel is the second position identifier, the second part of the pixels in the template pixel is filtered to obtain the filtered template pixel.
[0145] Or, in the case that the template position identifier of the template pixel is a third position identifier, filtering the first part of pixels and the second part of pixels in the template pixel to obtain the filtered template pixel;
[0146] Or, filtering the part of pixels with smaller noise intensity in the first part of pixels and the second part of pixels to obtain the filtered template pixel;
[0147] The first part of pixels includes the pixels in the template pixel in the first direction of the target image block, and the second part of pixels includes the pixels in the template pixel in the second direction of the target image block.
[0148] As an example, the first direction is upward, and the second direction is left. That is, the first part of pixels includes the pixels in the template pixel above the target image block, and the second part of pixels includes the pixels in the template pixel on the left side of the target image block.
[0149] For example, in the case that the template position identifier is 1 (the first position identifier), the first part of pixels is filtered, in the case that the template position identifier is 0 (the second position identifier), the second part of pixels is filtered, and in the case that the template position identifier is 2 (the third position identifier), the first part of pixels and the second part of pixels are filtered.
[0150] For another example, the noise intensity of the first part of pixels and the second part of pixels is calculated respectively, if the noise intensity of the first part of pixels is smaller than that of the second part of pixels, the first part of pixels is filtered, and if the noise intensity of the first part of pixels is greater than that of the second part of pixels, the second part of pixels is filtered.
[0151] Optionally, in the case that the template position identifier of the template pixel is a fourth position identifier, a third part of pixels in the target pixel is filtered to obtain the filtered template pixel;
[0152] In the case that the template position identifier of the template pixel is a fifth position identifier, a fourth part of pixels in the target pixel is filtered to obtain the filtered template pixel;
[0153] In the case that the template position identifier of the template pixel is a sixth position identifier, a fifth part of pixels in the target pixel is filtered to obtain the filtered template pixel;
[0154] In the case that the template position identifier of the template pixel is a seventh position identifier, a sixth part of pixels in the target pixel is filtered to obtain the filtered template pixel.
[0155] The above-mentioned third part of pixels includes pixels in the template in the third direction of the target image block, the above-mentioned fourth part of pixels includes pixels in the template in the fourth direction of the target image block, the above-mentioned fifth part of pixels includes pixels in the template in the fifth direction of the target image block, the above-mentioned sixth part of pixels includes pixels in the template in the sixth direction of the target image block, and the above-mentioned sixth part of pixels includes pixels in the template in the seventh direction of the target image block.
[0156] For example, the third direction may be specifically the upper left, the fourth direction may be specifically the right, the fifth direction may be specifically the bottom, and the seventh direction may be the bottom right. Of course, in the embodiment of the present application, corresponding position markers may also be set to filter some pixels located in the upper right direction, lower left direction, etc. of the target image, which will not be described in detail here.
[0157] Exemplarily, when filtering is performed on all pixels in the template pixels, a template pixel histogram is obtained based on the filtered template pixels; when filtering is performed on the above-mentioned first part of pixels, a template pixel histogram can be obtained based on the filtered template pixels and unfiltered template pixels (such as the second part of template pixels); when filtering is performed on the above-mentioned second part of pixels, a template pixel histogram can be obtained based on the filtered template pixels and unfiltered template pixels (such as the first part of template pixels).
[0158] In the solution of the embodiment of the present application, target DIMD candidate mode information determined by filtered template pixels is added to the DIMD merge mode candidate list, so that the prediction mode in the DIMD merge mode candidate list is more diversified, and the DIMD candidate mode information in the DIMD merge mode candidate list is sorted based on the prediction cost, which can make the DIMD candidate mode information with higher prediction accuracy ranked in a front position, and can reduce the number of bits required to transmit the mode candidate index.
[0159] The prediction mode processing method provided in the embodiment of the present application can be executed by a prediction mode processing device. In the embodiment of the present application, the prediction mode processing device provided in the embodiment of the present application is described by taking the prediction mode processing method performed by the prediction mode processing device as an example.
[0160] like Figure 5 As shown, the embodiment of the present application further provides a prediction mode processing device 500, including:
[0161] A first acquisition module 501 is configured to perform filtering processing on template pixels corresponding to a target image block to obtain filtered template pixels, where the template pixels include at least a portion of reconstructed pixels in an adjacent pixel region of the target image block;
[0162] The second obtaining module 502 is configured to obtain an amplitude of at least one intra prediction mode according to the filtered template pixels.
[0163] The determining module 503 is configured to determine target decoder-side derived intra prediction mode (DIMD) candidate mode information according to the amplitude of the at least one intra prediction mode.
[0164] Optionally, the determining module includes:
[0165] The determining sub-module is configured to determine a target intra prediction mode from the at least one intra prediction mode according to the amplitude of the at least one intra prediction mode, and determine a preset parameter corresponding to the target intra prediction mode.
[0166] The first obtaining sub-module is configured to obtain the target DIMD candidate mode information according to the target intra prediction mode and the preset parameter.
[0167] Optionally, the apparatus according to an embodiment of the present application further includes:
[0168] The first processing module is configured to obtain a target list according to the target DIMD candidate mode information.
[0169] Optionally, the target list further includes at least one of:
[0170] First DIMD candidate mode information, the first DIMD candidate mode information being obtained based on prediction mode information of image blocks adjacent to the target image block;
[0171] Second DIMD candidate mode information, the second DIMD candidate mode information being obtained based on prediction mode information of image blocks non-adjacent to the target image block;
[0172] Third DIMD candidate mode information, the third DIMD candidate mode information being obtained based on prediction mode information of at least two image blocks.
[0173] Optionally, the apparatus according to an embodiment of the present application further includes:
[0174] The sorting module is configured to sort the DIMD candidate mode information in the target list according to a prediction cost corresponding to each DIMD candidate mode information in the target list.
[0175] The prediction cost is a sum of absolute transform differences corresponding to each position of the target image block, or a sum of absolute values of differences corresponding to each position of the target image block.
[0176] The absolute transform difference corresponding to each position is obtained according to an absolute transform difference between a prediction value of a template corresponding to each position and a reconstructed value of the template, and the difference value corresponding to each position is a difference between the prediction value of the template corresponding to each position and the reconstructed value of the template.
[0177] Optionally, the sorting module comprises:
[0178] The second obtaining sub-module is configured to multiply a prediction cost corresponding to each DIMD candidate mode information in the target list by a corresponding weight value to obtain a target prediction cost of each DIMD candidate mode information.
[0179] The sorting sub-module is configured to sort the DIMD candidate mode information in the target list according to the target prediction cost of each DIMD candidate mode information.
[0180] Optionally, the first processing module is configured to:
[0181] In a case where the number of DIMD candidate mode information in the target list is less than or equal to N1, the target DIMD candidate mode information is added to the target list, where N1 is an integer greater than or equal to 0.
[0182] Optionally, the apparatus according to an embodiment of the present application further comprises:
[0183] The second processing module is configured to, after the first processing module obtains the target list according to the target DIMD candidate mode information, in a case where the number of DIMD candidate mode information in the target list is greater than or equal to N2, retain the first N2 DIMD candidate mode information in the target list, where N2 is an integer greater than 0.
[0184] In the embodiment of the present application, the template pixels corresponding to a target image block are filtered to obtain filtered template pixels, the template pixels including at least part of reconstructed pixels in a neighboring pixel region of the target image block; the amplitudes of at least one intra prediction mode are obtained according to the filtered template pixels; and the target decoding-end-derived intra prediction mode (DIMD) candidate mode information is determined according to the amplitudes of the at least one intra prediction mode. Since the image block basically has corresponding template pixels, each image block can determine the target DIMD candidate mode information based on the filtered template pixels, thereby greatly improving the probability of obtaining the DIMD candidate mode information of the image block, and further effectively improving the image processing efficiency.
[0185] The processing apparatus of the prediction mode in the embodiments of the present application can be an electronic device, for example, an electronic device with an operating system, or a component in the electronic device, for example, an integrated circuit or a chip. The electronic device can be a terminal or other device than the terminal. Exemplary other devices can be a server, a network attached storage (NAS), and the like, which are not limited in the embodiments of the present application.
[0186] The processing apparatus of the prediction mode provided in the embodiments of the present application can realize the various processes of the method embodiments Figure 1 and achieve the same technical effects. To avoid repetition, the various processes of the method embodiments and the same technical effects will not be described here.
[0187] Optionally, as shown in Figure 6 the embodiments of the present application also provide an electronic device 600, which includes a processor 601 and a memory 602, and the memory 602 stores programs or instructions executable on the processor 601. When the programs or instructions are executed by the processor 601, the various steps of the above-mentioned processing method embodiments of the prediction mode are realized, and the same technical effects are achieved. To avoid repetition, the various steps of the processing method embodiments of the prediction mode and the same technical effects will not be described here.
[0188] The embodiments of the present application also provide a processing apparatus of a prediction mode, which includes a processor and a communication interface. The processor is configured to perform filtering processing on template pixels corresponding to a target image block to obtain filtered template pixels, and the template pixels include at least part of reconstructed pixels in a neighboring pixel region of the target image block. The processor is further configured to obtain amplitudes of at least one intra prediction mode according to the filtered template pixels, and determine target decoder-derived intra prediction mode (DIMD) candidate mode information according to the amplitudes of the at least one intra prediction mode.
[0189] Specifically, Figure 7 To implement the hardware structure of the processing apparatus of the prediction mode in the embodiments of the present application, the apparatus can be specifically a terminal, and the terminal 700 includes but is not limited to at least part of components such as a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710.
[0190] Those skilled in the art can understand that the terminal 700 can also include a power supply (such as a battery) for supplying power to the various components. The power supply can be logically connected to the processor 710 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. Figure 7The terminal structure shown in the figure does not constitute a limitation on the terminal, and the terminal can include more or fewer components than the figure, or combine certain components, or different component arrangements, which are not described here.
[0191] It should be understood that in the embodiments of the present application, the input unit 704 can include a graphics processing unit (GPU) 7041 and a microphone 7042. The graphics processor 7041 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 706 can include a display panel 7061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 707 includes at least one of a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 can include two parts of a touch detection device and a touch controller. The other input devices 7072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), trackballs, mice, joysticks, which are not described here.
[0192] In the embodiments of the present application, after the radio frequency unit 701 receives the downlink data from the network side device, it can be transmitted to the processor 710 for processing. In addition, the radio frequency unit 701 can send uplink data to the network side device. Generally, the radio frequency unit 701 includes, but is not limited to, an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.
[0193] The memory 709 can be used to store software programs or instructions and various data. The memory 709 can mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 709 can include a volatile memory or a non-volatile memory. 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 EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synch link DRAM (SLDRAM), and a direct rambus RAM (DRRAM). The memory 709 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0194] The processor 710 can include one or more processing units; optionally, the processor 710 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 710.
[0195] The processor 710 is configured to perform filtering processing on template pixels corresponding to a target image block to obtain filtered template pixels, the template pixels including at least part of reconstructed pixels in a neighboring pixel region of the target image block; obtain amplitudes of at least one intra prediction mode according to the filtered template pixels; and determine target decoding-side derived intra prediction mode (DIMD) candidate mode information according to the amplitudes of the at least one intra prediction mode.
[0196] Optionally, the processor 710 is further configured to:
[0197] determining a target intra prediction mode from the at least one intra prediction mode according to an amplitude of the at least one intra prediction mode, and determining a preset parameter corresponding to the target intra prediction mode;
[0198] obtaining the target DIMD candidate mode information according to the target intra prediction mode and the preset parameter.
[0199] Optionally, the processor 710 is further configured to:
[0200] obtaining a target list according to the target DIMD candidate mode information.
[0201] Optionally, the target list further includes at least one of:
[0202] first DIMD candidate mode information, the first DIMD candidate mode information being obtained based on prediction mode information of image blocks adjacent to the target image block;
[0203] second DIMD candidate mode information, the second DIMD candidate mode information being obtained based on prediction mode information of image blocks non-adjacent to the target image block;
[0204] third DIMD candidate mode information, the third DIMD candidate mode information being obtained based on prediction mode information of at least two image blocks.
[0205] Optionally, the processor 710 is further configured to:
[0206] sorting the DIMD candidate mode information in the target list according to a prediction cost corresponding to each DIMD candidate mode information in the target list;
[0207] wherein the prediction cost is a sum of absolute transform differences corresponding to each position of the target image block, or a sum of absolute values of difference values corresponding to each position of the target image block;
[0208] the absolute transform difference corresponding to each position is an absolute transform difference between a prediction value of a template corresponding to each position and a reconstructed value of the template, and the difference value corresponding to each position is a difference value between the prediction value of the template corresponding to each position and the reconstructed value of the template.
[0209] Optionally, the processor 710 is further configured to:
[0210] multiplying the prediction cost corresponding to each DIMD candidate mode information in the target list by a corresponding weight value to obtain a target prediction cost of each DIMD candidate mode information;
[0211] The DIMD candidate mode information in the target list is sorted according to a target prediction cost of each DIMD candidate mode information.
[0212] Optionally, the processor 710 is further configured to:
[0213] In a case where the number of the DIMD candidate mode information in the target list is less than or equal to N1, the target DIMD candidate mode information is added to the target list, where N1 is an integer greater than or equal to 0.
[0214] Optionally, the processor 710 is further configured to:
[0215] In a case where the number of the DIMD candidate mode information in the target list is greater than or equal to N2, the first N2 DIMD candidate mode information in the target list is reserved, where N2 is an integer greater than 0.
[0216] In the embodiments of the present application, the template pixels corresponding to the target image block are filtered to obtain filtered template pixels, the template pixels including at least part of the reconstructed pixels in the adjacent pixel region of the target image block; the amplitudes of at least one intra prediction mode are obtained according to the filtered template pixels; and the target decoding end derived intra prediction mode (DIMD) candidate mode information is determined according to the amplitudes of the at least one intra prediction mode. Since the image block basically has corresponding template pixels, each image block can determine the target DIMD candidate mode information based on the filtered template pixels, thereby greatly improving the probability of obtaining the DIMD candidate mode information of the image block, and effectively improving the image processing efficiency.
[0217] The embodiments of the present application also provide a readable storage medium, the readable storage medium storing a program or instructions, the program or instructions being executed by a processor to implement each process of the above-mentioned prediction mode processing method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.
[0218] The processor is the processor in the terminal in the above-mentioned embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. In some examples, the readable storage medium can be a non-transitory readable storage medium.
[0219] The embodiments of the present application further provide a chip, the chip including a processor and a communication interface, the communication interface being coupled with the processor, and the processor being configured to run a program or instructions to implement each process of the above-mentioned prediction mode processing method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.
[0220] It should be understood that the chip mentioned in the embodiments of the present application can also be referred to as a system chip, a system chip, a chip system or a system on chip, etc.
[0221] The embodiments of the present application further provide a computer program / program product stored in a storage medium, which is executed by at least one processor to implement each process of the above-mentioned processing method embodiments of the prediction mode, and can achieve the same technical effects. To avoid repetition, details are not described here.
[0222] It should be noted that in this document, the terms "comprise", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "comprises a" does not exclude the presence of additional identical elements in the process, method, article or device comprising the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to the order of performing the functions shown or discussed, but can also include performing the functions in a substantially simultaneous manner or in reverse order, for example, the described method can be performed in an order different from that described, and various steps can also be added, omitted or combined. In addition, the features described with reference to certain examples can be combined in other examples.
[0223] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of computer software product and general hardware platform, of course, it can also be realized by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk, etc.), including a plurality of instructions, used to make the terminal or network side device execute the method described in each embodiment of the present application.
[0224] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, which are only illustrative and not limiting. Those skilled in the art can make many forms of embodiments under the inspiration of the present application without departing from the scope of the present application and the protection scope of the claims.
Claims
1. A method for processing a prediction mode, executed by an electronic device, characterized in that: The method comprises: Performing filtering on template pixels corresponding to the target image block to obtain filtered template pixels, wherein the template pixels include at least a portion of reconstructed pixels in an adjacent pixel region of the target image block; Obtaining an amplitude of at least one intra prediction mode according to the filtered template pixels; Determine, according to the amplitude of the at least one intra-frame prediction mode, intra-frame prediction mode DIMD candidate mode information derived by a target decoding end.
2. The method according to claim 1, characterized in that The step of determining, based on the amplitude of the at least one intra-frame prediction mode, intra-frame prediction mode DIMD candidate mode information derived by a target decoding end includes: Determining a target intra-frame prediction mode in the at least one intra-frame prediction mode according to the amplitude of the at least one intra-frame prediction mode, and determining preset parameters corresponding to the target intra-frame prediction mode; The target DIMD candidate mode information is obtained according to the target intra prediction mode and the preset parameters.
3. The method according to claim 1 or 2, characterized in that Also includes: A target list is obtained according to the target DIMD candidate mode information.
4. The method according to claim 3, characterized in that The target list also includes at least one of the following: First DIMD candidate mode information, where the first DIMD candidate mode information is obtained based on prediction mode information of an image block adjacent to the target image block; Second DIMD candidate mode information, where the second DIMD candidate mode information is obtained based on prediction mode information of an image block that is not adjacent to the target image block; Third DIMD candidate mode information, where the third DIMD candidate mode information is obtained based on prediction mode information of at least two image blocks.
5. The method according to claim 3 or 4, characterized in that Also includes: sorting the DIMD candidate mode information in the target list according to the prediction cost corresponding to each DIMD candidate mode information in the target list; The prediction cost is the sum of the absolute transformation differences corresponding to each position of the target image block, or the sum of the absolute values of the differences corresponding to each position of the target image block; The absolute transformation difference corresponding to each position is the absolute transformation difference between the predicted value of the template corresponding to each position and the reconstructed value of the template, and the difference value corresponding to each position is the difference between the predicted value of the template corresponding to each position and the reconstructed value of the template.
6. The method according to claim 5, characterized in that The sorting of the DIMD candidate mode information in the target list according to the prediction cost corresponding to each DIMD candidate mode information in the target list includes: Multiplying the prediction cost corresponding to each DIMD candidate mode information in the target list by the corresponding weight value to obtain the target prediction cost of each DIMD candidate mode information; The DIMD candidate mode information in the target list is sorted according to the target prediction cost of each DIMD candidate mode information.
7. The method according to any one of claims 3 to 6, characterized in that The obtaining of a target list according to the target DIMD candidate mode information includes: In a case where the number of DIMD candidate mode information in the target list is less than or equal to N1, the target DIMD candidate mode information is added to the target list, where N1 is an integer greater than or equal to 0.
8. The method according to any one of claims 3 to 6, characterized in that After obtaining the target list according to the target DIMD candidate mode information, the method further includes: In a case where the number of DIMD candidate mode information in the target list is greater than or equal to N2, the first N2 DIMD candidate mode information in the target list is retained, where N2 is an integer greater than 0.
9. A prediction mode processing device, characterized in that: include: a first acquisition module, configured to perform filtering processing on template pixels corresponding to a target image block to obtain filtered template pixels, wherein the template pixels include at least a portion of reconstructed pixels in an adjacent pixel region of the target image block; A second acquisition module, configured to acquire an amplitude of at least one intra-frame prediction mode according to the filtered template pixels; The determining module is configured to determine, based on the amplitude of the at least one intra-frame prediction mode, intra-frame prediction mode DIMD candidate mode information derived by a target decoding end.
10. The device according to claim 9, characterized in that The determination module includes: a determination submodule, configured to determine a target intra-frame prediction mode in at least one intra-frame prediction mode according to the amplitude of the at least one intra-frame prediction mode, and determine preset parameters corresponding to the target intra-frame prediction mode; The first acquisition submodule is configured to obtain the target DIMD candidate mode information according to the target intra prediction mode and the preset parameters.
11. The device according to claim 9 or 10, characterized in that Also includes: The first processing module is configured to obtain a target list according to the target DIMD candidate mode information.
12. The device according to claim 11, characterized in that The target list also includes at least one of the following: First DIMD candidate mode information, where the first DIMD candidate mode information is obtained based on prediction mode information of an image block adjacent to the target image block; Second DIMD candidate mode information, where the second DIMD candidate mode information is obtained based on prediction mode information of an image block that is not adjacent to the target image block; Third DIMD candidate mode information, where the third DIMD candidate mode information is obtained based on prediction mode information of at least two image blocks.
13. The device according to claim 11 or 12, characterized in that Also includes: A sorting module, configured to sort the DIMD candidate mode information in the target list according to the prediction cost corresponding to each DIMD candidate mode information in the target list; The prediction cost is the sum of the absolute transformation differences corresponding to each position of the target image block, or the sum of the absolute values of the differences corresponding to each position of the target image block; The absolute transformation difference corresponding to each position is the absolute transformation difference between the predicted value of the template corresponding to each position and the reconstructed value of the template, and the difference value corresponding to each position is the difference between the predicted value of the template corresponding to each position and the reconstructed value of the template.
14. The device according to claim 13, characterized in that The sorting module includes: A second acquisition submodule is configured to multiply the prediction cost corresponding to each DIMD candidate mode information in the target list by the corresponding weight value to obtain a target prediction cost for each DIMD candidate mode information; The sorting submodule is configured to sort the DIMD candidate mode information in the target list according to the target prediction cost of each DIMD candidate mode information.
15. The device according to any one of claims 11 to 14, characterized in that The first processing module is used for: In a case where the number of DIMD candidate mode information in the target list is less than or equal to N1, the target DIMD candidate mode information is added to the target list, where N1 is an integer greater than or equal to 0.
16. The device according to any one of claims 11 to 14, characterized in that Also includes: The second processing module is used to retain the first N2 DIMD candidate mode information in the target list after the first processing module obtains the target list according to the target DIMD candidate mode information, if the number of DIMD candidate mode information in the target list is greater than or equal to N2, where N2 is an integer greater than 0.
17. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the prediction mode processing method according to any one of claims 1 to 8 are implemented.
18. A readable storage medium, characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the prediction mode processing method according to any one of claims 1 to 8 are implemented.
19. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the prediction mode processing method according to any one of claims 1 to 8.