An intra prediction encoding method and apparatus
By simplifying the HEVC intra-frame prediction coding method through first-level and second-level search strategies, the problem of high computational complexity of the intra-frame prediction module is solved, and more efficient intra-frame prediction coding performance is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALLWINNER TECH CO LTD
- Filing Date
- 2022-01-26
- Publication Date
- 2026-06-05
AI Technical Summary
Existing HEVC intra-predictive coding methods have high computational complexity during intra-predictive coding, making it difficult to guarantee real-time performance. This is especially true when 35 prediction mode rate-distortion optimization operations are performed for each block size in the intra-predictive module, resulting in excessively high computational complexity.
The prediction module is processed and filtered using a first-level search strategy and a second-level search strategy. This simplifies the calculation process of intra-frame prediction angle mode cost, reduces the amount of computation for each angle mode cost, and supports parallel computation by multiple PUs.
By simplifying the calculation process of intra-frame prediction angle mode cost, the computational load of angle mode cost is reduced, thereby improving the performance of intra-frame prediction coding, computational efficiency, and real-time performance.
Smart Images

Figure CN116546196B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of video coding technology, and in particular to an intra-frame predictive coding method and apparatus. Background Technology
[0002] HEVC is one of the mainstream codec standards, and its excellent compression ratio has led to its widespread application in film and television entertainment, security monitoring, video conferencing, and other fields. However, HEVC's high compression comes at the cost of high coding complexity, especially in the intra-frame prediction module. If rate-distortion optimization (RDO) operations are performed on every 35 prediction modes for each block size during intra-frame prediction coding, it becomes difficult to guarantee real-time performance. JCTVC-C207, a proposal adopted by JCT-VC, provides a fast intra-frame prediction coding method. This method first performs a coarse mode search, eliminating some low-probability modes from the 35 intra-frame prediction modes, and then uses the remaining high-probability modes to form an RDO mode queue. Finally, RDO operations are performed on the candidate modes in the queue to determine the optimal mode. This method uses a "coarse search followed by fine search" strategy, avoiding the need for complex RDO operations on all 35 modes. While this simplifies computational complexity to some extent, the coding performance remains almost unchanged. The current method's coarse mode search calculates the mode cost using the absolute sum of the Hadamard transform coefficients of the residual signal and the number of mode bits. This cost serves as the basis for evaluating the likelihood of intra-prediction modes. It iterates through 35 intra-prediction modes, selecting the modes with lower costs as candidate modes for RDO (Rapid Decision Object). However, this coarse mode decision-making process still requires iterating through 35 intra-prediction modes, resulting in significant computational complexity. Therefore, it is crucial to provide an intra-prediction coding method that simplifies the calculation of intra-prediction angle mode costs, reduces the computational load for each angle mode cost, facilitates parallel computation across multiple processing units (PUs), and reduces the number of angle mode cost calculations during the search process. This, in turn, improves the performance of intra-prediction coding. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide an intra-frame predictive coding method and apparatus, which can perform comprehensive processing such as calculation and filtering on the prediction module according to the first-level search strategy and the second search strategy to obtain prediction mode information for intra-frame predictive coding. This is beneficial to simplify the calculation process of intra-frame prediction angle mode cost, reduce the amount of calculation for each angle mode cost, facilitate parallel calculation of multiple PUs, and reduce the number of angle mode cost calculations during the search process, thereby improving the performance of intra-frame predictive coding.
[0004] To address the aforementioned technical problems, a first aspect of the present invention discloses an intra-frame prediction coding method, the method comprising:
[0005] Obtain the prediction module;
[0006] According to the preset first-level search strategy, the prediction module is calculated and processed to obtain the first mode cost information;
[0007] According to the preset second search strategy, the first mode cost information is filtered and calculated to obtain the prediction mode information; the prediction mode information is used for intra-frame prediction coding.
[0008] As an optional implementation, in a first aspect of the present invention, the step of calculating and processing the prediction module according to a preset first-level search strategy to obtain first mode cost information includes:
[0009] The prediction module is processed according to a preset first intra-frame prediction mode set to obtain second mode cost information; the first intra-frame prediction mode set includes M first intra-frame prediction modes; M is a positive integer greater than or equal to 8; the second mode cost information includes several second mode costs.
[0010] The cost information of the second mode is processed to obtain the cost information of the first mode.
[0011] As an optional implementation, in a first aspect of the present invention, the step of calculating and processing the prediction module according to a preset first intra-frame prediction mode set to obtain second mode cost information includes:
[0012] For any prediction block within the prediction module, the mode cost of the prediction block under all the first intra-frame prediction modes in the first intra-frame prediction mode set is calculated to obtain the third mode cost information corresponding to the prediction block; the third mode cost information includes several third mode costs.
[0013] The cost information of the third mode is accumulated to obtain the cost of the second mode corresponding to the prediction block.
[0014] As an optional implementation, in a first aspect of the present invention, the step of traversing and calculating the mode cost of the prediction block under all the first intra-frame prediction modes in the first intra-frame prediction mode set to obtain the third mode cost information corresponding to the prediction block includes:
[0015] For any of the first intra-frame prediction modes, the prediction point location information corresponding to the first intra-frame prediction mode is determined according to the first intra-frame prediction mode; the prediction point location information includes several prediction point locations.
[0016] For any of the predicted point locations, obtain the reference pixel information corresponding to that predicted point location; the reference pixel information is located within the prediction block corresponding to that predicted point location.
[0017] The reference pixel information is calculated and processed according to the preset prediction model to obtain the image prediction value corresponding to the prediction point position.
[0018] The absolute difference between the original image value corresponding to the predicted point location and the predicted image value corresponding to the predicted point location is calculated to obtain the third mode cost corresponding to the predicted point location.
[0019] As an optional implementation, in a first aspect of the present invention, the step of filtering and calculating the first mode cost information according to a preset second search strategy to obtain predicted mode information includes:
[0020] A second intra-frame prediction mode set is constructed based on the first mode cost information; the second intra-frame prediction mode set includes N second intra-frame prediction modes; N is a positive integer greater than or equal to 5 and less than M;
[0021] The prediction module is calculated and processed according to the second intra-frame prediction mode set to obtain fourth mode cost information; the fourth mode cost information includes several fourth mode costs.
[0022] The cost information of the fourth mode is filtered to obtain the prediction mode information.
[0023] As an optional implementation, in the first aspect of the present invention, the step of filtering the fourth mode cost information to obtain the predicted mode information includes:
[0024] Sort all fourth mode costs in the fourth mode cost information in ascending order of mode cost to obtain the mode cost sequence;
[0025] According to the preset pattern screening strategy, the fourth pattern cost that appears first in the pattern cost sequence is selected and processed to obtain the predicted pattern information.
[0026] As an optional implementation, in a first aspect of the present invention, constructing a second intra-frame prediction mode set based on the first mode cost information includes:
[0027] Centered on the first intra-frame prediction mode corresponding to the first mode cost information, L prediction modes adjacent to the first intra-frame prediction mode corresponding to the first mode cost information are selected from the preset prediction mode set as the second intra-frame prediction modes; where L is a positive integer less than N by 1.
[0028] A second aspect of this invention discloses an intra-frame prediction coding apparatus, the apparatus comprising:
[0029] The acquisition module is used to acquire information from the prediction module.
[0030] The first processing module is used to perform calculations on the prediction module according to a preset first-level search strategy to obtain the first mode cost information.
[0031] The second processing module is used to filter and calculate the first mode cost information according to a preset second search strategy to obtain prediction mode information; the prediction mode information is used for intra-frame prediction coding.
[0032] As an optional implementation, in a second aspect of the present invention, the first processing module includes a first processing submodule and a second processing submodule, wherein:
[0033] The first processing submodule is used to perform calculation processing on the prediction module according to a preset first intra-frame prediction mode set to obtain second mode cost information; the first intra-frame prediction mode set includes M first intra-frame prediction modes; M is a positive integer greater than or equal to 8; the second mode cost information includes several second mode costs;
[0034] The second processing submodule is used to process the second mode cost information to obtain the first mode cost information.
[0035] As an optional implementation, in a second aspect of the present invention, the first processing submodule performs calculations on the prediction module according to a preset first intra-frame prediction mode set to obtain the second mode cost information in the following specific manner:
[0036] For any prediction block within the prediction module, the mode cost of the prediction block under all the first intra-frame prediction modes in the first intra-frame prediction mode set is calculated to obtain the third mode cost information corresponding to the prediction block; the third mode cost information includes several third mode costs.
[0037] The cost information of the third mode is accumulated to obtain the cost of the second mode corresponding to the prediction block.
[0038] As an optional implementation, in the second aspect of the present invention, the first processing submodule iterates through and calculates the mode cost of the prediction block under all the first intra-frame prediction modes in the first intra-frame prediction mode set to obtain the third mode cost information corresponding to the prediction block. The specific method is as follows:
[0039] For any of the first intra-frame prediction modes, the prediction point location information corresponding to the first intra-frame prediction mode is determined according to the first intra-frame prediction mode; the prediction point location information includes several prediction point locations.
[0040] For any of the predicted point locations, obtain the reference pixel information corresponding to that predicted point location; the reference pixel information is located within the prediction block corresponding to that predicted point location.
[0041] The reference pixel information is calculated and processed according to the preset prediction model to obtain the image prediction value corresponding to the prediction point position.
[0042] The absolute difference between the original image value corresponding to the predicted point location and the predicted image value corresponding to the predicted point location is calculated to obtain the third mode cost corresponding to the predicted point location.
[0043] As an optional implementation, in a second aspect of the present invention, the second processing module filters and calculates the first mode cost information according to a preset second search strategy to obtain the predicted mode information in the following specific way:
[0044] A second intra-frame prediction mode set is constructed based on the first mode cost information; the second intra-frame prediction mode set includes N second intra-frame prediction modes; N is a positive integer greater than or equal to 5 and less than M;
[0045] The prediction module is calculated and processed according to the second intra-frame prediction mode set to obtain fourth mode cost information; the fourth mode cost information includes several fourth mode costs.
[0046] The cost information of the fourth mode is filtered to obtain the prediction mode information.
[0047] As an optional implementation, in the second aspect of the present invention, the second processing module performs filtering processing on the fourth mode cost information to obtain the prediction mode information in the following specific manner:
[0048] Sort all fourth mode costs in the fourth mode cost information in ascending order of mode cost to obtain the mode cost sequence;
[0049] According to the preset pattern screening strategy, the fourth pattern cost that appears first in the pattern cost sequence is selected and processed to obtain the predicted pattern information.
[0050] As an optional implementation, in a second aspect of the present invention, the second processing module constructs a second intra-frame prediction mode set based on the first mode cost information, including:
[0051] Centered on the first intra-frame prediction mode corresponding to the first mode cost information, L prediction modes adjacent to the first intra-frame prediction mode corresponding to the first mode cost information are selected from the preset prediction mode set as the second intra-frame prediction modes; where L is a positive integer less than N by 1.
[0052] A third aspect of the present invention discloses another intra-frame prediction coding apparatus, the apparatus comprising:
[0053] Memory containing executable program code;
[0054] A processor coupled to the memory;
[0055] The processor calls the executable program code stored in the memory to execute some or all of the steps in the intra-frame prediction coding method disclosed in the first aspect of the present invention.
[0056] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute some or all of the steps in the intra-frame prediction coding method disclosed in the first aspect of the present invention.
[0057] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0058] In this embodiment of the invention, a prediction module is obtained; according to a preset first-level search strategy, the prediction module is processed to obtain first mode cost information; according to a preset second search strategy, the first mode cost information is filtered and processed to obtain prediction mode information; the prediction mode information is used for intra-frame prediction coding. It can be seen that the present invention can comprehensively process the prediction module according to the first-level search strategy and the second search strategy, such as processing and filtering, to obtain prediction mode information for intra-frame prediction coding. This simplifies the calculation process of intra-frame prediction angle mode costs, reduces the computational load of each angle mode cost, facilitates parallel computation by multiple PUs, and reduces the number of angle mode cost calculations during the search process, thereby improving the performance of intra-frame prediction coding. Attached Figure Description
[0059] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0060] Figure 1 This is a flowchart illustrating an intra-frame predictive coding method disclosed in an embodiment of the present invention;
[0061] Figure 2 This is a flowchart illustrating another intra-frame predictive coding method disclosed in an embodiment of the present invention;
[0062] Figure 3 This is a schematic diagram of the structure of an intra-frame prediction coding apparatus disclosed in an embodiment of the present invention;
[0063] Figure 4 This is a schematic diagram of another intra-frame prediction coding apparatus disclosed in an embodiment of the present invention;
[0064] Figure 5 A schematic diagram of the structure of another intra-frame prediction coding device disclosed in this embodiment of the invention. Detailed Implementation
[0065] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0066] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0067] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0068] This invention discloses an intra-frame predictive coding method and apparatus. It comprehensively processes the prediction module according to a first-level search strategy and a second search strategy, performing calculations and filtering to obtain prediction mode information for intra-frame predictive coding. This simplifies the calculation process of intra-frame prediction angle mode costs, reduces the computational load for each angle mode cost, facilitates parallel computation by multiple processing units (PUs), and reduces the number of angle mode cost calculations during the search process, thereby improving intra-frame predictive coding performance. Detailed descriptions follow.
[0069] Example 1
[0070] Please see Figure 1 , Figure 1 This is a flowchart illustrating an intra-frame predictive coding method disclosed in an embodiment of the present invention. Wherein, Figure 1 The described intra-frame predictive coding method is applied to image processing systems, such as local servers or cloud servers used for intra-frame predictive coding management, and this embodiment of the invention is not limited thereto. Figure 1 As shown, this intra-frame predictive coding method may include the following operations:
[0071] 101. Obtain the prediction module.
[0072] 102. Based on the preset first-level search strategy, the prediction module is calculated and processed to obtain the first mode cost information.
[0073] 103. Based on the preset second search strategy, the cost information of the first mode is filtered and calculated to obtain the prediction mode information.
[0074] In this embodiment of the invention, the prediction mode information is used for intra-frame prediction coding.
[0075] As can be seen, the intra-frame predictive coding method described in the embodiments of the present invention can perform comprehensive processing such as calculation and filtering on the prediction module according to the first-level search strategy and the second search strategy to obtain prediction mode information for intra-frame predictive coding. This is beneficial to simplify the calculation process of intra-frame prediction angle mode cost, reduce the amount of calculation for each angle mode cost, facilitate parallel calculation of multiple PUs, and reduce the number of angle mode cost calculations during the search process, thereby improving the performance of intra-frame predictive coding.
[0076] In an optional embodiment, step 102 above involves calculating and processing the prediction module according to a preset first-level search strategy to obtain first-mode cost information, including:
[0077] The prediction module performs calculations based on a preset set of first intra-frame prediction modes to obtain second mode cost information; the set of first intra-frame prediction modes includes M first intra-frame prediction modes; M is a positive integer greater than or equal to 8; the second mode cost information includes several second mode costs.
[0078] The cost information of the second mode is processed to obtain the cost information of the first mode.
[0079] Optionally, the first intra-frame prediction mode mentioned above is obtained by filtering prediction modes from the prediction mode set.
[0080] Optionally, the above set of prediction models includes 33 prediction models.
[0081] Optionally, the prediction direction of prediction modes 2 to 9 in the above prediction modes is from the lower left to the upper right.
[0082] Optionally, the above-mentioned intra-frame prediction mode is angle prediction.
[0083] Optionally, the above-mentioned intra-frame prediction mode set includes prediction mode 4, prediction mode 8, prediction mode 12, prediction mode 16, prediction mode 20, prediction mode 24, prediction mode 28 and prediction mode 32.
[0084] In this optional embodiment, as an optional implementation method, the specific way to process the second mode cost information to obtain the first mode cost information is as follows:
[0085] The first intra-frame prediction mode corresponding to the second mode cost with the lowest cost among the second mode cost information is selected as the first mode cost information.
[0086] As can be seen, the intra-frame predictive coding method described in the embodiments of the present invention can obtain the first mode cost information by performing comprehensive processing such as calculation and processing on the prediction module according to the first intra-frame predictive mode set. This is beneficial to simplify the intra-frame predictive angle mode cost calculation process, reduce the amount of calculation for each angle mode cost, facilitate parallel calculation of multiple PUs, and reduce the number of angle mode cost calculations during the search process, thereby improving the performance of intra-frame predictive coding.
[0087] In another optional embodiment, the above-mentioned calculation and processing of the prediction module based on a preset first intra-frame prediction mode set to obtain second mode cost information includes:
[0088] For any prediction block within the prediction module, the mode cost of the prediction block in all intra-frame prediction modes in the intra-frame prediction mode set of the first frame is calculated to obtain the third mode cost information corresponding to the prediction block; the third mode cost information includes several third mode costs.
[0089] The cost information of the third mode is accumulated to obtain the cost of the second mode corresponding to the prediction block.
[0090] As can be seen, the intra-frame predictive coding method described in the embodiments of the present invention can obtain the second mode cost through traversal calculation and accumulation processing of the first intra-frame predictive mode set. This is beneficial to simplify the calculation process of intra-frame predictive angle mode cost, reduce the calculation amount of each angle mode cost, facilitate parallel calculation of multiple PUs, and reduce the number of angle mode cost calculations during the search process, thereby improving the performance of intra-frame predictive coding.
[0091] In another optional embodiment, the above-mentioned traversal calculation of the mode cost of the prediction block under all intra-frame prediction modes in the intra-frame prediction mode set yields the third mode cost information corresponding to the prediction block, including:
[0092] For any intra-frame prediction mode, the prediction point location information corresponding to the intra-frame prediction mode is determined based on the intra-frame prediction mode; the prediction point location information includes several prediction point locations.
[0093] For any predicted point location, obtain the reference pixel information corresponding to that predicted point location; the reference pixel information is located within the predicted block corresponding to that predicted point location.
[0094] The reference pixel information is calculated and processed according to the preset prediction model to obtain the image prediction value corresponding to the prediction point position;
[0095] The absolute difference between the original image value corresponding to the predicted point location and the predicted image value corresponding to the predicted point location is calculated to obtain the third mode cost corresponding to the predicted point location.
[0096] In this optional embodiment, as an optional implementation method, the specific way to determine the prediction point location information corresponding to the first intra-frame prediction mode based on the first intra-frame prediction mode is as follows:
[0097] The position information of all odd-numbered rows in the prediction block corresponding to the intra-frame prediction mode is determined as the prediction point position information; or,
[0098] The position information of all odd-numbered columns in the prediction block corresponding to the intra-frame prediction mode is determined as the prediction point position information; or,
[0099] The position information of half of each row in the prediction block corresponding to the prediction mode in the first frame is selected as the prediction point position information.
[0100] Optionally, the predicted point locations corresponding to the above predicted point location information are all located within the current predicted block, and not in other predicted blocks, in order to reduce the amount of computation.
[0101] Optionally, the above-mentioned reference pixel information includes a first reference pixel and / or a second reference pixel, which is not limited in the embodiments of the present invention.
[0102] Optionally, the reference pixels corresponding to the above reference pixel information are the original image values to be encoded, rather than the reconstructed values after encoding.
[0103] Optionally, the reference pixels corresponding to the above reference pixel information are not filtered.
[0104] Optionally, the positions of the reference pixels corresponding to the above reference pixel information are all located within the current prediction block, without depending on adjacent prediction blocks.
[0105] Optionally, the above prediction model is a model based on interpolation operations.
[0106] Optionally, the specific form of the above prediction model is as follows:
[0107] P=((32-f)·R1+f·R2+16)>>5;
[0108] Where P is the image prediction value, f is the coefficient related to the prediction angle, R1 is the first reference pixel, and R2 is the second reference pixel.
[0109] Optionally, the positions of the first reference pixel and the second reference pixel are adjacent.
[0110] Optionally, the position of the reference pixel corresponding to the above reference pixel information includes the left column in the current prediction block, and / or the bottom column in the current prediction block, and / or the right column in the current prediction block, and / or the top column in the current prediction block. This embodiment of the invention does not limit the position of the reference pixel.
[0111] Optionally, the reference pixel positions corresponding to the above reference pixel information do not include the reference pixels used by the HEVC standard located in the left column inside and outside the current prediction block.
[0112] As can be seen, the intra-frame predictive coding method described in the embodiments of the present invention can determine the prediction point position information and obtain the reference pixel information, and then obtain the third mode cost through the calculation and processing of the reference pixel information and the calculation of the absolute difference. This is more conducive to simplifying the calculation process of intra-frame prediction angle mode cost, reducing the amount of calculation for each angle mode cost, facilitating parallel calculation of multiple PUs, and reducing the number of angle mode cost calculations during the search process, thereby improving the performance of intra-frame predictive coding.
[0113] Example 2
[0114] Please see Figure 2 , Figure 2This is a flowchart illustrating another intra-frame predictive coding method disclosed in an embodiment of the present invention. Figure 2 The described intra-frame predictive coding method is applied to image processing systems, such as local servers or cloud servers used for intra-frame predictive coding management, and this embodiment of the invention is not limited thereto. Figure 2 As shown, this intra-frame predictive coding method may include the following operations:
[0115] 201. Obtain the prediction module.
[0116] 202. Based on the preset first-level search strategy, the prediction module is calculated and processed to obtain the first mode cost information.
[0117] 203. Construct a second intra-frame prediction mode set based on the first mode cost information.
[0118] In this embodiment of the invention, the above-mentioned second intra-frame prediction mode set includes N second intra-frame prediction modes.
[0119] In this embodiment of the invention, N is a positive integer greater than or equal to 5 and less than M.
[0120] 204. The prediction module is processed based on the second intra-frame prediction mode set to obtain the fourth mode cost information.
[0121] In this embodiment of the invention, the aforementioned fourth mode cost information includes several fourth mode costs.
[0122] 205. The cost information of the fourth model is filtered and processed to obtain the prediction model information.
[0123] In this embodiment of the invention, the specific technical details and explanations of technical terms for steps 201-202 can be found in the detailed description of steps 101-102 in Embodiment 1, and will not be repeated here.
[0124] In this optional embodiment, as an optional implementation method, the specific way to calculate and process the prediction module based on the second intra-frame prediction mode set to obtain the fourth mode cost information is as follows:
[0125] The prediction module iterates through all the intra-frame prediction modes in the intra-frame prediction mode set except for the intra-frame prediction mode that matches the first mode cost information, and combines the first mode cost information to determine the fourth mode cost information.
[0126] As can be seen, the intra-frame predictive coding method described in the embodiments of the present invention can perform comprehensive processing such as construction processing, calculation processing and filtering processing on the prediction module according to the first-level search strategy and the second search strategy to obtain prediction mode information for intra-frame predictive coding. This is beneficial to simplify the calculation process of intra-frame prediction angle mode cost, reduce the amount of calculation of each angle mode cost, facilitate parallel calculation of multiple PUs and reduce the number of angle mode cost calculations during the search process, thereby improving the performance of intra-frame predictive coding.
[0127] In an optional embodiment, step 205 above involves filtering the fourth mode cost information to obtain prediction mode information, including:
[0128] Sort all fourth mode costs in the fourth mode cost information in ascending order of mode cost to obtain the mode cost sequence;
[0129] According to the preset pattern screening strategy, the fourth pattern cost in the pattern cost sequence is selected and processed to obtain the predicted pattern information.
[0130] Optionally, the above prediction model information includes several prediction models.
[0131] Optionally, the above prediction patterns will be added to the RDO queue.
[0132] As can be seen, the intra-frame prediction coding method described in the embodiments of the present invention can sort and filter the fourth mode cost to obtain prediction mode information, which is more conducive to simplifying the intra-frame prediction angle mode cost calculation process, reducing the amount of calculation for each angle mode cost, facilitating parallel calculation of multiple PUs, and reducing the number of angle mode cost calculations during the search process, thereby improving the performance of intra-frame prediction coding.
[0133] In another optional embodiment, constructing the second intra-frame prediction mode set based on the first mode cost information includes:
[0134] Centered on the first intra-frame prediction mode corresponding to the first mode cost information, select L prediction modes from the preset prediction mode set that are adjacent to the first intra-frame prediction mode corresponding to the first mode cost information as the second intra-frame prediction mode; L is a positive integer less than N by 1.
[0135] Optionally, the above set of prediction models includes 35 prediction models.
[0136] Optionally, the above prediction modes include planar mode, and / or, DC mode, and / or, angle mode, which are not limited in the embodiments of the present invention.
[0137] Optionally, the above-mentioned second intra-frame prediction mode is an angle mode.
[0138] Preferably, L is 4.
[0139] Optionally, the above prediction mode is an angle mode.
[0140] As can be seen, the intra-frame prediction coding method described in the embodiments of the present invention can select the second intra-frame prediction mode with the first intra-frame prediction mode as the center, which is more conducive to simplifying the calculation process of intra-frame prediction angle mode cost, reducing the amount of calculation of each angle mode cost, facilitating parallel calculation of multiple PUs and reducing the number of angle mode cost calculations during the search process, thereby improving the performance of intra-frame prediction coding.
[0141] Example 3
[0142] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of an intra-frame prediction coding apparatus disclosed in an embodiment of the present invention. Figure 3 The described apparatus can be applied to image processing systems, such as local servers or cloud servers for intra-frame predictive coding management, and the embodiments of the present invention are not limited thereto. Figure 3 As shown, the device may include:
[0143] Module 301 is used to acquire the prediction module;
[0144] The first processing module 302 is used to perform calculations on the prediction module according to the preset first-level search strategy to obtain the first mode cost information.
[0145] The second processing module 303 is used to filter and calculate the first mode cost information according to the preset second search strategy to obtain the prediction mode information; the prediction mode information is used for intra-frame prediction coding.
[0146] It is evident that implementation Figure 3 The described intra-frame predictive coding apparatus can perform comprehensive processing such as calculation and filtering on the prediction module according to the first-level search strategy and the second search strategy to obtain prediction mode information for intra-frame predictive coding. This helps to simplify the calculation process of intra-frame prediction angle mode cost, reduce the amount of calculation for each angle mode cost, facilitate parallel calculation of multiple PUs, and reduce the number of angle mode cost calculations during the search process, thereby improving the performance of intra-frame predictive coding.
[0147] In another alternative embodiment, such as Figure 4 As shown, the first processing module 302 includes a first processing submodule 3021 and a second processing submodule 3022, wherein:
[0148] The first processing submodule 3021 is used to perform calculation processing on the prediction module according to the preset first intra-frame prediction mode set to obtain the second mode cost information; the first intra-frame prediction mode set includes M first intra-frame prediction modes; M is a positive integer greater than or equal to 8; the second mode cost information includes several second mode costs.
[0149] The second processing submodule 3022 is used to process the second mode cost information to obtain the first mode cost information.
[0150] It is evident that implementation Figure 4 The described intra-frame predictive coding apparatus can perform comprehensive processing such as calculation and processing on the prediction module based on the first intra-frame predictive mode set to obtain the first mode cost information. This helps to simplify the intra-frame predictive angle mode cost calculation process, reduce the amount of calculation for each angle mode cost, facilitate parallel calculation of multiple PUs, and reduce the number of angle mode cost calculations during the search process, thereby improving the performance of intra-frame predictive coding.
[0151] In yet another alternative embodiment, such as Figure 4 As shown, the first processing submodule 3021 calculates and processes the prediction module according to the preset first intra-frame prediction mode set to obtain the second mode cost information in the following specific way:
[0152] For any prediction block within the prediction module, the mode cost of the prediction block in all intra-frame prediction modes in the intra-frame prediction mode set of the first frame is calculated to obtain the third mode cost information corresponding to the prediction block; the third mode cost information includes several third mode costs.
[0153] The cost information of the third mode is accumulated to obtain the cost of the second mode corresponding to the prediction block.
[0154] It is evident that implementation Figure 4 The described intra-predictive coding apparatus can obtain the second mode cost by traversing and accumulating the first intra-predictive mode set. This simplifies the calculation process of intra-predictive angle mode costs, reduces the computational amount of each angle mode cost, facilitates parallel computation by multiple PUs, and reduces the number of angle mode cost calculations during the search process, thereby improving the performance of intra-predictive coding.
[0155] In yet another alternative embodiment, such as Figure 4 As shown, the first processing submodule 3021 iterates through and calculates the mode cost of the prediction block under all intra-frame prediction modes in the intra-frame prediction mode set to obtain the third mode cost information corresponding to the prediction block. The specific method is as follows:
[0156] For any intra-frame prediction mode, the prediction point location information corresponding to the intra-frame prediction mode is determined based on the intra-frame prediction mode; the prediction point location information includes several prediction point locations.
[0157] For any predicted point location, obtain the reference pixel information corresponding to that predicted point location; the reference pixel information is located within the predicted block corresponding to that predicted point location.
[0158] The reference pixel information is calculated and processed according to the preset prediction model to obtain the image prediction value corresponding to the prediction point position;
[0159] The absolute difference between the original image value corresponding to the predicted point location and the predicted image value corresponding to the predicted point location is calculated to obtain the third mode cost corresponding to the predicted point location.
[0160] It is evident that implementation Figure 4 The described intra-predictive coding apparatus can determine the prediction point location information and obtain reference pixel information, and then obtain the third mode cost by calculating and processing the reference pixel information and calculating the absolute difference. This is more conducive to simplifying the intra-predictive angle mode cost calculation process, reducing the amount of calculation for each angle mode cost, facilitating parallel calculation by multiple PUs, and reducing the number of angle mode cost calculations during the search process, thereby improving the performance of intra-predictive coding.
[0161] In yet another alternative embodiment, such as Figure 4 As shown, the second processing module 303 filters and calculates the cost information of the first mode according to the preset second search strategy, and obtains the prediction mode information in the following specific way:
[0162] A second intra-frame prediction mode set is constructed based on the first mode cost information; the second intra-frame prediction mode set includes N second intra-frame prediction modes; N is a positive integer greater than or equal to 5 and less than M;
[0163] The prediction module is calculated and processed based on the second intra-frame prediction mode set to obtain the fourth mode cost information; the fourth mode cost information includes several fourth mode costs.
[0164] The cost information of the fourth model is filtered and processed to obtain the prediction model information.
[0165] It is evident that implementation Figure 4The described intra-frame predictive coding apparatus can perform comprehensive processing such as construction processing, calculation processing and filtering processing on the prediction module according to the first-level search strategy and the second search strategy to obtain prediction mode information for intra-frame predictive coding. This helps to simplify the calculation process of intra-frame prediction angle mode cost, reduce the amount of calculation for each angle mode cost, facilitate parallel calculation of multiple PUs and reduce the number of angle mode cost calculations during the search process, thereby improving the performance of intra-frame predictive coding.
[0166] In yet another alternative embodiment, such as Figure 4 As shown, the second processing module 303 filters the fourth mode cost information to obtain the prediction mode information in the following specific way:
[0167] Sort all fourth mode costs in the fourth mode cost information in ascending order of mode cost to obtain the mode cost sequence;
[0168] According to the preset pattern screening strategy, the fourth pattern cost in the pattern cost sequence is selected and processed to obtain the predicted pattern information.
[0169] It is evident that implementation Figure 4 The described intra-predictive coding apparatus can sort and filter the fourth mode cost to obtain prediction mode information, which is more conducive to simplifying the intra-predictive angle mode cost calculation process, reducing the amount of calculation for each angle mode cost, facilitating parallel computation of multiple PUs, and reducing the number of angle mode cost calculations during the search process, thereby improving the performance of intra-predictive coding.
[0170] In yet another alternative embodiment, such as Figure 4 As shown, the second processing module 303 constructs a second intra-frame prediction mode set based on the first mode cost information, including:
[0171] Centered on the first intra-frame prediction mode corresponding to the first mode cost information, select L prediction modes from the preset prediction mode set that are adjacent to the first intra-frame prediction mode corresponding to the first mode cost information as the second intra-frame prediction mode; L is a positive integer less than N by 1.
[0172] It is evident that implementation Figure 4 The described intra-predictive coding apparatus can select a second intra-predictive mode centered on a first intra-predictive mode, which is more conducive to simplifying the calculation process of intra-predictive angle mode costs, reducing the amount of calculation for each angle mode cost, facilitating parallel computation of multiple PUs, and reducing the number of angle mode cost calculations during the search process, thereby improving the performance of intra-predictive coding.
[0173] Example 4
[0174] Please see Figure 5 , Figure 5 This is a schematic diagram of another intra-frame prediction coding apparatus disclosed in an embodiment of the present invention. Wherein, Figure 5 The described apparatus can be applied to image processing systems, such as local servers or cloud servers for intra-frame predictive coding management, and the embodiments of the present invention are not limited thereto. Figure 5 As shown, the device may include:
[0175] Memory 401 storing executable program code;
[0176] Processor 402 coupled to memory 401;
[0177] The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the intra-frame prediction coding method described in Embodiment 1 or Embodiment 2.
[0178] Example 5
[0179] This invention discloses a computer read storage medium that stores a computer program for electronic data interchange, wherein the computer program causes a computer to execute the steps of the intra-frame prediction coding method described in Embodiment 1 or Embodiment 2.
[0180] Example 6
[0181] This invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the intra-frame prediction coding method described in Embodiment 1 or Embodiment 2.
[0182] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0183] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0184] Finally, it should be noted that the intra-frame prediction coding method and apparatus disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An intra-frame predictive coding method, characterized in that, The method includes: Obtain the prediction module; According to the preset first-level search strategy, the prediction module is calculated and processed to obtain the first mode cost information; According to a preset second search strategy, the first mode cost information is filtered and calculated to obtain prediction mode information; the prediction mode information is used for intra-frame prediction coding. And, the step of calculating and processing the prediction module according to the preset first-level search strategy to obtain the first mode cost information includes: The prediction module is processed according to a preset first intra-frame prediction mode set to obtain second mode cost information; the first intra-frame prediction mode set includes M first intra-frame prediction modes; M is a positive integer greater than or equal to 8; the second mode cost information includes several second mode costs. The cost information of the second mode is processed to obtain the cost information of the first mode. And, the step of calculating and processing the prediction module according to the preset first intra-frame prediction mode set to obtain the second mode cost information includes: For any prediction block within the prediction module, the mode cost of the prediction block under all the first intra-frame prediction modes in the first intra-frame prediction mode set is calculated to obtain the third mode cost information corresponding to the prediction block; the third mode cost information includes several third mode costs. The third mode cost information is accumulated to obtain the second mode cost corresponding to the prediction block; And, the step of traversing and calculating the mode cost of the prediction block under all the first intra-frame prediction modes in the first intra-frame prediction mode set to obtain the third mode cost information corresponding to the prediction block includes: For any first intra-frame prediction mode, the prediction point position information corresponding to the first intra-frame prediction mode is determined according to the first intra-frame prediction mode; the prediction point position information includes several prediction point positions. For any predicted point location, obtain the reference pixel information corresponding to that predicted point location; the reference pixel information is located within the prediction block corresponding to that predicted point location. The reference pixel information is calculated and processed according to the preset prediction model to obtain the image prediction value corresponding to the prediction point position. The absolute difference between the original image value corresponding to the predicted point location and the predicted image value corresponding to the predicted point location is calculated to obtain the third mode cost corresponding to the predicted point location.
2. The intra-frame predictive coding method according to claim 1, characterized in that, The step of filtering and calculating the cost information of the first mode according to a preset second search strategy to obtain the predicted mode information includes: A second intra-frame prediction mode set is constructed based on the first mode cost information; the second intra-frame prediction mode set includes N second intra-frame prediction modes; N is a positive integer greater than or equal to 5 and less than M; The prediction module is calculated and processed according to the second intra-frame prediction mode set to obtain fourth mode cost information; the fourth mode cost information includes several fourth mode costs. The cost information of the fourth mode is filtered to obtain the prediction mode information.
3. The intra-frame predictive coding method according to claim 2, characterized in that, The process of filtering the cost information of the fourth mode to obtain the prediction mode information includes: Sort all fourth mode costs in the fourth mode cost information in ascending order of mode cost to obtain the mode cost sequence; According to the preset pattern screening strategy, the fourth pattern cost that appears first in the pattern cost sequence is selected and processed to obtain the predicted pattern information.
4. The intra-frame predictive coding method according to claim 2, characterized in that, The step of constructing a second intra-frame prediction mode set based on the first mode cost information includes: Centered on the first intra-frame prediction mode corresponding to the first mode cost information, L prediction modes adjacent to the first intra-frame prediction mode corresponding to the first mode cost information are selected from the preset prediction mode set as the second intra-frame prediction modes; where L is a positive integer less than N by 1.
5. An intra-frame prediction coding apparatus, characterized in that, The device includes: The acquisition module is used to acquire information from the prediction module. The first processing module is used to perform calculations on the prediction module according to a preset first-level search strategy to obtain the first mode cost information. The second processing module is used to filter and calculate the first mode cost information according to a preset second search strategy to obtain prediction mode information; the prediction mode information is used for intra-frame prediction coding. And, the first processing module includes a first processing submodule and a second processing submodule, wherein: The first processing submodule is used to perform calculation processing on the prediction module according to a preset first intra-frame prediction mode set to obtain second mode cost information; the first intra-frame prediction mode set includes M first intra-frame prediction modes; M is a positive integer greater than or equal to 8; the second mode cost information includes several second mode costs; The second processing submodule is used to process the second mode cost information to obtain the first mode cost information; Furthermore, the specific method by which the first processing submodule calculates and processes the prediction module according to the preset first intra-frame prediction mode set to obtain the second mode cost information is as follows: For any prediction block within the prediction module, the mode cost of the prediction block under all the first intra-frame prediction modes in the first intra-frame prediction mode set is calculated to obtain the third mode cost information corresponding to the prediction block; the third mode cost information includes several third mode costs. The third mode cost information is accumulated to obtain the second mode cost corresponding to the prediction block; Furthermore, the specific method by which the first processing submodule iterates through and calculates the mode cost of the prediction block under all the first intra-frame prediction modes in the first intra-frame prediction mode set to obtain the third mode cost information corresponding to the prediction block is as follows: For any of the first intra-frame prediction modes, the prediction point location information corresponding to the first intra-frame prediction mode is determined according to the first intra-frame prediction mode; the prediction point location information includes several prediction point locations. For any of the predicted point locations, obtain the reference pixel information corresponding to that predicted point location; the reference pixel information is located within the prediction block corresponding to that predicted point location. The reference pixel information is calculated and processed according to the preset prediction model to obtain the image prediction value corresponding to the prediction point position. The absolute difference between the original image value corresponding to the predicted point location and the predicted image value corresponding to the predicted point location is calculated to obtain the third mode cost corresponding to the predicted point location.
6. An intra-frame prediction coding apparatus, characterized in that, The device includes: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the intra-frame prediction coding method as described in any one of claims 1-4.
7. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, which, when invoked, are used to execute the intra-frame prediction coding method as described in any one of claims 1-4.