Method and system for optimizing intra-frame prediction mode, electronic equipment and storage medium

By calculating and comparing the gradient characteristics of pixels in the video encoding system, marking and processing gradient abnormal points, and disabling the corresponding angle prediction mode, the image distortion problem caused by quantization parameters in the video encoding system is solved, and the image quality is significantly improved.

CN120111253APending Publication Date: 2025-06-06VERISILICON MICROELECTRONICS (CHENGDU) CO LTD +5
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510249656.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

When using larger parameters, existing video encoding systems lead to abnormal gradient changes in the smooth areas between adjacent reconstruction blocks, resulting in image distortion. Especially when applying the angle prediction mode, non-natural gradients are easily introduced into the entire predicted image, affecting the quality of the predicted image.

Method used

By calculating the first gradient feature and the second gradient feature of the current judgment point, it includes the drop value, linear smoothness and horizontal smoothness of the original pixel and the reconstruction pixel respectively, and compared with the preset gradient anomaly discrimination conditions, mark the gradient anomaly point, disable the corresponding angle prediction mode, and determine the optimal angle prediction mode according to the principle of image distortion and the minimum bit cost.

Benefits of technology

The smooth transition characteristics of local areas between adjacent reconstruction blocks in the predicted image are effectively retained, which significantly improves the quality of the predicted image, and reduces the computational complexity, avoids additional cost increase.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120111253A_ABST
    Figure CN120111253A_ABST
Patent Text Reader

Abstract

The invention provides an intra-frame prediction mode optimization method and system, electronic equipment and a storage medium, and the method comprises the steps: calculating a first gradient feature of a current judgment point based on original pixels of an adjacent pixel point sequence; calculating a second gradient feature of the current judgment point based on the reconstructed pixels of the adjacent pixel point sequence; marking the current judgment points corresponding to the first gradient features and the second gradient features meeting a preset gradient anomaly judgment condition as gradient anomaly points; forbidding an angle prediction mode corresponding to the gradient abnormal point; an optimal angle prediction mode is determined among the angle prediction modes that are not disabled. By optimizing a selection mechanism of the intra-frame prediction mode, the smooth transition characteristic between the adjacent reconstruction blocks in the predicted image can be more effectively reserved even under the condition that a relatively large quantization parameter is adopted, so that the quality of the predicted image is remarkably improved. In addition, the method is low in calculation complexity, and does not increase extra cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of video coding, and relates to an optimization method, system, electronic device and storage medium for an intra-frame prediction mode. Background Art

[0002] In video coding technology, intra prediction uses the pixels of adjacent reconstructed blocks as reference information to predict the pixels of the current coding unit. The pixels of the reconstructed block are obtained by superimposing the predicted pixels with the reconstructed residuals obtained through transformation, quantization, inverse quantization and inverse transformation.

[0003] However, when a larger quantization parameter (QP) is used, due to quantization loss, the smooth area between adjacent reconstructed blocks may have abnormal gradient changes, resulting in visual image distortion that does not conform to the original texture characteristics. Especially when applying the angle prediction mode, this unnatural gradient is easily introduced into the entire predicted image, thus affecting the quality of the predicted image.

[0004] Currently, most video coding systems usually evaluate texture distortion in units of complete coding units. This method is not only computationally complex, but also difficult to accurately capture subtle changes in local areas, so it is not very effective in dealing with local distortion problems caused by quantization. Summary of the invention

[0005] The purpose of the present application is to provide an optimization method, system, electronic device and storage medium for an intra-frame prediction mode, which are used to solve the problem of local distortion of predicted images caused by using larger quantization parameters in existing video encoding systems.

[0006] In the first aspect, the present application provides an optimization method for an intra-frame prediction mode. The method includes: calculating the first gradient feature of the current decision point based on the original pixels of the adjacent pixel point sequence; the first gradient feature includes the original pixel drop value, the original pixel straight line smoothness and the original pixel horizontal smoothness; calculating the second gradient feature of the current decision point based on the reconstructed pixels of the adjacent pixel point sequence; the second gradient feature includes the reconstructed pixel drop value, the reconstructed pixel straight line smoothness and the reconstructed pixel horizontal smoothness; comparing the first gradient feature and the second gradient feature with the preset gradient abnormality discrimination condition respectively, and marking the current decision point corresponding to the first gradient feature and the second gradient feature that meet the gradient abnormality discrimination condition as a gradient abnormality point; disabling the angle prediction mode corresponding to the gradient abnormality point; and determining the optimal angle prediction mode in the angle prediction mode that is not disabled according to the principle of image distortion and minimum bit cost.

[0007] In an implementation of the first aspect, calculating the first gradient feature of the current decision point based on original pixels of the adjacent pixel point sequence includes:

[0008] Obtaining brightness component values ​​in the original pixels of the adjacent pixel sequence;

[0009] Based on the brightness component value, calculating the brightness difference between the original pixels to obtain the original pixel drop value;

[0010] Based on the brightness component value, calculating the brightness change deviation between the original pixels in different coding units, and summing the brightness change deviations to obtain the original pixel straight line smoothness;

[0011] Based on the brightness component value, calculating the brightness change amplitude between the original pixels in different coding units, and summing the brightness change amplitudes to obtain the horizontal smoothness of the original pixels;

[0012] The original pixel drop value, the original pixel straight line smoothness and the original pixel horizontal smoothness are used as the first gradient feature of the current decision point.

[0013] In an implementation manner of the first aspect, calculating the second gradient feature of the current decision point based on the reconstructed pixels of the adjacent pixel point sequence includes:

[0014] Obtaining a brightness component value in the reconstructed pixel of the adjacent pixel point sequence;

[0015] Based on the brightness component value, calculating the brightness difference between the reconstructed pixels to obtain the reconstructed pixel drop value;

[0016] Based on the brightness component value, calculating the brightness change deviation between the reconstructed pixels in different coding units, and summing the brightness change deviations to obtain the straight line smoothness of the reconstructed pixels;

[0017] Based on the brightness component value, calculating the brightness change amplitude between the reconstructed pixels in different coding units, and summing the brightness change amplitudes to obtain the horizontal smoothness of the reconstructed pixels;

[0018] The reconstructed pixel drop value, the reconstructed pixel straight line smoothness and the reconstructed pixel horizontal smoothness are used as the second gradient feature of the current decision point.

[0019] In an implementation of the first aspect, calculating the brightness difference between the original pixels based on the brightness component value to obtain the original pixel drop value includes:

[0020] Obtaining a position of the current decision point in the coding unit;

[0021] If the current decision point is located at the upper right corner or the lower left corner of the coding unit, the original pixel drop value is calculated using the calculation formula Dinput=|ip0-iq0|;

[0022] If the current decision point is located at the upper left corner of the coding unit, the original pixel drop value is calculated using the calculation formula Dinput=MAX(|ip0-in0|,|iq0-in0|);

[0023] Among them, ip0 represents the brightness component value in the original pixel of pixel point Kp0, iq0 represents the brightness component value in the original pixel of pixel point Kq0, in0 represents the brightness component value in the original pixel of pixel point Kn0; the pixel point Kp0, the pixel point Kq0 and the pixel point Kn0 are adjacent to the current determination point respectively, and the pixel point Kp0, the pixel point Kq0 and the pixel point Kn0 belong to different coding units respectively; Dinput represents the original pixel drop value.

[0024] In an implementation of the first aspect, based on the brightness component value, calculating the brightness change deviation between the original pixels in different coding units, and summing the brightness change deviations to obtain the original pixel straight line smoothness includes using the following calculation formula:

[0025] Minput=|(ip0-ip1)-(ip1-ip2)|+|(iq0-iq1)-(iq1-iq2)|;

[0026] Wherein, ip0 represents the brightness component value in the original pixel of pixel point Kp0, ip1 represents the brightness component value in the original pixel of pixel point Kp1, and ip2 represents the brightness component value in the original pixel of pixel point Kp2; the pixel point Kp0, the pixel point Kp1 and the pixel point Kp2 are the proximal adjacent pixel point sequence on the p side of the current decision point; iq0 represents the brightness component value in the original pixel of pixel point Kq0, iq1 represents the brightness component value in the original pixel of pixel point Kq1, and iq2 represents the brightness component value in the original pixel of pixel point Kq2; the pixel point Kq0, the pixel point Kq1 and the pixel point Kq2 are the proximal adjacent pixel point sequence on the q side of the current decision point; Minput represents the straight line smoothness of the original pixel.

[0027] In an implementation of the first aspect, based on the brightness component value, calculating the brightness change amplitude between the original pixels in different coding units, and summing the brightness change amplitudes to obtain the horizontal smoothness of the original pixels includes using the following calculation formula:

[0028] Ninput=|ip0-ip3|+|iq0-iq3|;

[0029] Wherein, ip0 represents the brightness component value in the original pixel of pixel point Kp0, and ip3 represents the brightness component value in the original pixel of pixel point Kp3; the pixel points Kp0 to Kp3 are the p-side proximal adjacent pixel sequence of the current decision point, the pixel point Kp0 is the closest pixel in the p-side proximal adjacent pixel sequence, and the pixel point Kp3 is the farthest pixel in the p-side proximal adjacent pixel sequence; iq0 represents the brightness component value in the original pixel of pixel point Kq0, and iq3 represents the brightness component value in the original pixel of pixel point Kq3; the pixel points Kq0 to Kq3 are the q-side proximal adjacent pixel sequence of the current decision point, the pixel point Kq0 is the closest pixel in the q-side proximal adjacent pixel sequence, and the pixel point Kq3 is the farthest pixel in the q-side proximal adjacent pixel sequence; Ninput represents the horizontal smoothness of the original pixel.

[0030] Calculating the brightness difference between the reconstructed pixels based on the brightness component value to obtain the reconstructed pixel dropout value includes:

[0031] Obtaining a position of the current decision point in the coding unit;

[0032] If the current decision point is located at the upper right corner or the lower left corner of the coding unit, the reconstructed pixel drop value is calculated using the calculation formula Drecon=|rp0-rq0|;

[0033] If the current decision point is located at the upper left corner of the coding unit, the calculation formula Drecon=MAX(|rp0-rn0|,|rq0-rn0|) is used to calculate the reconstructed pixel drop value;

[0034] Among them, rp0 represents the brightness component value in the reconstructed pixel of pixel point Kp0, rq0 represents the brightness component value in the reconstructed pixel of pixel point Kq0, and rn0 represents the brightness component value in the reconstructed pixel of pixel point Kn0; the pixel point Kp0, the pixel point Kq0 and the pixel point Kn0 are adjacent to the current decision point respectively, and the pixel point Kp0, the pixel point Kq0 and the pixel point Kn0 belong to different coding units respectively; Drecon represents the reconstructed pixel drop value.

[0035] Based on the brightness component value, calculating the brightness change deviation between the reconstructed pixels in different coding units, and summing the brightness change deviations to obtain the straight line smoothness of the reconstructed pixel includes using the following calculation formula:

[0036] Mrecon = |(rp0 - rp1) - (rp1 - rp2)| + |(rq0 - rq1) - (rq1 - rq2)|;

[0037] Where rp0 represents the luminance component value in the reconstructed pixel of pixel point Kp0, rp1 represents the luminance component value in the reconstructed pixel of pixel point Kp1, and rp2 represents the luminance component value in the reconstructed pixel of pixel point Kp2; the pixel points Kp0, Kp1, and Kp2 are the p-side proximal adjacent pixel point sequence of the current determination point; rq0 represents the luminance component value in the reconstructed pixel of pixel point Kq0, rq1 represents the luminance component value in the reconstructed pixel of pixel point Kq1, and rq2 represents the luminance component value in the reconstructed pixel of pixel point Kq2; the pixel points Kq0, Kq1, and Kq2 are the q-side proximal adjacent pixel point sequence of the current determination point; Mrecon represents the straightness smoothness of the reconstructed pixel.

[0038] Based on the luminance component values, calculate the amplitude of the luminance change between the reconstructed pixels within different coding units, and sum the amplitudes of the luminance change to obtain the horizontal smoothness of the reconstructed pixel, including using the following calculation formula:

[0039] Nrecon = |rp0 - rp3| + |rq0 - rq3|;

[0040] Where rp0 represents the luminance component value in the reconstructed pixel of pixel point Kp0, and rp3 represents the luminance component value in the reconstructed pixel of pixel point Kp3; the pixel points Kp0 to Kp3 are the p-side proximal adjacent pixel point sequence of the current determination point, the pixel point Kp0 is the nearest pixel point in the p-side proximal adjacent pixel point sequence, and the pixel point Kp3 is the farthest pixel point in the p-side proximal adjacent pixel point sequence; rq0 represents the luminance component value in the reconstructed pixel of pixel point Kq0, and rq3 represents the luminance component value in the reconstructed pixel of pixel point Kq3; the pixel points Kq0 to Kq3 are the q-side proximal adjacent pixel point sequence of the current determination point, the pixel point Kq0 is the nearest pixel point in the q-side proximal adjacent pixel point sequence, and the pixel point Kq3 is the farthest pixel point in the q-side proximal adjacent pixel point sequence; Nrecon represents the horizontal smoothness of the reconstructed pixel.

[0041] In one implementation of the first aspect, comparing the first gradient feature and the second gradient feature with a preset gradient anomaly discrimination condition includes determining whether the first gradient feature and the second gradient feature simultaneously satisfy the conditions:

[0042] Dinput < Thr_D and Drecon >= Thr_D;

[0043] Mrecon < Thr_M and Nrecon < Thr_M;

[0044] Mrecon + Minput < 2 * Thr_M;

[0045] Nrecon + Ninput < 2 * Thr_M;

[0046] Where Dinput represents the original pixel fall value; Drecon represents the reconstructed pixel fall value; Thr_D represents the threshold of the original pixel fall value and the reconstructed pixel fall value; Minput represents the original pixel linear smoothness; Mrecon represents the reconstructed pixel linear smoothness; Ninput represents the original pixel horizontal smoothness; Nrecon represents the reconstructed pixel horizontal smoothness; Thr_M is a preset threshold;

[0047] If so, it is determined that the first gradient feature and the second gradient feature satisfy the gradient anomaly discrimination condition; otherwise, it is determined that the first gradient feature and the second gradient feature do not satisfy the gradient anomaly discrimination condition.

[0048] In an implementation manner of the first aspect, determining the optimal angle prediction mode among the angle prediction modes that are not disabled includes:

[0049] Evaluating the image reconstruction quality of the angle prediction modes that are not disabled;

[0050] Obtaining the bit cost consumed by encoding the angle prediction modes that are not disabled into the bitstream;

[0051] Performing a comprehensive sorting on the image reconstruction quality and the bit cost;

[0052] Selecting the angle prediction mode with the lowest comprehensive score as the optimal angle prediction mode.

[0053] In the second aspect, the present application provides an optimization system for intra-frame prediction mode. The system includes: a first feature calculation module, which is used to calculate the first gradient feature of the current decision point based on the original pixels of the adjacent pixel point sequence; the first gradient feature includes the original pixel drop value, the original pixel straight line smoothness and the original pixel horizontal smoothness; a second feature calculation module, which is used to calculate the second gradient feature of the current decision point based on the reconstructed pixels of the adjacent pixel point sequence; the second gradient feature includes the reconstructed pixel drop value, the reconstructed pixel straight line smoothness and the reconstructed pixel horizontal smoothness; an abnormal decision point marking module, which is used to compare the first gradient feature and the second gradient feature with the preset gradient abnormality discrimination conditions respectively, and mark the current decision point corresponding to the first gradient feature and the second gradient feature that meet the gradient abnormality discrimination conditions as a gradient abnormal point; a prediction mode disabling module, which is used to disable the angle prediction mode corresponding to the gradient abnormal point; an optimal mode selection module, which is used to determine the optimal angle prediction mode among the angle prediction modes that are not disabled.

[0054] In a third aspect, the present application provides an electronic device. The electronic device comprises: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory, so that the electronic device executes any one of the above methods.

[0055] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements any of the methods described above when executed by a processor.

[0056] As described above, the intra-frame prediction mode optimization method, system, electronic device and storage medium described in the present application optimize the intra-frame prediction mode selection mechanism, thereby more effectively retaining the smooth transition characteristics of the local area between adjacent reconstructed blocks in the predicted image even when a larger quantization parameter is used, thereby significantly improving the quality of the predicted image. In addition, the computational complexity of the present application is low and no additional cost is added. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 Shown is a schematic structural diagram of a mobile terminal described in the present application in one embodiment.

[0058] Figure 2 A flowchart of an embodiment of an optimization method for intra prediction mode described in the present application is shown.

[0059] Figure 3 Shown is a schematic diagram of the positional relationship between the current decision point and the adjacent pixel point sequence described in this application in one embodiment.

[0060] Figure 4FIG. 1 is a schematic diagram showing the positional relationship between the decision points and the encoding units described in the present application in an embodiment.

[0061] Figure 5 A flowchart of another embodiment of the intra-prediction mode optimization method described in the present application is shown.

[0062] Figure 6 A flowchart of another embodiment of the intra-prediction mode optimization method described in the present application is shown.

[0063] Figure 7 FIG. 1 is a schematic diagram showing an embodiment of the angle prediction mode described in the present application.

[0064] Figure 8 The diagram shows a predicted image before the optimization method for the intra-prediction mode described in the present application is applied.

[0065] Fig. 9 Schematic diagram showing a predicted image after applying the optimization method of the intra-frame prediction mode described in this application

[0066] Fig.10 FIG. 1 is a structural diagram of an embodiment of an optimization system for intra-frame prediction mode described in the present application.

[0067] Fig.11 Shown is a structural diagram of an electronic device described in this application in one embodiment. DETAILED DESCRIPTION

[0068] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0069] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0070] In addition, in this application, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0071] The following embodiments of the present application provide an optimization method, system, electronic device and storage medium for intra-frame prediction mode. The technical solution of the present application optimizes the selection mechanism of the intra-frame prediction mode, thereby more effectively retaining the smooth transition characteristics of the local area between adjacent reconstructed blocks in the predicted image even when a larger quantization parameter is used, thereby significantly improving the quality of the predicted image. In addition, the computational complexity of the present application is low and no additional cost is added.

[0072] The optimization method of the intra-frame prediction mode provided in the embodiment of the present application can be run in a mobile terminal, a computer terminal, or similar devices. Taking running on the mobile terminal as an example, Figure 1 is a hardware structure block diagram of the mobile terminal. Figure 1 As shown, the mobile terminal may include: a processor and a memory, the processor may be a central processing unit, and the memory is used to store data. Figure 1 The mobile terminal in the figure is only used as an example and does not limit the specific structure of the mobile terminal.

[0073] Optionally, the mobile terminal may further include: a communication transmission device and an input and output device.

[0074] Optionally, the memory may be used to store computer programs, such as software programs and modules of application software, and the memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0075] Optionally, the communication transmission device can be used to receive or send data via a network, which may include a wireless network provided by a communication provider of the mobile terminal. The communication transmission device may include a NIC (Network Interface Controller) that can be connected to other network devices through a base station so as to communicate with the Internet.

[0076] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application.

[0077] See also Figure 2 , which is a flow chart of an embodiment of the optimization method of the intra-frame prediction mode described in the present application. Figure 2 As shown, the embodiment of the present application provides an optimization method for an intra-frame prediction mode including the following steps S100 to S500.

[0078] In step S100, the first gradient feature of the current decision point is calculated based on the original pixels of the adjacent pixel sequence; the first gradient feature includes the original pixel drop value, the original pixel straight line smoothness and the original pixel horizontal smoothness.

[0079] Specifically, the original pixel refers to a pixel in an original video frame that has not been predicted or reconstructed.

[0080] In an embodiment of the present application, the adjacent pixel point sequences belong to at least two different coding units.

[0081] See also Figure 3 , which is a schematic diagram showing the positional relationship between the current decision point and the adjacent pixel point sequence described in the present application in one embodiment. According to the different positions of the current decision point K in the coding unit, the adjacent pixel point sequence of the current decision point K may include p-side pixel points, q-side pixel points and n-side pixel points, wherein the p-side pixel points include Kp0, Kp1, Kp2 and Kp3, etc., the q-side pixel points include Kq0, Kq1, Kq2 and Kq3, etc., and the n-side pixel points include Kn0. The p-side pixel points, the q-side pixel points and the n-side pixel points belong to different coding units respectively.

[0082] like Figure 3 As shown, the adjacent pixel point sequence of the decision point A includes a p-side pixel point sequence and a q-side pixel point sequence, wherein the p-side pixel point sequence includes Ap0, Ap1, Ap2, and Ap3, etc., and the q-side pixel point sequence includes Aq0, Aq1, Aq2, and Aq3, etc. The p-side pixel point sequence and the q-side pixel point sequence belong to two different coding units respectively.

[0083] Similarly, the adjacent pixel point sequence of the decision point B also includes a p-side pixel point sequence and a q-side pixel point sequence, wherein the p-side pixel point sequence includes Bp0, Bp1, Bp2, and Bp3, etc., and the q-side pixel point sequence includes Bq0, Bq1, Bq2, and Bq3, etc. The p-side pixel point sequence and the q-side pixel point sequence belong to two different coding units, respectively.

[0084] The adjacent pixel sequence of the decision point C includes a p-side pixel sequence, a q-side pixel sequence and an n-side pixel, wherein the p-side pixel sequence includes Cp0, Cp1, Cp2 and Cp3, etc., the q-side pixel sequence includes Cq0, Cq1, Cq2 and Cq3, etc., and the n-side pixel includes Cn0. The p-side pixel sequence, the q-side pixel sequence and the n-side pixel belong to three different coding units respectively.

[0085] See also Figure 4 , which is a schematic diagram showing the positional relationship between the decision point and the encoding unit described in this application in one embodiment. Figure 4 As shown, the decision point B is located at the upper right corner of the current coding unit, the upper part of the current coding unit is the first coding unit, and the upper right part is the second coding unit. The neighboring pixel points Bp0, Bp1, Bp2, and Bp3 of the decision point B are located in the first coding unit; the neighboring pixel points Bq0, Bq1, Bq2, and Bq3 of the decision point B are located in the second coding unit.

[0086] In one embodiment of the present application, based on the original pixels of the adjacent pixel sequence, calculating the first gradient feature of the current decision point includes: Figure 5 Steps S101 to S105 are shown.

[0087] In step S101, the brightness component values ​​of the original pixels in the adjacent pixel sequence are obtained.

[0088] In the YUV or YCbCr color space, the brightness component reflects the brightness of the image, while the chrominance components (Cb and Cr) represent the hue and saturation of the color. Since the human eye is more sensitive to changes in brightness, the brightness component plays a key role in image analysis and processing. The present application can quickly and accurately identify the edge and texture changes of adjacent reconstructed blocks in the predicted image by obtaining the brightness component values ​​in the original pixels of the adjacent pixel sequence.

[0089] In step S102, based on the brightness component value, the brightness difference between the original pixels is calculated to obtain the original pixel drop value.

[0090] In one embodiment of the present application, based on the brightness component value, the brightness difference between the original pixels is calculated to obtain the original pixel drop value, including: obtaining the position of the current decision point in the coding unit; if the current decision point is located at the upper right corner or the lower left corner of the coding unit, the calculation formula Dinput = |ip0-iq0| is used to calculate the original pixel drop value; if the current decision point is located at the upper left corner of the coding unit, the calculation formula Dinput = MAX(|ip0-in0|,|iq0- in0|) to calculate the original pixel drop value; wherein ip0 represents the brightness component value in the original pixel of pixel point Kp0, iq0 represents the brightness component value in the original pixel of pixel point Kq0, in0 represents the brightness component value in the original pixel of pixel point Kn0; the pixel point Kp0, the pixel point Kq0 and the pixel point Kn0 are adjacent to the current decision point respectively, and the pixel point Kp0, the pixel point Kq0 and the pixel point Kn0 belong to different coding units respectively; Dinput represents the original pixel drop value.

[0091] For example, the current decision point is pixel A located at the lower left corner of the coding unit, and the pixel points adjacent to pixel A include pixel Ap0 and pixel Aq0, wherein the brightness component value in the original pixel of pixel Ap0 is ap0, and the brightness component value in the original pixel of pixel Aq0 is aq0. Then, the calculation formula Dinput = |ap0-aq0| can be used to calculate the original pixel drop value.

[0092] For another example, the current decision point is pixel point B located at the upper right corner of the coding unit, and the pixel points adjacent to pixel point B include pixel point Bp0 and pixel point Bq0, wherein the brightness component value in the original pixel of pixel point Bp0 is bp0, and the brightness component value in the original pixel of pixel point Bq0 is bq0. Then, the calculation formula Dinput = |bp0-bq0| can also be used to calculate the original pixel drop value.

[0093] For another example, the current decision point is the pixel C located at the upper left corner of the coding unit, and the pixel points adjacent to the pixel C include the pixel Cp0, the pixel Cn0, and the pixel Cq0, wherein the brightness component value in the original pixel of the pixel Cp0 is cp0, the brightness component value in the original pixel of the pixel Cn0 is cn0, and the brightness component value in the original pixel of the pixel Cq0 is cq0. Then, the calculation formula Dinput=MAX(|cp0-cn0|,|cq0-cn0|) can be used to calculate the original pixel drop value, that is, the maximum absolute value is used as the original pixel drop value.

[0094] In step S103, based on the brightness component value, the brightness change deviation between the original pixels in different coding units is calculated, and the brightness change deviation is summed to obtain the original pixel straight line smoothness.

[0095] In one embodiment of the present application, based on the brightness component value, the brightness change deviation between the original pixels in different coding units is calculated, and the brightness change deviation is summed to obtain the original pixel straight line smoothness, which includes using the following calculation formula:

[0096] Minput=|(ip0-ip1)-(ip1-ip2)|+|(iq0-iq1)-(iq1-iq2)|;

[0097] Wherein, ip0 represents the brightness component value in the original pixel of pixel point Kp0, ip1 represents the brightness component value in the original pixel of pixel point Kp1, and ip2 represents the brightness component value in the original pixel of pixel point Kp2; the pixel point Kp0, the pixel point Kp1 and the pixel point Kp2 are the proximal adjacent pixel point sequence on the p side of the current decision point; iq0 represents the brightness component value in the original pixel of pixel point Kq0, iq1 represents the brightness component value in the original pixel of pixel point Kq1, and iq2 represents the brightness component value in the original pixel of pixel point Kq2; the pixel point Kq0, the pixel point Kq1 and the pixel point Kq2 are the proximal adjacent pixel point sequence on the q side of the current decision point; Minput represents the straight line smoothness of the original pixel.

[0098] Theoretically, when the value of Minput is equal to or close to zero, it indicates that the brightness change between the original pixels in two different coding units presents uniformity and linear characteristics.

[0099] In step S104, based on the brightness component value, the brightness change amplitudes between the original pixels in different coding units are calculated, and the brightness change amplitudes are summed to obtain the horizontal smoothness of the original pixels.

[0100] In one embodiment of the present application, the brightness change amplitudes between the original pixels in different coding units are calculated, and the brightness change amplitudes are summed to obtain the horizontal smoothness of the original pixels, including using the following calculation formula:

[0101] Ninput=|ip0-ip3|+|iq0-iq3|;

[0102] Wherein, ip0 represents the brightness component value in the original pixel of pixel point Kp0, and ip3 represents the brightness component value in the original pixel of pixel point Kp3; the pixel points Kp0 to Kp3 are the p-side proximal adjacent pixel sequence of the current decision point, the pixel point Kp0 is the closest pixel in the p-side proximal adjacent pixel sequence, and the pixel point Kp3 is the farthest pixel in the p-side proximal adjacent pixel sequence; iq0 represents the brightness component value in the original pixel of pixel point Kq0, and iq3 represents the brightness component value in the original pixel of pixel point Kq3; the pixel points Kq0 to Kq3 are the q-side proximal adjacent pixel sequence of the current decision point, the pixel point Kq0 is the closest pixel in the q-side proximal adjacent pixel sequence, and the pixel point Kq3 is the farthest pixel in the q-side proximal adjacent pixel sequence; Ninput represents the horizontal smoothness of the original pixel.

[0103] Theoretically, when the value of Ninput is large, it means that there is a large difference in pixel values ​​between Kq0 and Kq3, and a large difference in pixel values ​​between Kp0 and Kp3, then the line from Kp0 to Kq3 will appear tilted visually. This also means that the pixel values ​​of the pixels on the p side and the q side are not closely adjacent and lack a certain degree of horizontality.

[0104] On the contrary, when the value of Ninput is equal to or close to zero, it indicates that the pixel values ​​between Kq0 and Kq3 are relatively close, and the pixel values ​​between Kp0 and Kp3 are relatively close, then the line from Kp0 to Kq3 will appear horizontal visually, which also means that the transition between the original pixels in different coding units will be more natural.

[0105] In step S105, the original pixel drop value, the original pixel straight line smoothness and the original pixel horizontal smoothness are used as the first gradient feature of the current decision point.

[0106] It should be noted that the above steps S102 to S104 can be executed in parallel, that is, they do not need to be executed in the above specific order. This parallel processing method can effectively improve work efficiency and thus shorten the overall execution time.

[0107] In step S200, the second gradient feature of the current decision point is calculated based on the reconstructed pixels of the adjacent pixel sequence; the second gradient feature includes the reconstructed pixel drop value, the reconstructed pixel straight line smoothness and the reconstructed pixel horizontal smoothness.

[0108] Specifically, the reconstructed pixels refer to pixels in a predicted video frame obtained after the steps of prediction, transformation, quantization, inverse quantization and inverse transformation, etc. The reconstructed pixels may contain distortion introduced by factors such as quantization errors.

[0109] In one embodiment of the present application, based on the reconstructed pixels of the adjacent pixel sequence, calculating the second gradient feature of the current decision point includes: Figure 6 Steps S201 to S205 are shown.

[0110] In step S201, the brightness component value of the reconstructed pixel in the adjacent pixel sequence is obtained.

[0111] In step S202, based on the brightness component value, the brightness difference between the reconstructed pixels is calculated to obtain the reconstructed pixel drop value.

[0112] In one embodiment of the present application, based on the brightness component value, the brightness difference between the reconstructed pixels is calculated to obtain the reconstructed pixel drop value, which includes: obtaining the position of the current decision point in the coding unit; if the current decision point is located at the upper right corner or the lower left corner of the coding unit, the calculation formula Drecon=|rp0-rq0| is used to calculate the reconstructed pixel drop value; if the current decision point is located at the upper left corner of the coding unit, the calculation formula Drecon=MAX(|rp0-rn0|,|rq0-rn 0|) to calculate the reconstructed pixel drop value; wherein rp0 represents the brightness component value in the reconstructed pixel of pixel point Kp0, rq0 represents the brightness component value in the reconstructed pixel of pixel point Kq0, and rn0 represents the brightness component value in the reconstructed pixel of pixel point Kn0; the pixel point Kp0, the pixel point Kq0 and the pixel point Kn0 are adjacent to the current decision point respectively, and the pixel point Kp0, the pixel point Kq0 and the pixel point Kn0 belong to different coding units respectively; Drecon represents the reconstructed pixel drop value.

[0113] It should be noted that the embodiment adopted in the present application when calculating the reconstructed pixel drop value is similar to the embodiment used in calculating the original pixel drop value, so the specific embodiment will not be repeated.

[0114] In step S203, based on the brightness component value, the brightness change deviation between the reconstructed pixels in different coding units is calculated, and the brightness change deviation is summed to obtain the straight line smoothness of the reconstructed pixel.

[0115] In one embodiment of the present application, based on the brightness component value, the brightness change deviation between the reconstructed pixels in different coding units is calculated, and the brightness change deviation is summed to obtain the reconstructed pixel straight line smoothness, which includes using the following calculation formula:

[0116] Mrecon=|(rp0-rp1)-(rp1-rp2)|+|(rq0-rq1)-(rq1-rq2)|;

[0117] Among them, rp0 represents the brightness component value in the reconstructed pixel of pixel point Kp0, rp1 represents the brightness component value in the reconstructed pixel of pixel point Kp1, and rp2 represents the brightness component value in the reconstructed pixel of pixel point Kp2; the pixel point Kp0, the pixel point Kp1 and the pixel point Kp2 are the proximal adjacent pixel point sequence on the p side of the current decision point; rq0 represents the brightness component value in the reconstructed pixel of pixel point Kq0, rq1 represents the brightness component value in the reconstructed pixel of pixel point Kq1, and rq2 represents the brightness component value in the reconstructed pixel of pixel point Kq2; the pixel point Kq0, the pixel point Kq1 and the pixel point Kq2 are the proximal adjacent pixel point sequence on the q side of the current decision point; Mrecon represents the straight line smoothness of the reconstructed pixel.

[0118] Theoretically, when the value of Mrecon is equal to or close to zero, it indicates that the brightness change between the reconstructed pixels in two different coding units presents uniformity and linear characteristics.

[0119] In step S204, based on the brightness component value, the brightness change amplitudes between the reconstructed pixels in different coding units are calculated, and the brightness change amplitudes are summed to obtain the horizontal smoothness of the reconstructed pixels.

[0120] In one embodiment of the present application, based on the brightness component value, the brightness change amplitude between the reconstructed pixels in different coding units is calculated, and the brightness change amplitudes are summed to obtain the horizontal smoothness of the reconstructed pixels, including using the following calculation formula:

[0121] Nrecon=|rp0-rp3|+|rq0-rq3|;

[0122] Wherein, rp0 represents the brightness component value in the reconstructed pixel of pixel point Kp0, and rp3 represents the brightness component value in the reconstructed pixel of pixel point Kp3; the pixel points Kp0 to Kp3 are the p-side proximal adjacent pixel sequence of the current decision point, the pixel point Kp0 is the nearest pixel in the p-side proximal adjacent pixel sequence, and the pixel point Kp3 is the farthest pixel in the p-side proximal adjacent pixel sequence; rq0 represents the brightness component value in the reconstructed pixel of pixel point Kq0, and rq3 represents the brightness component value in the reconstructed pixel of pixel point Kq3; the pixel points Kq0 to Kq3 are the q-side proximal adjacent pixel sequence of the current decision point, the pixel point Kq0 is the nearest pixel in the q-side proximal adjacent pixel sequence, and the pixel point Kq3 is the farthest pixel in the q-side proximal adjacent pixel sequence; Nrecon represents the horizontal smoothness of the reconstructed pixels.

[0123] Theoretically, when the value of Nrecon is equal to or close to zero, it indicates that the values between the reconstructed pixels in different coding units are relatively close, and the transition will be relatively natural.

[0124] In step S205, the reconstructed pixel fall value, the reconstructed pixel linear smoothness, and the reconstructed pixel horizontal smoothness are used as the second gradient features of the current determination point.

[0125] It should be noted that the above steps S202 to S204 can be executed in parallel, that is, they do not need to be carried out in the above specific order. This parallel processing method can effectively improve work efficiency and thus shorten the overall execution time.

[0126] In step S300, the first gradient feature and the second gradient feature are respectively compared with a preset gradient anomaly discrimination condition, and the current determination points corresponding to the first gradient feature and the second gradient feature that meet the gradient anomaly discrimination condition are marked as gradient anomaly points.

[0127] In an embodiment of the present application, comparing the first gradient feature and the second gradient feature with the preset gradient anomaly discrimination condition respectively includes determining whether the first gradient feature and the second gradient feature simultaneously meet the conditions:

[0128] Dinput < Thr_D and Drecon >= Thr_D;

[0129] Mrecon < Thr_M and Nrecon < Thr_M;

[0130] Mrecon + Minput < 2 * Thr_M;

[0131] Nrecon + Ninput < 2 * Thr_M;

[0132] Where Dinput represents the original pixel fall value; Drecon represents the reconstructed pixel fall value; Thr_D represents the threshold of the original pixel fall value and the reconstructed pixel fall value; Minput represents the original pixel linear smoothness; Mrecon represents the reconstructed pixel linear smoothness; Ninput represents the original pixel horizontal smoothness; Nrecon represents the reconstructed pixel horizontal smoothness; Thr_M is a preset threshold.

[0133] If so, it is determined that the first gradient feature and the second gradient feature meet the gradient anomaly discrimination condition; otherwise, it is determined that the first gradient feature and the second gradient feature do not meet the gradient anomaly discrimination condition.

[0134] In the embodiment of the present application, the setting of the threshold value generally reflects the strictness of the optimization control: a lower threshold value indicates a stricter optimization control, while a higher threshold value indicates a looser optimization control. The threshold value selection in the embodiment of the present application can be determined according to user needs and the desired optimization degree. Generally, an intermediate value can be selected as the threshold value to balance the control effect and system flexibility.

[0135] In step S400, the angle prediction mode corresponding to the gradient abnormal point is disabled.

[0136] Taking High Efficiency Video Coding (HEVC) encoding as an example, the intra prediction mode set includes 35 different angle prediction modes, whose numbers range from 0 to 34. Figure 7 , which is a schematic diagram of an embodiment of the angle prediction mode described in the present application.

[0137] When decision point A is marked as a pixel with abnormal gradient, the angular prediction mode with numbers ranging from 0 to (10-offset) will be disabled. When decision point C is marked as a pixel with abnormal gradient, the angular prediction mode with numbers ranging from (10+offset) to (26-offset) will be disabled. When decision point B is marked as a pixel with abnormal gradient, the angular prediction mode with numbers ranging from (26+offset) to 34 will be disabled.

[0138] It should be noted that the offset parameter is used to define the angle difference between the boundary value of the restricted angle range and the nearest horizontal or vertical direction, usually offset∈(0,5). By adjusting the offset parameter, the degree of influence on the optimization of subjective visual quality can be flexibly controlled.

[0139] In step S500, an optimal angular prediction mode is determined among the angular prediction modes that are not disabled.

[0140] In one embodiment of the present application, the step of determining the optimal angle prediction mode among the angle prediction modes that are not disabled includes: evaluating the image reconstruction quality of the angle prediction modes that are not disabled; obtaining the bit cost consumed by the angle prediction modes that are not disabled being encoded into the bit stream; comprehensively sorting the image reconstruction quality and the bit cost; and selecting the angle prediction mode with the lowest comprehensive score as the optimal angle prediction mode.

[0141] Specifically, for each non-disabled angle prediction mode, a corresponding predicted image is generated according to the angle prediction mode. Then, the difference between the pixel value in the predicted image and the real pixel value is calculated. In order to quantify the image reconstruction quality, the sum of squares of the difference (SSE) can be calculated or the difference can be transformed to obtain the transformed absolute transformation difference (SATD). SSE provides a measure of cumulative error by calculating the sum of squares of all pixel differences, while SATD calculates the cumulative error in the frequency domain through transformation (such as Hadamard transformation), which can reflect the size of the generated code stream to a certain extent. When rate-distortion optimization is not used, it can be used as a basis for mode selection.

[0142] When the angle prediction mode is encoded into the bitstream, a certain number of bits are consumed, which is the so-called bit cost. This cost depends on the coding strategy and the complexity of the mode. Generally, more complex modes consume more bits.

[0143] In order to find a balance between image distortion and bit cost, weights can be introduced in the comprehensive sorting to adjust the influence of bit cost in the final decision. For example, if coding efficiency is a priority, a higher weight can be assigned to bit cost; conversely, if image quality is more important, the weight of bit cost can be reduced.

[0144] In this implementation, according to the principle of minimum image distortion and bit cost, a comprehensive score can be calculated for each non-disabled angle prediction mode through a comprehensive sorting method, and the score reflects the weighted sum of image distortion and bit cost. Finally, the mode with the lowest comprehensive score is selected as the optimal angle prediction mode and used for intra-frame prediction. This method ensures that while maintaining image quality, coding efficiency is also optimized and optimal resource allocation is achieved.

[0145] See also Figure 8 and Fig. 9 , Figure 8 It is a schematic diagram showing a predicted image before applying the optimization method of the intra-frame prediction mode described in the present application, Fig. 9 The diagram shows a predicted image after applying the optimization method of the intra-frame prediction mode described in the present application.

[0146] like Figure 8 As shown in the figure, some obvious image distortion phenomena can be observed in the image. For example, unnatural transitions appear at the boundaries between blocks, resulting in a visual effect similar to creases. This phenomenon not only affects the visual quality of the image, but may also mislead subsequent image processing and analysis.

[0147] and Figure 8 compared to, Fig. 9The image in shows more delicate and continuous gradient changes, and the transition between blocks is more natural and smooth. This shows that the technical solution of the present application can better preserve the detailed information of the image, improve the clarity and realism of the image, and effectively improve the image quality.

[0148] It should be noted that the protection scope of the optimization method of the intra-frame prediction mode described in the embodiment of the present application is not limited to the execution order of the steps listed in this embodiment, and all solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present application are included in the protection scope of the present application.

[0149] See also Fig.10 , which is a structural diagram of an embodiment of an optimization system for intra-frame prediction mode described in this application. Fig.10 As shown, an embodiment of the present application provides an optimization system for intra-frame prediction mode. The system includes a first feature calculation module, a second feature calculation module, an abnormal decision point marking module and an optimal mode selection module.

[0150] Specifically, the first feature calculation module is used to calculate the first gradient feature of the current decision point based on the original pixels of the adjacent pixel point sequence; the first gradient feature includes the original pixel drop value, the original pixel straight line smoothness and the original pixel horizontal smoothness.

[0151] The second feature calculation module is used to calculate the second gradient feature of the current decision point based on the reconstructed pixels of the adjacent pixel point sequence; the second gradient feature includes the reconstructed pixel drop value, the reconstructed pixel straight line smoothness and the reconstructed pixel horizontal smoothness.

[0152] The abnormal determination point marking module is used to compare the first gradient feature and the second gradient feature with preset gradient abnormality discrimination conditions respectively, and mark the current determination point corresponding to the first gradient feature and the second gradient feature that meet the gradient abnormality discrimination conditions as a gradient abnormal point.

[0153] The prediction mode disabling module is used to disable the angle prediction mode corresponding to the gradient abnormal point.

[0154] The optimal mode selection module is used to determine the optimal angle prediction mode among the angle prediction modes that are not disabled.

[0155] It should be noted that the structures and principles of the first feature calculation module, the second feature calculation module, the abnormal decision point marking module, the prediction mode disabling module and the optimal mode selection module correspond one by one to the steps in the above-mentioned intra-frame prediction mode optimization method, so they will not be repeated here.

[0156] The intra-frame prediction mode optimization system described in the embodiment of the present application can implement the intra-frame prediction mode optimization method described in the present application, but the implementation device of the intra-frame prediction mode optimization method described in the present application includes but is not limited to the structure of the intra-frame prediction mode optimization system listed in the present embodiment. All structural deformations and replacements of the prior art made according to the principles of the present application are included in the protection scope of the present application.

[0157] See also Fig.11 , which is a structural diagram of an electronic device described in this application in one embodiment. Fig.11 As shown, an embodiment of the present application provides an electronic device. The electronic device includes: a processor and a memory.

[0158] The memory is used to store computer programs.

[0159] The processor is used to execute the computer program stored in the memory so that the electronic device executes any one of the above methods.

[0160] In one embodiment of the present application, the processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The memory may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a disk or an optical disk.

[0161] In the several embodiments provided in the present application, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or units 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 modules or units, which can be electrical, mechanical or other forms.

[0162] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0163] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0164] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by the processor, the method described in any of the above items is implemented. A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by instructing the processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital videodisc, DVD)), or a semiconductor medium (e.g., a solid-state hard disk (solid state disk, SSD)), etc.

[0165] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0166] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. A method for optimizing an intra-frame prediction mode, characterized in that: include: Based on the original pixels of the adjacent pixel sequence, a first gradient feature of the current decision point is calculated; The first gradient feature includes original pixel drop value, original pixel straight line smoothness and original pixel horizontal smoothness; Based on the reconstructed pixels of the adjacent pixel sequence, calculating the second gradient feature of the current decision point; the second gradient feature includes the reconstructed pixel drop value, the reconstructed pixel straight line smoothness and the reconstructed pixel horizontal smoothness; Comparing the first gradient feature and the second gradient feature with a preset gradient anomaly discrimination condition respectively, and marking a current determination point corresponding to the first gradient feature and the second gradient feature that meet the gradient anomaly discrimination condition as a gradient anomaly point; disabling the angle prediction mode corresponding to the gradient abnormal point; An optimal angular prediction mode is determined among the angular prediction modes that are not disabled.

2. The method according to claim 1, characterized in that Based on the original pixels of the adjacent pixel sequence, calculating the first gradient feature of the current decision point includes: Obtaining brightness component values ​​in the original pixels of the adjacent pixel sequence; Based on the brightness component value, calculating the brightness difference between the original pixels to obtain the original pixel drop value; Based on the brightness component value, calculating the brightness change deviation between the original pixels in different coding units, and summing the brightness change deviations to obtain the straight line smoothness of the original pixel; Based on the brightness component value, calculating the brightness change amplitude between the original pixels in different coding units, and summing the brightness change amplitudes to obtain the horizontal smoothness of the original pixels; The original pixel drop value, the original pixel straight line smoothness and the original pixel horizontal smoothness are used as the first gradient feature of the current decision point.

3. The method according to claim 1, characterized in that Calculating the second gradient feature of the current decision point based on the reconstructed pixels of the adjacent pixel point sequence includes: Obtaining a brightness component value in the reconstructed pixel of the adjacent pixel point sequence; Based on the brightness component value, calculating the brightness difference between the reconstructed pixels to obtain the reconstructed pixel drop value; Based on the brightness component value, calculating the brightness change deviation between the reconstructed pixels in different coding units, and summing the brightness change deviations to obtain the straight line smoothness of the reconstructed pixels; Based on the brightness component value, calculating the brightness change amplitude between the reconstructed pixels in different coding units, and summing the brightness change amplitudes to obtain the horizontal smoothness of the reconstructed pixels; The reconstructed pixel drop value, the reconstructed pixel straight line smoothness and the reconstructed pixel horizontal smoothness are used as the second gradient feature of the current decision point.

4. The method according to claim 2, characterized in that: Calculating the brightness difference between the original pixels based on the brightness component value to obtain the original pixel drop value includes: Obtaining a position of the current decision point in the coding unit; If the current decision point is located at the upper right corner or the lower left corner of the coding unit, the original pixel drop value is calculated using the calculation formula Dinput=|ip0-iq0|; If the current decision point is located at the upper left corner of the coding unit, the original pixel drop value is calculated using the calculation formula Dinput=MAX(|ip0-in0|,|iq0-in0|); Among them, ip0 represents the brightness component value in the original pixel of pixel point Kp0, iq0 represents the brightness component value in the original pixel of pixel point Kq0, in0 represents the brightness component value in the original pixel of pixel point Kn0; the pixel point Kp0, the pixel point Kq0 and the pixel point Kn0 are adjacent to the current determination point respectively, and the pixel point Kp0, the pixel point Kq0 and the pixel point Kn0 belong to different coding units respectively; Dinput represents the original pixel drop value.

5. The method according to claim 2, characterized in that: Based on the brightness component value, calculating the brightness change deviation between the original pixels in different coding units, and summing the brightness change deviations to obtain the original pixel straight line smoothness includes using the following calculation formula: Minput=|(ip0-ip1)-(ip1-ip2)|+|(iq0-iq1)-(iq1-iq2)|; Wherein, ip0 represents the brightness component value in the original pixel of pixel point Kp0, ip1 represents the brightness component value in the original pixel of pixel point Kp1, and ip2 represents the brightness component value in the original pixel of pixel point Kp2; the pixel point Kp0, the pixel point Kp1, and the pixel point Kp2 are the near-side adjacent pixel sequence of the current decision point on the p side; iq0 represents the brightness component value in the original pixel of pixel point Kq0, iq1 represents the brightness component value in the original pixel of pixel point Kq1, and iq2 represents the brightness component value in the original pixel of pixel point Kq2; the pixel point Kq0, the pixel point Kq1, and the pixel point Kq2 are the near-side adjacent pixel sequence of the current decision point on the q side; Minput represents the original pixel straight line smoothness.

6. The method according to claim 2, characterized in that Based on the brightness component value, calculating the brightness change amplitude between the original pixels in different coding units, and summing the brightness change amplitudes to obtain the horizontal smoothness of the original pixels includes using the following calculation formula: Ninput=|ip0-ip3|+|iq0-iq3|; Wherein, ip0 represents the brightness component value in the original pixel of pixel point Kp0, and ip3 represents the brightness component value in the original pixel of pixel point Kp3; the pixel points Kp0 to Kp3 are the p-side proximal adjacent pixel sequence of the current decision point, the pixel point Kp0 is the closest pixel in the p-side proximal adjacent pixel sequence, and the pixel point Kp3 is the farthest pixel in the p-side proximal adjacent pixel sequence; iq0 represents the brightness component value in the original pixel of pixel point Kq0, and iq3 represents the brightness component value in the original pixel of pixel point Kq3; the pixel points Kq0 to Kq3 are the q-side proximal adjacent pixel sequence of the current decision point, the pixel point Kq0 is the closest pixel in the q-side proximal adjacent pixel sequence, and the pixel point Kq3 is the farthest pixel in the q-side proximal adjacent pixel sequence; Ninput represents the horizontal smoothness of the original pixel.

7. The method according to claim 3, characterized in that Calculating the brightness difference between the reconstructed pixels based on the brightness component value to obtain the reconstructed pixel dropout value includes: Obtaining a position of the current decision point in the coding unit; If the current decision point is located at the upper right corner or the lower left corner of the coding unit, the reconstructed pixel drop value is calculated using the calculation formula Drecon=|rp0-rq0|; If the current decision point is located at the upper left corner of the coding unit, the calculation formula Drecon=MAX(|rp0-rn0|,|rq0-rn0|) is used to calculate the reconstructed pixel drop value; Among them, rp0 represents the brightness component value in the reconstructed pixel of pixel point Kp0, rq0 represents the brightness component value in the reconstructed pixel of pixel point Kq0, and rn0 represents the brightness component value in the reconstructed pixel of pixel point Kn0; the pixel point Kp0, the pixel point Kq0 and the pixel point Kn0 are adjacent to the current decision point respectively, and the pixel point Kp0, the pixel point Kq0 and the pixel point Kn0 belong to different coding units respectively; Drecon represents the reconstructed pixel drop value.

8. The method according to claim 3, characterized in that Based on the brightness component value, calculating the brightness change deviation between the reconstructed pixels in different coding units, and summing the brightness change deviations to obtain the straight line smoothness of the reconstructed pixel includes using the following calculation formula: Mrecon=|(rp0-rp1)-(rp1-rp2)|+|(rq0-rq1)-(rq1-rq2)|; Among them, rp0 represents the luminance component value in the reconstructed pixel of pixel point Kp0, rp1 represents the luminance component value in the reconstructed pixel of pixel point Kp1, and rp2 represents the luminance component value in the reconstructed pixel of pixel point Kp2; the pixel points Kp0, Kp1, and Kp2 are the p-side proximal adjacent pixel point sequence of the current decision point; rq0 represents the luminance component value in the reconstructed pixel of pixel point Kq0, rq1 represents the luminance component value in the reconstructed pixel of pixel point Kq1, and rq2 represents the luminance component value in the reconstructed pixel of pixel point Kq2; the pixel points Kq0, Kq1, and Kq2 are the q-side proximal adjacent pixel point sequence of the current decision point; Mrecon represents the straightness smoothness of the reconstructed pixels.

9. The method according to claim 3, characterized in that: Based on the luminance component values, calculate the amplitude of the luminance change between the reconstructed pixels in different coding units, and sum up the amplitudes of the luminance change to obtain the horizontal smoothness of the reconstructed pixels, which includes using the following calculation formula: Nrecon = |rp0 - rp3| + |rq0 - rq3|; Among them, rp0 represents the luminance component value in the reconstructed pixel of pixel point Kp0, and rp3 represents the luminance component value in the reconstructed pixel of pixel point Kp3; the pixel points Kp0 to Kp3 are the p-side proximal adjacent pixel point sequence of the current decision point, the pixel point Kp0 is the nearest pixel point in the p-side proximal adjacent pixel point sequence, and the pixel point Kp3 is the farthest pixel point in the p-side proximal adjacent pixel point sequence; rq0 represents the luminance component value in the reconstructed pixel of pixel point Kq0, and rq3 represents the luminance component value in the reconstructed pixel of pixel point Kq3; the pixel points Kq0 to Kq3 are the q-side proximal adjacent pixel point sequence of the current decision point, the pixel point Kq0 is the nearest pixel point in the q-side proximal adjacent pixel point sequence, and the pixel point Kq3 is the farthest pixel point in the q-side proximal adjacent pixel point sequence; Nrecon represents the horizontal smoothness of the reconstructed pixels.

10. The method according to claim 1, characterized in that Comparing the first gradient feature and the second gradient feature with the preset gradient anomaly discrimination conditions respectively includes determining whether the first gradient feature and the second gradient feature simultaneously satisfy the conditions: Dinput < Thr_D and Drecon >= Thr_D; Mrecon < Thr_M and Nrecon < Thr_M; Mrecon + Minput < 2 * Thr_M; Nrecon + Ninput < 2 * Thr_M; Among them, Dinput represents the original pixel fall value; Drecon represents the reconstructed pixel fall value; Thr_D represents the threshold of the original pixel fall value and the reconstructed pixel fall value; Minput represents the original pixel straight line smoothness; Mrecon represents the reconstructed pixel straight line smoothness; Ninput represents the original pixel horizontal smoothness; Nrecon represents the reconstructed pixel horizontal smoothness; Thr_M is a preset threshold; If so, it is determined that the first gradient feature and the second gradient feature meet the gradient abnormality discrimination condition; otherwise, it is determined that the first gradient feature and the second gradient feature do not meet the gradient abnormality discrimination condition.

11. The method according to claim 1, characterized in that: Determining an optimal angle prediction mode among the angle prediction modes that are not disabled, comprising: evaluating image reconstruction quality of the angular prediction mode that is not disabled; Obtaining the bit cost consumed by encoding the angle prediction mode that is not disabled into a bitstream; Comprehensively ranking the image reconstruction quality and the bit cost; The angle prediction mode with the lowest comprehensive score is selected as the optimal angle prediction mode.

12. An optimization system for intra-frame prediction mode, characterized in that: include: A first feature calculation module, used for calculating a first gradient feature of a current decision point based on original pixels of a sequence of adjacent pixel points; The first gradient feature includes original pixel drop value, original pixel straight line smoothness and original pixel horizontal smoothness; A second feature calculation module, used to calculate the second gradient feature of the current decision point based on the reconstructed pixels of the adjacent pixel point sequence; the second gradient feature includes the reconstructed pixel drop value, the reconstructed pixel straight line smoothness and the reconstructed pixel horizontal smoothness; an abnormal determination point marking module, used to compare the first gradient feature and the second gradient feature with a preset gradient abnormality determination condition, and mark a current determination point corresponding to the first gradient feature and the second gradient feature that meets the gradient abnormality determination condition as a gradient abnormality point; A prediction mode disabling module, used to disable the angle prediction mode corresponding to the gradient abnormal point; The optimal mode selection module is used to determine the optimal angle prediction mode among the angle prediction modes that are not disabled.

13. An electronic device, characterized in that: include: Processor and memory; The memory is used to store computer programs; The processor is configured to execute the computer program stored in the memory so as to enable the electronic device to perform the method according to any one of claims 1 to 11.

14. 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 11 is implemented.