Intra-frame prediction method, device, apparatus, and computer-readable storage medium

By adaptively expanding the angle prediction mode for the size and type of prediction units in the video coding standard, the balance problem between accuracy and coding bits in the intra-frame prediction mode is solved, and the video coding performance is improved.

CN110446050BActive Publication Date: 2025-09-16BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910700604.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-31
Publication Date
2025-09-16
Estimated Expiration
2039-07-31

AI Technical Summary

Technical Problem

In existing video coding standards, it is difficult to achieve a balance between accuracy and coding bits in intra-frame prediction mode, especially when more angular prediction modes are used, the coding performance decreases.

Method used

By determining the size and type of the current prediction unit, different linear prediction methods are used for intra-frame prediction. The first type of prediction unit uses the expanded first linear prediction method, and the second type of prediction unit uses the second linear prediction method. Combined with the non-uniform angle expansion technology, more or less angle prediction modes are inserted to adapt to prediction units of different sizes.

Benefits of technology

A balance is achieved between the accuracy of intra-frame prediction and the coding bits, the intra-frame prediction efficiency and coding performance are improved, and the accuracy reduction caused by a small number of angle prediction modes and the bit burden caused by a large number of angle prediction modes are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110446050B_ABST
    Figure CN110446050B_ABST
Patent Text Reader

Abstract

The present invention provides an intra-frame prediction method, apparatus, device and computer-readable storage medium, which relate to the field of cloud computing. The method determines the size type of a current prediction unit; if the size type is the first type, a first linear prediction method is used to obtain a pixel prediction value of the current prediction unit based on the actual pixel value of a reference prediction unit; if the size type is the second type, a second linear prediction method is used to obtain a pixel prediction value of the current prediction unit based on the actual pixel value of the reference prediction unit; wherein the first linear prediction method is obtained by extending the second linear prediction method by an angle prediction mode; an optimal prediction mode of the current prediction unit is determined according to the coding cost of the current prediction unit under each prediction mode; a residual between the actual pixel value and the pixel prediction value of the current prediction unit under the optimal prediction mode is obtained, and the residual and the representation information of the optimal prediction mode are encoded, thereby achieving a balance between the accuracy of intra-frame prediction and the bits required for encoding the intra-frame prediction mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field

[0001] The present invention relates to video technology, and in particular to an intra-frame prediction method, apparatus, device and computer-readable storage medium. [Background Technology]

[0002] Intra-frame prediction leverages spatial correlation in the video domain, using neighboring coded pixels within the same frame to predict the current pixel, effectively removing temporal redundancy in the video. The intra-frame prediction process consists of five steps: obtaining reference pixels, filtering the reference pixels, obtaining predicted values ​​based on the selected intra-frame prediction mode, filtering the predicted values, and encoding the selected intra-frame prediction mode. Obtaining predicted values ​​based on the selected prediction mode is the most critical step in intra-frame prediction.

[0003] Although video coding has been developed for decades, the intra-frame prediction mode is still mainly based on linear prediction. In current video coding standards such as High Efficiency Video Coding (HEVC), Audio Video Standard (AVS) 2, Versatile Video Coding (VVC) and AVS3 standards, the intra-frame prediction mode mainly adopts the angular direction prediction method, using the reconstructed reference pixels adjacent to the current coding block to predict the current coding block. In the HEVC standard, there are 33 angular prediction modes, DC mode and Plannar mode. Figure 1 As shown in the figure, it is a schematic diagram of the 33 angular prediction modes in the HEVC standard. Since the angular prediction mode is a linear copy operation, the angular prediction mode with too large an interval cannot achieve a good prediction effect. The VVC standard expands the 33 angular prediction modes in the HEVC standard to 65 angular prediction modes, inserting more compact and detailed angular prediction modes on the basis of the original angular modes to improve the effect of intra-frame prediction. Figure 2 As shown, it is a schematic diagram of 65 angle prediction modes in the VVC standard.

[0004] In the next-generation AVS standard, AVS3, the coding unit (CU) is the basic unit of video coding. The CU uses a recursive quadtree-binarytree-extended quadtree partitioning scheme, with a maximum size of 128x128. Prediction, transform, quantization, entropy coding, and post-processing are performed using the CU as the basic unit. When making predictions, the CU can be divided into prediction units (PUs) of varying sizes. Intra-frame prediction is performed using the PU as the basic unit. Even with an intra-frame prediction unit size of 64x64, 30 angle prediction modes are still used for intra-frame prediction, and prediction accuracy cannot be guaranteed.

[0005] However, more angle prediction mode pairs also mean that more bit costs are required to encode the angle prediction mode, increasing the bit rate of the encoding prediction mode itself. When using the 65 angle prediction modes in the VVC standard, a 6-bit fixed-length encoding prediction mode is required, compared to the 33 angle prediction modes that require a 5-bit fixed-length encoding prediction mode, which adds a lot of bit burden to smaller coding blocks, resulting in a decrease in encoding performance. Therefore, the existing intra-frame mode cannot achieve a good balance between intra-frame prediction accuracy and the bits required for encoding the intra-frame prediction mode. [Summary of the invention]

[0006] Various aspects of the present invention provide an intra-frame prediction method, apparatus, device, and computer-readable storage medium to improve intra-frame prediction performance.

[0007] One aspect of the present invention provides an intra-frame prediction method, comprising:

[0008] Determine the size and type of the current prediction unit;

[0009] If the size type of the current prediction unit is the first type, respectively adopt each prediction mode in the first linear prediction method, and obtain the pixel prediction value of the current prediction unit in each prediction mode in the first linear prediction method based on the actual pixel value of the reference prediction unit;

[0010] If the size type of the current prediction unit is the second type, respectively adopting each prediction mode in the second linear prediction mode, and obtaining pixel prediction values ​​of the current prediction unit in each prediction mode in the second linear prediction mode based on actual pixel values ​​of the reference prediction unit; wherein the first linear prediction mode is obtained by performing angular prediction mode expansion on the second linear prediction mode;

[0011] determining an optimal prediction mode for the current prediction unit according to encoding costs of the current prediction unit under each prediction mode;

[0012] A residual between an actual pixel value and a pixel prediction value of the current prediction unit under the optimal prediction mode is obtained, and the residual and representation information of the optimal prediction mode are encoded.

[0013] According to the aspects described above and any possible implementation method, an implementation method is further provided, where when the size of the current prediction unit is within a preset size range, the size type of the current prediction unit is the first type; when the size of the current prediction unit is not within the preset size range, the size type of the current prediction unit is the second type.

[0014] According to the above aspects and any possible implementation, an implementation is further provided, wherein the first linear prediction mode includes: M angular prediction modes and at least one non-angular prediction mode; or

[0015] The second linear prediction mode includes: N angular prediction modes, and the at least one non-angular prediction mode; wherein M and N are integers greater than 1, and M is greater than N.

[0016] According to the above aspects and any possible implementation, there is further provided an implementation, further comprising:

[0017] A non-uniform angle expansion method is adopted, where more angles are inserted around the angle corresponding to the angle prediction mode with a higher frequency of use in the second linear prediction method, and fewer angles are inserted around the angle corresponding to the angle prediction mode with a lower frequency of use in the second linear prediction method, and the first linear prediction method is obtained based on the angle prediction mode corresponding to the inserted angle and the prediction mode in the second linear prediction method.

[0018] According to the above aspect and any possible implementation, there is further provided an implementation, wherein after encoding the residual and the representation information of the optimal prediction mode, the method further includes:

[0019] parsing the encoding information of the residual and the encoding information of the representation information of the optimal prediction mode respectively to obtain the representation information of the residual and the optimal prediction mode;

[0020] determining a reference prediction unit according to the angle corresponding to the optimal prediction mode and the position of the current prediction unit;

[0021] A pixel prediction value of the current prediction unit is obtained according to the optimal prediction mode, the actual pixel value of the reference prediction unit, and the residual.

[0022] According to the above aspects and any possible implementation, there is further provided an implementation, further comprising:

[0023] Obtaining the most probable mode of the current prediction unit;

[0024] Determine representation information of the optimal prediction mode according to the most probable mode of the current prediction unit and the optimal prediction mode.

[0025] According to the above aspects and any possible implementation, there is further provided an implementation, further comprising:

[0026] If the size type of the current prediction unit is the second type, the most probable mode is converted into a prediction mode in the first linear prediction mode.

[0027] According to the above aspect and any possible implementation, an implementation is further provided, wherein encoding the representation information of the optimal prediction mode includes:

[0028] If the size type of the current prediction unit is the first type, encoding the representation information of the optimal prediction mode using a first bit length;

[0029] If the size type of the current prediction unit is the second type, the representation information of the optimal prediction mode is encoded using a second bit length; wherein the first bit length is greater than the second bit length.

[0030] According to the above aspect and any possible implementation manner, an implementation manner is further provided, wherein parsing the encoded information of the representation information of the optimal prediction mode to obtain the representation information of the optimal prediction mode includes:

[0031] Parsing the encoded information of the representation information of the optimal prediction mode to obtain the representation information of the optimal prediction mode, and determining the size type of the current prediction unit according to the length of the encoded information of the representation information of the optimal prediction mode;

[0032] If the size type of the current prediction unit is the second type, the optimal prediction mode is converted to a prediction mode in the first linear prediction mode.

[0033] Another aspect of the present invention provides an intra-frame prediction apparatus, comprising an encoding module and a decoding module, wherein the encoding module comprises:

[0034] A first determining unit, configured to determine the size type of a current prediction unit;

[0035] a first prediction unit configured to, if the size type of the current prediction unit is the first type, respectively adopt each prediction mode in the first linear prediction method and obtain pixel prediction values ​​of the current prediction unit in each prediction mode in the first linear prediction method based on actual pixel values ​​of the reference prediction unit;

[0036] a second prediction unit configured to, if the size type of the current prediction unit is the second type, respectively adopt each prediction mode in a second linear prediction method to obtain a pixel prediction value of the current prediction unit in each prediction mode in the second linear prediction method based on an actual pixel value of a reference prediction unit; wherein the first linear prediction method is obtained by performing an angular prediction mode expansion on the second linear prediction method;

[0037] a second determining unit, configured to determine an optimal prediction mode for the current prediction unit according to encoding costs of the current prediction unit under each prediction mode;

[0038] A first acquiring unit, configured to acquire a residual between an actual pixel value and a pixel prediction value of the current prediction unit in the optimal prediction mode;

[0039] An encoding unit is used to encode the residual and the representation information of the optimal prediction mode.

[0040] According to the aspects described above and any possible implementation method, an implementation method is further provided, where when the size of the current prediction unit is within a preset size range, the size type of the current prediction unit is the first type; when the size of the current prediction unit is not within the preset size range, the size type of the current prediction unit is the second type.

[0041] According to the above aspects and any possible implementation, an implementation is further provided, wherein the first linear prediction mode includes: M angular prediction modes and at least one non-angular prediction mode; or

[0042] The second linear prediction mode includes: N angular prediction modes, and the at least one non-angular prediction mode; wherein M and N are integers greater than 1, and M is greater than N.

[0043] According to the above aspects and any possible implementation, there is further provided an implementation, further comprising:

[0044] An expansion module is configured to employ a non-uniform angle expansion method to insert more angles around an angle corresponding to an angle prediction mode that is used more frequently in the second linear prediction method, insert fewer angles around an angle corresponding to an angle prediction mode that is used less frequently in the second linear prediction method, and obtain the first linear prediction method based on the angle prediction mode corresponding to the inserted angles and the prediction mode in the second linear prediction method.

[0045] According to the above aspect and any possible implementation, further provided is an implementation, wherein the decoding module includes:

[0046] a parsing unit, configured to parse the encoding information of the residual and the encoding information of the representation information of the optimal prediction mode respectively, to obtain the representation information of the residual and the optimal prediction mode;

[0047] a third determining unit, configured to determine a reference prediction unit according to an angle corresponding to the optimal prediction mode and a position of the current prediction unit;

[0048] The second acquisition unit is configured to acquire a pixel prediction value of the current prediction unit according to the optimal prediction mode, the actual pixel value of the reference prediction unit, and the residual.

[0049] According to the above aspects and any possible implementation manner, further provided is an implementation manner, wherein the encoding module further includes:

[0050] a third obtaining unit, configured to obtain the most probable mode of the current prediction unit;

[0051] The fourth determining unit is configured to determine representation information of the optimal prediction mode according to the most probable mode of the current prediction unit and the optimal prediction mode.

[0052] According to the above aspects and any possible implementation manner, further provided is an implementation manner, wherein the encoding module further includes:

[0053] The first conversion unit is configured to convert the most probable mode into a prediction mode in the first linear prediction mode if the size type of the current prediction unit is the second type.

[0054] According to the above aspect and any possible implementation, an implementation is further provided, wherein when the encoding unit encodes the representation information of the optimal prediction mode, it is specifically configured to:

[0055] If the size type of the current prediction unit is the first type, encoding the representation information of the optimal prediction mode using a first bit length;

[0056] If the size type of the current prediction unit is the second type, the representation information of the optimal prediction mode is encoded using a second bit length; wherein the first bit length is greater than the second bit length.

[0057] According to the above aspect and any possible implementation manner, there is further provided an implementation manner, wherein when the parsing unit parses the encoded information of the representation information of the optimal prediction mode to obtain the representation information of the optimal prediction mode, the parsing unit is specifically configured to: parse the encoded information of the representation information of the optimal prediction mode to obtain the representation information of the optimal prediction mode, and determine the size type of the current prediction unit according to the length of the encoded information of the representation information of the optimal prediction mode;

[0058] The decoding module also includes:

[0059] The second conversion unit is configured to convert the optimal prediction mode into a prediction mode in the first linear prediction mode if the size type of the current prediction unit is the second type.

[0060] Another aspect of the present invention provides a device comprising:

[0061] one or more processors;

[0062] a storage device for storing one or more programs,

[0063] When the one or more programs are executed by the one or more processors, the one or more processors implement the intra-frame prediction method provided in the above aspect.

[0064] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the intra-frame prediction method provided in the above aspect.

[0065] As can be seen from the above technical solution, the embodiment of the present invention obtains the first linear prediction mode by performing angular prediction mode expansion on the second linear prediction mode, and determines the linear prediction mode by determining the size type of the current prediction unit. If the size type of the current prediction unit is the first type, each prediction mode in the first linear prediction mode is adopted, and the pixel prediction value of the current prediction unit is obtained based on the actual pixel value of the reference prediction unit; if the size type of the current prediction unit is the second type, the pixel prediction value of the current prediction unit is obtained based on the actual pixel value of the reference prediction unit; the optimal prediction mode of the current prediction unit is determined according to the coding cost of the current prediction unit under each prediction mode, and the residual between the actual pixel value and the pixel prediction value of the current prediction unit and the representation information of the optimal prediction mode are encoded. Since different numbers of angular prediction modes can be used for intra-frame prediction of prediction units of different size types, it is possible to avoid using a small number of angular prediction modes for intra-frame prediction of the first type of prediction unit to reduce the prediction accuracy, and it is also possible to avoid using a large number of angular prediction modes for intra-frame prediction of the second type of prediction unit to increase the bit burden, thereby reducing the coding performance.

[0066] In addition, the technical solution provided by the present invention can reduce the bit burden of the intra-frame prediction mode, improve the efficiency of intra-frame prediction and coding performance, and achieve a balance between the accuracy of intra-frame prediction and the bits required for the intra-frame prediction mode.

Brief Description of the Drawings

[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0068] Figure 1 Schematic diagram of 33 angle prediction modes in the HEVC standard;

[0069] Figure 2 Schematic diagram of the 65 angle prediction modes in the VVC standard;

[0070] Figure 3 A schematic diagram of a flow chart of an intra-frame prediction method provided by an embodiment of the present invention;

[0071] Figure 4 This is an exemplary schematic diagram of the first linear prediction method and the second linear prediction method in an embodiment of the present invention;

[0072] Figure 5 A schematic structural diagram of an intra-frame prediction method provided by another embodiment of the present invention;

[0073] Figure 6 A schematic structural diagram of an intra-frame prediction apparatus provided by an embodiment of the present invention;

[0074] Figure 7 A schematic structural diagram of an intra-frame prediction apparatus provided by another embodiment of the present invention;

[0075] Figure 8 is a block diagram of an exemplary computer system / server suitable for implementing embodiments of the present invention. [Specific implementation method]

[0076] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0077] It should be noted that the terminals involved in the embodiments of the present invention may include but are not limited to mobile phones, personal digital assistants (PDAs), wireless handheld devices, tablet computers, personal computers (PCs), MP3 players, MP4 players, wearable devices (for example, smart glasses, smart watches, smart bracelets, etc.), etc.

[0078] In this document, the term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0079] The main idea of ​​the present invention is to expand the angle prediction mode of the second linear prediction mode with a smaller number of angles to obtain the first linear prediction mode with a larger number of angles, and select the first linear prediction mode or the second linear prediction mode for intra-frame prediction according to the size type of the current prediction unit, so as to avoid using a small number of angle prediction modes to perform intra-frame prediction on the first type of prediction unit to reduce the prediction accuracy, and using a large number of angle prediction modes to perform intra-frame prediction on the second type of prediction unit to increase the bit burden, thereby causing a decrease in encoding performance, thereby achieving a balance between the intra-frame prediction accuracy and the bits required for encoding the intra-frame prediction mode.

[0080] Figure 3 A flow chart of an intra-frame prediction method provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the intra-frame prediction method of this embodiment includes:

[0081] 101. Determine the size and type of the current prediction unit (PU).

[0082] If the size type of the current prediction unit is the first type, execute 102. Otherwise, if the size type of the current prediction unit is the second type, execute 103.

[0083] 102. Use each prediction mode in the first linear prediction method respectively, and obtain pixel prediction values ​​of the current prediction unit in each prediction mode in the first linear prediction method based on the actual pixel value of the reference prediction unit.

[0084] The reference prediction unit may be determined according to the prediction mode and the position and size of the current prediction unit. For example, a reference pixel twice as wide as the upper boundary of the current prediction unit may be used as the reference prediction unit.

[0085] Then, execute 104.

[0086] 103 , respectively adopt the second linear prediction method to obtain pixel prediction values ​​of the current prediction unit in each prediction mode in the second linear prediction method based on the actual pixel value of the reference prediction unit.

[0087] The first linear prediction mode is obtained by expanding the angle prediction mode of the second linear prediction mode, that is, the first linear prediction mode has more angle prediction modes than the second linear prediction mode.

[0088] The reference prediction unit may be determined according to the prediction mode and the position and size of the current prediction unit. For example, a reference pixel twice as wide as the upper boundary of the current prediction unit may be used as the reference prediction unit.

[0089] 104 , determining an optimal prediction mode for the current prediction unit according to the coding costs of the current prediction unit under each prediction mode.

[0090] The coding cost can include a distortion cost and a rate cost. The coding cost for each prediction mode can be calculated using a rate-distortion optimization method. In the optimal prediction mode, the distortion cost is low when the rate cost is minimized. The distortion cost can be calculated using a preset method based on the residual between the actual pixel value and the predicted pixel value of the current prediction unit.

[0091] 105 , obtaining a residual between the actual pixel value and the pixel prediction value of the current prediction unit in the optimal prediction mode, and encoding the residual and the representation information of the optimal prediction mode.

[0092] It should be noted that part or all of the execution entities of 101 to 105 may be applications located in the local terminal, i.e., the terminal device of the service provider, or may also be functional units such as plug-ins or software development kits (SDKs) set in the applications located in the local terminal, or may also be processing engines located in the network side server, or may also be distributed systems located on the network side. This embodiment does not specifically limit this.

[0093] It is understandable that the application may be a native program (nativeApp) installed on the terminal, or may be a webpage program (webApp) of a browser on the terminal, and this embodiment does not specifically limit this.

[0094] Since the angle prediction mode is a linear copy operation, angle prediction modes with too large intervals cannot achieve good prediction results. However, more angle prediction modes mean more coding bit costs, especially for smaller coding blocks. At the same time, a larger number of angles does not necessarily lead to a significant improvement in prediction performance. Instead, more bit coding prediction modes are required, so the coding performance will decrease.

[0095] Therefore, the same multi-angle intra prediction mode is not used for all block size types. Considering the balance between prediction performance and the bit cost of coding prediction modes, an embodiment of the present invention proposes a block size adaptive angular prediction mode expansion scheme. A first linear prediction mode is obtained by performing angular prediction mode expansion on a second linear prediction mode. The linear prediction mode is determined by determining the size type of a current prediction unit. If the size type of the current prediction unit is the first type, each prediction mode in the first linear prediction mode is used to obtain a pixel prediction value of the current prediction unit based on the actual pixel value of the reference prediction unit. If the size type of the current prediction unit is the second type, the pixel prediction value of the current prediction unit is obtained based on the actual pixel value of the reference prediction unit. The optimal prediction mode for the current prediction unit is determined based on the coding cost of each prediction mode, and the residual between the actual pixel value and the pixel prediction value of the current prediction unit and the representation information of the optimal prediction mode are encoded. Since different numbers of angular prediction modes can be used for intra-frame prediction of prediction units of different size types, it is possible to avoid using a small number of angular prediction modes for intra-frame prediction of the first type of prediction unit, which reduces prediction accuracy, and to avoid using a large number of angular prediction modes for intra-frame prediction of the second type of prediction unit, which increases the bit burden and thus reduces coding performance.

[0096] In addition, the bit burden of encoding intra-frame prediction mode can be reduced, the efficiency of intra-frame prediction and coding performance can be improved, and a balance can be achieved between the accuracy of intra-frame prediction and the bits required for encoding intra-frame prediction mode.

[0097] In the embodiment of the present invention, when performing prediction, the coding unit can be divided into prediction units of different sizes, and intra-frame prediction is performed using the prediction unit as the basic unit. The size of the prediction unit can be any size, such as 4x4, 8x8, 16x16, 32x32, 64x64, or 128x128.

[0098] Optionally, in a possible implementation of this embodiment, multiple prediction units of different sizes, or prediction units of all possible sizes, can be selected within the size range of the coding unit, and then each prediction mode is used to predict the prediction units of the selected sizes and calculate their coding costs, and a prediction unit corresponding to a size with the smallest coding cost is selected as the current prediction unit.

[0099] Alternatively, in another possible implementation of this embodiment, a prediction unit of a preset size may be selected as the current prediction unit according to a pre-set configuration.

[0100] Alternatively, in another possible implementation of this embodiment, when performing intra-frame prediction, the coding unit may determine the size of the current prediction unit based on the difference in brightness, chroma, etc. between the pixel at the current position and adjacent pixels in the current frame image. For example, when the difference in brightness, chroma, etc. between the pixel at the current position and adjacent pixels is large, a smaller prediction unit may be selected as the current prediction unit; when the difference in brightness, chroma, etc. between the pixel at the current position and adjacent pixels is small, a larger prediction unit may be selected as the current prediction unit.

[0101] Optionally, in a possible implementation of this embodiment, when the size of the current prediction unit is within a preset size range, the size type of the current prediction unit is the first type; when the size of the current prediction unit is not within the preset size range, the size type of the current prediction unit is the second type.

[0102] In an embodiment of the present invention, different numbers of intra-frame prediction modes are used for different prediction unit size types. For example, prediction units (i.e., the second size type) that are too small (e.g., 4x4, 8x8) or too large (e.g., 64x64, 128x128) and are not within a preset size range use the original prediction modes of the second linear prediction method, while prediction units (i.e., the first size type) that are not within the preset size range use the expanded prediction modes of the first linear prediction method. When using the prediction modes of the second linear prediction method, a smaller (e.g., 5-bit) fixed-length coding prediction mode can be used, and when using the prediction modes of the first linear prediction method, a longer (e.g., 6-bit) fixed-length coding prediction mode can be used, thereby achieving a balance between prediction performance and the bit cost of the coding prediction mode.

[0103] Optionally, in an intra-frame prediction method in another embodiment of the present invention, before step 101, the following steps may be further included:

[0104] A non-uniform angle expansion method is adopted, more angles are inserted around the angle corresponding to the angle prediction mode with a higher frequency of use in the second linear prediction method, and fewer angles are inserted around the angle corresponding to the angle prediction mode with a lower frequency of use in the second linear prediction method, and the first linear prediction method is obtained based on the angle prediction mode corresponding to the inserted angle and the prediction mode in the second linear prediction method.

[0105] In this embodiment, a non-uniform angle expansion method is adopted to insert a finer angle pattern into the original angle prediction mode of the second linear prediction method. More angles are inserted around the angles corresponding to the angle prediction modes with higher usage frequencies in the second linear prediction method, and fewer angles are inserted around the angles corresponding to the angle prediction modes with lower usage frequencies. This can effectively capture any edge direction appearing in a natural video sequence and more fully utilize the correlation between the reconstructed reference pixels and the pixels to be predicted.

[0106] The present invention proposes an angle expansion technology, which inserts more refined angle prediction directions based on the angle prediction directions corresponding to the original M angle prediction modes, thereby improving the performance of intra-frame prediction; and the present invention adopts a non-uniform angle expansion method, inserting more angle directions around the angle directions with higher frequency of use, further improving the prediction performance.

[0107] Optionally, in a possible implementation of this embodiment, the first linear prediction mode includes: M angular prediction modes and at least one non-angular prediction mode; or the second linear prediction mode includes: N angular prediction modes and at least one non-angular prediction mode, where M and N are integers greater than 1, and M is greater than N.

[0108] The second linear prediction mode can be any linear prediction mode that includes a relatively small number of angles (i.e., the number of angular prediction modes), for example, a linear prediction mode that includes no more than a preset number of angular prediction modes (e.g., 33, 40, etc.), such as linear prediction modes of video coding standards such as HEVC, AVS2, AVS3, and H.264. The first linear prediction mode is obtained by expanding the angular prediction modes in the second linear prediction mode using a non-uniform angular expansion method. Therefore, the number of angular prediction modes in the first linear prediction mode is greater than the number of angular prediction modes in the second linear prediction mode, and the non-angular prediction modes in the first and second linear prediction modes are the same.

[0109] In the next-generation AVS standard, AVS3, the coding unit (CU) is the basic unit of video coding. CUs utilize a recursive quadtree-binarytree-extended quadtree partitioning scheme, with a maximum size of 128x128. Prediction, transform, quantization, entropy coding, and post-processing are performed using CUs as the basic unit. During prediction, CUs can be divided into prediction units (PUs) of varying sizes. Intra-frame prediction is performed using PUs as the basic unit.

[0110] Figure 4 FIG. 1 is an exemplary diagram of the first linear prediction method and the second linear prediction method in an embodiment of the present invention. Figure 4As shown, in a specific example, the second linear prediction mode is a linear prediction mode of the AVS standard (such as AVS2, AVS3 standard), which includes 30 angle prediction modes (such as Figure 4 The angle prediction mode corresponding to the angle direction shown by the solid line) is also available, as well as the DC mode, Plane mode and Bilinear mode. The second linear prediction method is non-uniformly extended in angle, and a finer angle mode is inserted on the basis of the original 30 angle prediction modes, expanding to 63 angle prediction modes (such as Figure 4 The angle prediction mode corresponding to the angle direction indicated by the dotted line). In this embodiment, a non-uniform angle expansion method is adopted. Generally, an angle is inserted between every two angles (the angle in the embodiment of the present invention corresponds to the angle prediction mode); more angles are inserted around the angles corresponding to the more frequently used angle prediction modes, such as the vertical angle mode and the horizontal angle mode, where two angles are inserted between every two angles; and fewer angles are inserted around the angles corresponding to the more frequently used angle prediction modes, for example, no angle is inserted between angles 63 and 64, that is, zero angle is inserted.

[0111] Taking the intra-frame prediction mode of the AVS2 and AVS3 standards as an example, there are 33 intra-frame prediction modes in the AVS2 and AVS3 standards, including 30 angle prediction modes, DC mode, Plane mode and Bilinear mode. Among them, when predicting the current prediction unit based on the DC mode, the values ​​of the pixels of the surrounding reference prediction units are averaged and assigned to all pixels of the current prediction unit. When predicting the current prediction unit based on the Plane mode, each pixel of the current prediction unit is linearly interpolated at 45 degrees through the reference pixels of the left and upper adjacent prediction units to obtain the pixel prediction value. When predicting the current prediction unit based on the Bilinear mode, the pixel prediction value is obtained by linearly weighting several pixels on the upper and left boundaries of the current prediction unit. Among the 30 angle prediction modes, the vertical angle prediction mode and the horizontal angle prediction mode are achieved by directly copying the actual pixel value of the upper or left reference prediction unit to each column or row in the prediction unit in the vertical direction or horizontal direction. In the remaining angular prediction modes, the pixel of the current prediction unit is projected onto the pixel row of the reference prediction unit above or the pixel column of the reference prediction unit to the left, according to the angular prediction mode. Based on the position of the projection point, a 1 / 32 precision 4-patch linear filter is performed using the adjacent four pixels in the pixel row or column of the reference prediction unit to obtain the predicted value of the current prediction pixel.

[0112] Reference pixels or pixels of a reference prediction unit refer to adjacent pixels or pixels of adjacent reference prediction units used to provide intra-frame prediction, and are generally pixels in a row adjacent to the top and a column adjacent to the left of the current prediction unit. In some embodiments of the present invention, when predicting the current prediction unit, the reference pixels or pixels of the reference prediction unit are first pre-processed by padding and filtering. After the reference pixels or pixels of the reference prediction unit are padded and filtered, a pixel prediction value is obtained using a linear prediction method according to a prediction mode, and then the pixel prediction value is filtered to obtain a final pixel prediction value.

[0113] Optionally, in the intra-frame prediction method in yet another embodiment of the present invention, after step 105, the following steps may be further included:

[0114] parsing the encoding information of the residual and the encoding information representing the optimal prediction mode respectively to obtain the residual and the representation information of the optimal prediction mode; wherein the representation information of the optimal prediction mode is information for identifying the optimal prediction mode of the current prediction unit (e.g., a mode sequence number of the optimal prediction mode) or information for determining the optimal prediction mode of the current prediction unit (e.g., a most probable mode);

[0115] Determine a reference prediction unit according to the angle corresponding to the optimal prediction mode and the position of the current prediction unit;

[0116] The pixel prediction value of the current prediction unit is obtained according to the optimal prediction mode, the actual pixel value of the reference prediction unit and the above residual, and then the predicted pixel value can be filtered using, for example, a 4-plug interpolation filter.

[0117] Optionally, in yet another embodiment of the intra-frame prediction method of the present invention, the method may further include:

[0118] Get the most probable mode (MPM) of the current prediction unit;

[0119] According to the most probable mode and the optimal prediction mode of the current prediction unit, the representative information of the optimal prediction mode is determined.

[0120] Optionally, in a possible implementation of this embodiment, the most probable mode of the current prediction unit can be determined based on the optimal prediction modes of the prediction unit above and the prediction unit to the left of the current prediction unit. Since the prediction modes between adjacent pixels, prediction units, coding blocks, etc. in an image generally have a high correlation, the most probable mode of the current prediction unit can be predicted based on the optimal modes of the adjacent prediction units. Moreover, among all the adjacent prediction units of the current prediction unit, the optimal prediction modes of the left prediction unit and the upper prediction unit are most likely to be the optimal prediction modes of the current prediction unit. For example, in one possible manner, in the intra-frame prediction mode of the AVS standard, the most probable mode of the current prediction unit can be determined as follows: if the optimal prediction modes of the upper prediction unit and the left prediction unit of the current prediction unit are both available, then the mode with the smaller value among the optimal prediction modes of the upper prediction unit and the left prediction unit can be determined as the most probable mode of the current prediction unit, otherwise the DC prediction mode is selected as the most probable mode of the current prediction unit.

[0121] Figure 5 A flow chart of an intra-frame prediction method provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the intra-frame prediction method of this embodiment includes:

[0122] 201. Obtain the most likely mode of the current prediction unit.

[0123] Optionally, in a possible implementation of this embodiment, the most probable mode of the current prediction unit can be determined based on the optimal prediction modes of the prediction unit above and the prediction unit to the left of the current prediction unit, and the optimal prediction mode with a smaller mode number is selected from the optimal prediction modes of the prediction unit above and the prediction unit to the left as the most probable mode of the current prediction unit.

[0124] 202. Determine the size and type of the current prediction unit.

[0125] If the size type of the current prediction unit is the first type, execute 203. Otherwise, if the size type of the current prediction unit is the second type, execute 204.

[0126] 203. Use each prediction mode in the first linear prediction method respectively, obtain the pixel prediction value of the current prediction unit in each prediction mode in the first linear prediction method based on the actual pixel value of the reference prediction unit, and use, for example, a 4-plug interpolation filter to filter the predicted pixel value.

[0127] Then, execute 205.

[0128] 204. Convert the most probable mode into a prediction mode in the first linear prediction method, and respectively adopt each prediction mode in the second linear prediction method, obtain the pixel prediction value of the current prediction unit in each prediction mode in the second linear prediction method based on the actual pixel value of the reference prediction unit, and use, for example, a 4-plug interpolation filter to filter the predicted pixel value.

[0129] The first linear prediction mode is obtained by expanding the angle prediction mode of the second linear prediction mode, that is, the angle prediction modes in the first linear prediction mode are more than the angle prediction modes in the second linear prediction mode.

[0130] Optionally, in one possible implementation of this embodiment, the prediction modes in various linear prediction modes may be identified by their mode numbers, and a correspondence between the mode numbers of the prediction modes in the second linear prediction mode and the first linear prediction mode (hereinafter referred to as a "mode number mapping table") is pre-established. Since the first linear prediction mode has more prediction modes than the second linear prediction mode, the same prediction mode has different mode numbers in the linear prediction modes. By converting the prediction modes in the second linear prediction mode into prediction modes in the first linear prediction mode, the corresponding prediction modes of the two linear prediction modes can be unified.

[0131] Taking the intra-frame prediction mode of the AVS2 and AVS3 standards as an example, as shown in Table 1 below, the correspondence between the mode numbers of the second linear prediction mode and the angle prediction mode in the first linear prediction mode is shown. By querying Table 1, the mode number of the angle prediction mode in the second linear prediction mode can be converted into the mode number of the angle prediction mode in the first linear prediction mode. Since the DC mode, Plane mode and Bilinear mode in the first linear prediction mode and the second linear prediction mode are the same, their mode numbers are the same, namely 0, 1 and 2, respectively, so they are not shown in Table 1 below.

[0132] Table 1 Mode number mapping table

[0133]

[0134] 205. Determine the optimal prediction mode of the current prediction unit according to the coding costs of the current prediction unit under each prediction mode.

[0135] Optionally, in a possible implementation of this embodiment, the coding cost may include distortion cost and bit rate cost, and the coding cost of each prediction mode may be calculated by a rate-distortion optimization method, and the prediction mode with the smallest coding cost may be selected as the optimal prediction mode.

[0136] 206. Determine representation information of the optimal prediction mode according to the most probable mode and the optimal prediction mode of the current prediction unit.

[0137] Optionally, in a possible implementation of this embodiment, if the most likely mode of the current prediction unit is the same as the optimal prediction mode, identifier 1 can be used as the representation information of the optimal prediction mode. Based on identifier 1, the decoding end can determine the optimal prediction mode of the current prediction unit from the optimal prediction modes of the prediction unit above and the prediction unit to the left of the current prediction unit.

[0138] 207. Obtain a residual between the actual pixel value and the pixel prediction value of the current prediction unit under the optimal prediction mode, and encode the residual and the representation information of the optimal prediction mode.

[0139] Optionally, in a possible implementation of this embodiment, the representation information of the optimal prediction mode may be binarized. Then, according to a pre-set configuration, if the size type of the current prediction unit is the first type, the representation information of the optimal prediction mode may be encoded using a first bit length (e.g., 6 bits). If the size type of the current prediction unit is the second type, the representation information of the optimal prediction mode may be encoded using a second bit length (e.g., 5 bits). The first bit length is greater than the second bit length.

[0140] 208. Parse the encoding information of the residual to obtain the residual; and parse the encoding information of the representation information of the optimal prediction mode to obtain the binary code of the representation information of the optimal prediction mode, and determine the size type of the current prediction unit.

[0141] Optionally, in a possible implementation of this embodiment, according to a pre-set configuration, if the binary code representing the information of the optimal prediction mode is obtained by parsing using the length of the first bit (e.g., 6 bits), the size type of the current prediction unit is the first type. If the binary code representing the information of the optimal prediction mode is obtained by parsing using the length of the second bit (e.g., 5 bits), the size type of the current prediction unit is the second type.

[0142] If the size type of the current prediction unit is the second type, execute 209. If the size type of the current prediction unit is the first type, execute 210.

[0143] 209. Determine an optimal prediction mode based on the representation information of the optimal prediction mode, and convert the optimal prediction mode into a prediction mode in the first linear prediction method.

[0144] Optionally, in a possible implementation of this embodiment, the correspondence between the mode numbers of the prediction modes in the second linear prediction mode and the first linear prediction mode may be queried to convert the optimal prediction mode into the prediction mode in the first linear prediction mode.

[0145] 210. Determine a reference prediction unit according to the angle corresponding to the optimal prediction mode and the position of the current prediction unit.

[0146] 211. Obtain pixel prediction values ​​of the current prediction unit according to the optimal prediction mode, the actual pixel values ​​of the reference prediction unit, and the residual, and filter the predicted pixel values ​​using, for example, a 4-plug interpolation filter.

[0147] The present invention proposes a block size adaptive angle expansion technology. Compared with the existing angle expansion method with a fixed number of prediction modes, an adaptive process is added, which can reasonably allocate the number of angular directions for different block size types, reduce the bit burden of the intra-frame prediction mode, and improve the coding performance of intra-frame prediction.

[0148] In the present invention, for example, the first linear prediction mode is obtained by performing angular prediction mode expansion on the second linear prediction mode, and the linear prediction mode is determined by determining the size type of the current prediction unit. If the size type of the current prediction unit is the first type, each prediction mode in the first linear prediction mode is adopted, and the pixel prediction value of the current prediction unit is obtained based on the actual pixel value of the reference prediction unit; if the size type of the current prediction unit is the second type, the pixel prediction value of the current prediction unit is obtained based on the actual pixel value of the reference prediction unit; the optimal prediction mode of the current prediction unit is determined according to the coding cost of the current prediction unit under each prediction mode, and the residual between the actual pixel value of the current prediction unit and the pixel prediction value and the representation information of the optimal prediction mode are encoded. Since different numbers of angular prediction modes can be used for intra-frame prediction of prediction units of different size types, it is possible to avoid using a small number of angular prediction modes for intra-frame prediction of the first type of prediction unit to reduce the prediction accuracy, and it is also possible to avoid using a large number of angular prediction modes for intra-frame prediction of the second type of prediction unit to increase the bit burden, thereby reducing the coding performance.

[0149] In addition, the technical solution provided by the present invention can reduce the bit burden of the intra-frame prediction mode, improve the efficiency of intra-frame prediction and coding performance, and achieve a balance between the accuracy of intra-frame prediction and the bits required for the intra-frame prediction mode.

[0150] In addition, the embodiments of the present invention can be applied to any video coding standard, such as the codec of H.264, HEVC, VVC, AVS2, AVS3 standards, etc., and can effectively solve the problem that the number of intra-frame prediction angles in existing video coding standards is too small and the number of intra-frame prediction angles cannot be flexibly changed.

[0151] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0152] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0153] Figure 6 FIG. 1 is a schematic diagram of the structure of an intra-frame prediction device provided by an embodiment of the present invention. Figure 6 As shown. The intra-frame prediction device of this embodiment may include an encoding module 21 and a decoding module 22. The encoding module 21 includes: a first determination unit 211, a first prediction unit 212, a second prediction unit 213, a second determination unit 214, a first acquisition unit 215 and an encoding unit 216.

[0154] The first determining unit 211 is configured to determine the size type of the current prediction unit.

[0155] The first prediction unit 212 is configured to, if the size type of the current prediction unit is the first type, respectively adopt each prediction mode in the first linear prediction method to obtain pixel prediction values ​​of the current prediction unit in each prediction mode in the first linear prediction method based on the actual pixel value of the reference prediction unit.

[0156] The second prediction unit 213 is used to, if the size type of the current prediction unit is the second type, respectively adopt each prediction mode in the second linear prediction method to obtain the pixel prediction value of the current prediction unit in each prediction mode in the second linear prediction method based on the actual pixel value of the reference prediction unit; wherein the first linear prediction method is obtained by expanding the second linear prediction method by an angle prediction mode.

[0157] The second determining unit 214 is configured to determine an optimal prediction mode for the current prediction unit according to the encoding costs of the current prediction unit under each prediction mode.

[0158] The first obtaining unit 215 is configured to obtain a residual between an actual pixel value and a pixel prediction value of a current prediction unit in an optimal prediction mode.

[0159] The encoding unit 216 is configured to encode the residual and the representation information of the optimal prediction mode.

[0160] It should be noted that part or all of the intra-frame prediction device provided in this embodiment can be an application located in the local terminal, or can also be a functional unit such as a plug-in or software development kit (SDK) set in the application located in the local terminal, or can also be a search engine located in the network side server, or can also be a distributed system located on the network side. This embodiment does not specifically limit this.

[0161] It is understandable that the application may be a native program (nativeApp) installed on the terminal, or may be a webpage program (webApp) of a browser on the terminal, and this embodiment does not specifically limit this.

[0162] Optionally, in a possible implementation of the intra-frame prediction device embodiment, when the size of the current prediction unit is within a preset size range, the size type of the current prediction unit is the first type; when the size of the current prediction unit is not within the preset size range, the size type of the current prediction unit is the second type.

[0163] Figure 7 FIG. 1 is a structural diagram of an intra-frame prediction device provided by another embodiment of the present invention. Figure 7 As shown, it can also include: an expansion module 23, which is used to adopt a non-uniform angle expansion method, insert more angles around the angle corresponding to the angle prediction mode with a higher frequency of use in the second linear prediction method, insert fewer angles around the angle corresponding to the angle prediction mode with a lower frequency of use in the second linear prediction method, and obtain the first linear prediction method based on the angle prediction mode corresponding to the inserted angle and the prediction mode in the second linear prediction method.

[0164] Optionally, in a possible implementation of the intra-frame prediction device embodiment, the first linear prediction method includes: M angular prediction modes, and at least one non-angular prediction mode; or, the second linear prediction method includes: N angular prediction modes, and at least one non-angular prediction mode; wherein M and N are integers greater than 1, and M is greater than N.

[0165] Optionally, in a possible implementation of the intra-frame prediction device embodiment, the decoding module 22 includes: a parsing unit 221, a third determining unit 222, and a second acquiring unit 223.

[0166] The parsing unit 221 is configured to parse the encoding information of the residual and the encoding information of the representation information of the optimal prediction mode respectively to obtain the representation information of the residual and the optimal prediction mode.

[0167] The third determining unit 222 is configured to determine a reference prediction unit according to the angle corresponding to the optimal prediction mode and the position of the current prediction unit.

[0168] The second obtaining unit 223 is configured to obtain a pixel prediction value of a current prediction unit according to the optimal prediction mode, the actual pixel value of the reference prediction unit, and the residual.

[0169] Optionally, in a possible implementation of the intra-frame prediction device embodiment, the encoding module 21 may further include: a third acquisition unit 217 and a fourth determination unit 218.

[0170] The third obtaining unit 217 is configured to obtain the most probable mode of the current prediction unit.

[0171] The fourth determining unit 218 is configured to determine representation information of the optimal prediction mode according to the most probable mode and the optimal prediction mode of the current prediction unit.

[0172] Optionally, in a possible implementation of the intra-frame prediction device embodiment, the encoding module 21 may further include: a first conversion unit 219, which is used to convert the most likely mode into a prediction mode in the first linear prediction mode if the size type of the current prediction unit is the second type.

[0173] Optionally, in a possible implementation of the intra-frame prediction device embodiment, when the encoding unit 216 encodes the representation information of the optimal prediction mode, it is specifically used to: if the size type of the current prediction unit is the first type, use the first bit length to encode the representation information of the optimal prediction mode; if the size type of the current prediction unit is the second type, use the second bit length to encode the representation information of the optimal prediction mode; wherein, the length of the first bit is greater than the length of the second bit.

[0174] Optionally, in one possible implementation of this intra-frame prediction apparatus embodiment, the parsing unit 221 parses the encoded information representing the optimal prediction mode to obtain the optimal prediction mode representation information, and is specifically configured to: parse the encoded information representing the optimal prediction mode to obtain the optimal prediction mode representation information, and determine the size type of the current prediction unit based on the length of the encoded information representing the optimal prediction mode. Accordingly, the decoding module 22 may further include a second conversion unit 224 configured to convert the optimal prediction mode into a prediction mode in the first linear prediction mode if the size type of the current prediction unit is the second type.

[0175] It should be noted that Figures 3 to 5 The method in the embodiment corresponding to the embodiment can be Figures 6 and 7 The intra-frame prediction device provided by the embodiment shown is implemented. Figures 3 to 5 The relevant contents in the corresponding embodiments will not be repeated here.

[0176] In this embodiment, the first linear prediction mode is obtained by performing angular prediction mode expansion on the second linear prediction mode, and the linear prediction mode is determined by determining the size type of the current prediction unit. If the size type of the current prediction unit is the first type, each prediction mode in the first linear prediction mode is used to obtain the pixel prediction value of the current prediction unit based on the actual pixel value of the reference prediction unit; if the size type of the current prediction unit is the second type, the pixel prediction value of the current prediction unit is obtained based on the actual pixel value of the reference prediction unit; the optimal prediction mode of the current prediction unit is determined based on the coding cost of the current prediction unit under each prediction mode, and the residual between the actual pixel value and the pixel prediction value of the current prediction unit and the representation information of the optimal prediction mode are encoded. Since different numbers of angular prediction modes can be used for intra-frame prediction of prediction units of different size types, it is possible to avoid using a small number of angular prediction modes for intra-frame prediction of the first type of prediction unit to reduce the prediction accuracy, and it is also possible to avoid using a large number of angular prediction modes for intra-frame prediction of the second type of prediction unit to increase the bit burden, thereby reducing the coding performance.

[0177] In addition, the technical solution provided by the present invention can reduce the bit burden of the intra-frame prediction mode, improve the efficiency of intra-frame prediction and coding performance, and achieve a balance between the accuracy of intra-frame prediction and the bits required for the intra-frame prediction mode.

[0178] Figure 8 is a block diagram of an exemplary computer system / server suitable for implementing embodiments of the present invention. Figure 8 The computer system / server 12 shown is merely an example and should not limit the functionality and scope of use of embodiments of the present invention.

[0179] like Figure 8 As shown, computer system / server 12 is implemented as a general-purpose computing device. Components of computer system / server 12 may include, but are not limited to, one or more processors or processing units 16, storage or system memory 28, and a bus 18 that connects various system components (including system memory 28 and processing units 16).

[0180] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0181] Computer system / server 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer system / server 12, including volatile and non-volatile media, removable and non-removable media.

[0182] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer system / server 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be configured to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 8 , and commonly referred to as a “hard drive”). Although Figure 8 Not shown, a magnetic disk drive for reading and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.

[0183] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methodologies of the embodiments described herein.

[0184] Computer system / server 12 can also communicate with one or more external devices 14 (e.g., a keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with computer system / server 12, and / or any device that enables computer system / server 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication can occur via input / output (I / O) interface 44. Furthermore, computer system / server 12 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer system / server 12 via bus 18. It should be understood that, although not shown, other hardware and / or software modules can be used in conjunction with computer system / server 12, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0185] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, such as implementing Figure 6 The image processing method provided by the corresponding embodiment.

[0186] Another embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement Figure 6 The image processing method provided by the corresponding embodiment.

[0187] Specifically, any combination of one or more computer-readable media can be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.

[0188] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0189] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0190] Computer program code for performing the operations of the present invention can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0191] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0192] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or page components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0193] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0194] In addition, the functional units in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional units.

[0195] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform some of the steps of the method described in various embodiments of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, and other media that can store program code.

[0196] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. An intra-frame prediction method, characterized in that: include: Using a non-uniform angle expansion method, more angles are inserted around an angle corresponding to an angle prediction mode that is used more frequently in the second linear prediction method, and fewer angles are inserted around an angle corresponding to an angle prediction mode that is used less frequently in the second linear prediction method, and a first linear prediction method is obtained based on the angle prediction modes corresponding to the inserted angles and the prediction mode in the second linear prediction method. Determine the size and type of the current prediction unit; If the size type of the current prediction unit is the first type, respectively adopt each prediction mode in the first linear prediction method, and obtain the pixel prediction value of the current prediction unit in each prediction mode in the first linear prediction method based on the actual pixel value of the reference prediction unit; If the size type of the current prediction unit is the second type, respectively adopting each prediction mode in the second linear prediction mode, and obtaining pixel prediction values ​​of the current prediction unit in each prediction mode in the second linear prediction mode based on actual pixel values ​​of the reference prediction unit; wherein the first linear prediction mode is obtained by performing angular prediction mode expansion on the second linear prediction mode; determining an optimal prediction mode for the current prediction unit according to encoding costs of the current prediction unit under each prediction mode; A residual between an actual pixel value and a pixel prediction value of the current prediction unit under the optimal prediction mode is obtained, and the residual and representation information of the optimal prediction mode are encoded.

2. The method according to claim 1, characterized in that When the size of the current prediction unit is within a preset size range, the size type of the current prediction unit is the first type; when the size of the current prediction unit is not within the preset size range, the size type of the current prediction unit is the second type.

3. The method according to claim 1, characterized in that The first linear prediction mode includes: M angular prediction modes and at least one non-angular prediction mode; or, The second linear prediction mode includes: N angular prediction modes, and the at least one non-angular prediction mode; wherein M and N are integers greater than 1, and M is greater than N.

4. The method according to any one of claims 1 to 3, characterized in that: After encoding the residual and the representation information of the optimal prediction mode, the method further includes: parsing the encoding information of the residual and the encoding information of the representation information of the optimal prediction mode respectively to obtain the representation information of the residual and the optimal prediction mode; determining a reference prediction unit according to the angle corresponding to the optimal prediction mode and the position of the current prediction unit; A pixel prediction value of the current prediction unit is obtained according to the optimal prediction mode, the actual pixel value of the reference prediction unit, and the residual.

5. The method according to claim 4, characterized in that Also includes: Obtaining the most probable mode of the current prediction unit; Determine representation information of the optimal prediction mode according to the most probable mode of the current prediction unit and the optimal prediction mode.

6. The method according to claim 5, characterized in that Also includes: If the size type of the current prediction unit is the second type, the most probable mode is converted into a prediction mode in the first linear prediction mode.

7. The method according to claim 5, characterized in that Encoding the representation information of the optimal prediction mode includes: If the size type of the current prediction unit is the first type, encoding the representation information of the optimal prediction mode using a first bit length; If the size type of the current prediction unit is the second type, the representation information of the optimal prediction mode is encoded using a second bit length; wherein the first bit length is greater than the second bit length.

8. The method according to claim 7, characterized in that The parsing of the encoded information of the representation information of the optimal prediction mode to obtain the representation information of the optimal prediction mode includes: Parsing the encoded information of the representation information of the optimal prediction mode to obtain the representation information of the optimal prediction mode, and determining the size type of the current prediction unit according to the length of the encoded information of the representation information of the optimal prediction mode; If the size type of the current prediction unit is the second type, the optimal prediction mode is converted to a prediction mode in the first linear prediction mode.

9. An intra-frame prediction device, comprising an encoding module and a decoding module, characterized in that: The encoding module includes: A first determining unit, configured to determine the size type of a current prediction unit; a first prediction unit configured to, if the size type of the current prediction unit is the first type, respectively adopt each prediction mode in the first linear prediction method and obtain pixel prediction values ​​of the current prediction unit in each prediction mode in the first linear prediction method based on actual pixel values ​​of the reference prediction unit; a second prediction unit configured to, if the size type of the current prediction unit is the second type, respectively adopt each prediction mode in a second linear prediction method to obtain a pixel prediction value of the current prediction unit in each prediction mode in the second linear prediction method based on an actual pixel value of a reference prediction unit; wherein the first linear prediction method is obtained by performing an angular prediction mode expansion on the second linear prediction method; a second determining unit, configured to determine an optimal prediction mode for the current prediction unit according to encoding costs of the current prediction unit under each prediction mode; A first acquiring unit, configured to acquire a residual between an actual pixel value and a pixel prediction value of the current prediction unit in the optimal prediction mode; an encoding unit, configured to encode the residual and the representation information of the optimal prediction mode; The method further includes: an expansion module for adopting a non-uniform angle expansion method, inserting more angles around the angle corresponding to the angle prediction mode with a higher frequency of use in the second linear prediction method, inserting fewer angles around the angle corresponding to the angle prediction mode with a lower frequency of use in the second linear prediction method, and obtaining the first linear prediction method based on the angle prediction mode corresponding to the inserted angle and the prediction mode in the second linear prediction method.

10. The device according to claim 9, characterized in that When the size of the current prediction unit is within a preset size range, the size type of the current prediction unit is the first type; when the size of the current prediction unit is not within the preset size range, the size type of the current prediction unit is the second type.

11. The device according to claim 9, characterized in that The first linear prediction mode includes: M angular prediction modes and at least one non-angular prediction mode; or, The second linear prediction mode includes: N angular prediction modes, and the at least one non-angular prediction mode; wherein M and N are integers greater than 1, and M is greater than N.

12. The device according to any one of claims 9 to 11, characterized in that: The decoding module includes: a parsing unit, configured to parse the encoding information of the residual and the encoding information of the representation information of the optimal prediction mode respectively, to obtain the representation information of the residual and the optimal prediction mode; a third determining unit, configured to determine a reference prediction unit according to an angle corresponding to the optimal prediction mode and a position of the current prediction unit; The second acquisition unit is configured to acquire a pixel prediction value of the current prediction unit according to the optimal prediction mode, the actual pixel value of the reference prediction unit, and the residual.

13. The device according to claim 12, characterized in that The encoding module also includes: a third obtaining unit, configured to obtain the most probable mode of the current prediction unit; The fourth determining unit is configured to determine representation information of the optimal prediction mode according to the most probable mode of the current prediction unit and the optimal prediction mode.

14. The device according to claim 13, characterized in that The encoding module also includes: The first conversion unit is configured to convert the most probable mode into a prediction mode in the first linear prediction mode if the size type of the current prediction unit is the second type.

15. The device according to claim 13, characterized in that When the encoding unit encodes the representation information of the optimal prediction mode, it is specifically used to: If the size type of the current prediction unit is the first type, encoding the representation information of the optimal prediction mode using a first bit length; If the size type of the current prediction unit is the second type, the representation information of the optimal prediction mode is encoded using a second bit length; wherein the first bit length is greater than the second bit length.

16. The device according to claim 15, characterized in that The parsing unit parses the encoded information of the representation information of the optimal prediction mode to obtain the representation information of the optimal prediction mode, and is specifically configured to: parse the encoded information of the representation information of the optimal prediction mode to obtain the representation information of the optimal prediction mode, and determine the size type of the current prediction unit according to the length of the encoded information of the representation information of the optimal prediction mode; The decoding module also includes: The second conversion unit is configured to convert the optimal prediction mode into a prediction mode in the first linear prediction mode if the size type of the current prediction unit is the second type.

17. A device, characterized in that The device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Adaptive intra-prediction encoding and decoding method

    CN103262542A