Encoding method and decoding method for intra prediction, communication device and storage medium
HOIP technology addresses the low accuracy of one-dimensional projection predictions by using nonlinear projection functions to encode and decode video frames, enhancing prediction accuracy for nonlinear texture images.
Patent Information
- Application Number
- CN202310807774.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2025-01-03
AI Technical Summary
Current intra-frame prediction methods struggle with low accuracy in predicting nonlinear texture images due to the use of one-dimensional projection predictions, which rely on straight-line paths for reference pixels.
Implementing high-order intra-frame prediction (HOIP) technology that uses nonlinear projection functions, such as quadratic functions, to accurately predict pixel values in nonlinear texture images by encoding and decoding video frames with bitstream information indicating target main and extended angle prediction modes.
Enables accurate high-order intra-frame prediction by encoding and decoding video frames using nonlinear projection functions, improving prediction accuracy for nonlinear texture images.
Smart Images

Figure CN119254973A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video coding technology, and in particular to an intra-frame prediction coding method, decoding method, communication device and storage medium. Background Art
[0002] In the current intra-frame prediction process, when predicting the pixel value of the pixel to be predicted in the prediction unit by one-dimensional projection prediction, since the projection path of the reference pixel is a straight line, the prediction accuracy is high when predicting linear texture images, but the prediction accuracy is low when predicting nonlinear texture images.
[0003] In order to solve the problem of low prediction accuracy of one-dimensional projection prediction for nonlinear texture images, high order intra prediction (HOIP) technology is proposed in related technologies. Reference pixels can be predicted through nonlinear projection functions. The projection path of reference pixels is a nonlinear projection function curve, which can accurately predict the pixel value of nonlinear texture images. Therefore, how to encode and decode video image frames using HOIP technology has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The embodiments of the present application provide an intra-frame prediction encoding method, a decoding method, a communication device and a storage medium, which can perform high-order intra-frame prediction encoding and decoding on video image frames.
[0005] On the one hand, a coding method for intra-frame prediction is provided, comprising:
[0006] Generate bitstream information of a video image frame, wherein the bitstream information of the video image frame includes first indication information corresponding to a target main angle prediction mode and second indication information corresponding to a target extended angle prediction mode, wherein the target main angle prediction mode and the target extended angle prediction mode are angle prediction modes for performing high-order intra-frame prediction on pixels to be predicted in a prediction unit in the video image frame;
[0007] The code stream information of the video image frame is sent to a decoding end.
[0008] On the other hand, a decoding method for intra-frame prediction is provided, comprising:
[0009] Receive code stream information of the video image frame, the code stream information of the video image frame includes first indication information corresponding to a target main angle prediction mode and second indication information corresponding to a target extended angle prediction mode, the target main angle prediction mode and the target extended angle prediction mode being angle prediction modes for performing high-order intra-frame prediction on pixels to be predicted in a prediction unit in the video image frame;
[0010] Determining the target main angle prediction mode based on the first indication information;
[0011] Based on the second indication information, the target extended angle prediction mode is determined.
[0012] In yet another aspect, there is provided an intra-frame prediction encoding apparatus, comprising: a processing unit and a communication unit;
[0013] A processing unit, configured to generate code stream information of a video image frame, wherein the code stream information of the video image frame includes first indication information corresponding to a target main angle prediction mode and second indication information corresponding to a target extended angle prediction mode, wherein the target main angle prediction mode and the target extended angle prediction mode are angle prediction modes for performing high-order intra-frame prediction on pixels to be predicted in a prediction unit in the video image frame;
[0014] The communication unit is used to send the code stream information of the video image frame to the decoding end.
[0015] In yet another aspect, there is provided an intra-frame prediction decoding apparatus, comprising: a processing unit and a communication unit;
[0016] a communication unit, configured to receive code stream information of the video image frame, wherein the code stream information of the video image frame includes first indication information corresponding to a target main angle prediction mode and second indication information corresponding to a target extended angle prediction mode, wherein the target main angle prediction mode and the target extended angle prediction mode are angle prediction modes for performing high-order intra-frame prediction on pixels to be predicted in a prediction unit in the video image frame;
[0017] A processing unit, configured to determine the target main angle prediction mode based on the first indication information;
[0018] The processing unit is further used to determine the target extended angle prediction mode based on the second indication information.
[0019] On the other hand, a communication device is provided, comprising: a memory and a processor; the memory and the processor are coupled; the memory is used to store a computer program; and the processor implements the method described in any one of the above embodiments when executing the computer program.
[0020] On the other hand, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described in any of the above embodiments is implemented.
[0021] On the other hand, a computer program product is provided. The computer program product includes computer program instructions. When the computer program instructions are executed by a processor, the method described in any one of the above embodiments is implemented.
[0022] In the embodiment of the present application, when the encoding end generates the bitstream information of the video image frame, the target main angle prediction mode and the target extended angle prediction mode for high-order intra-frame prediction are encoded, and the bitstream including the encoding information of the target main angle prediction mode and the target extended angle prediction mode is sent to the decoding end. In this way, after receiving the bitstream, the decoding end can decode the encoding information of the target main angle prediction mode and the target extended angle prediction mode, thereby realizing high-order intra-frame prediction of the video image. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solution in the present application, the drawings required for use in some embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only drawings of some embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0024] Figure 1 A schematic diagram of a projection path of a reference pixel in a one-dimensional projection prediction process provided by some embodiments of the present application;
[0025] Figure 2 A schematic diagram of a projection path of a reference pixel in a quadratic function projection prediction process provided in some embodiments of the present application;
[0026] Figure 3 A schematic flow chart of an intra-frame prediction encoding method provided in some embodiments of the present application;
[0027] Figure 4 A schematic flow chart of another intra-frame prediction encoding method provided in some embodiments of the present application;
[0028] Figure 5 A schematic flow chart of another intra-frame prediction encoding method provided in some embodiments of the present application;
[0029] Figure 6 A schematic flow chart of another intra-frame prediction encoding method provided in some embodiments of the present application;
[0030] Figure 7 A schematic flow chart of another intra-frame prediction encoding method provided in some embodiments of the present application;
[0031] Figure 8 A flowchart of a decoding method for intra-frame prediction provided in some embodiments of the present application;
[0032] Fig. 9 A flowchart of another intra-frame prediction decoding method provided in some embodiments of the present application;
[0033] Fig.10 A schematic diagram of the structure of a communication device provided in some embodiments of the present application;
[0034] Fig.11 A schematic diagram of the structure of another communication device provided in some embodiments of the present application;
[0035] Fig.12 A schematic diagram of the structure of another communication device provided for some embodiments of the present application. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0037] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0038] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0039] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "multiple" means two or more.
[0040] Intra-frame prediction refers to the process of predicting the pixel value of the pixel to be predicted in the prediction unit that is spatially adjacent to the reference pixel by the pixel value of the reference pixel in the video image frame. Intra-frame prediction can effectively reduce the spatial redundancy in the video image frame and improve the transmission efficiency and encoding and decoding efficiency of the video image frame.
[0041] It should be noted that the pixels recorded in this application may be pixel points, pixel blocks, or other forms of pixels, and this application does not limit this.
[0042] During intra-frame prediction, a one-dimensional projection prediction method is usually used to predict the pixel value of each pixel in the prediction unit. This process can be implemented by following steps 1 to 3.
[0043] Step 1: The encoder determines the position of the pixel to be predicted in the prediction unit and the angle prediction mode.
[0044] In the versatile video coding (VVC) method, the angle prediction mode of intra-frame prediction includes 67 modes, including planar, direct current (DC) and other 65 angle prediction modes. Each pixel to be predicted in the same prediction unit uses the same angle prediction mode. Each mode corresponds to an angle of an intra-frame prediction mode.
[0045] Step 2: The encoder calculates the position and angle prediction mode of any pixel to be predicted in the prediction unit based on a linear function to determine the position of the reference pixel corresponding to the pixel to be predicted.
[0046] In some embodiments, in the vertical prediction mode, the encoding end may determine the position of the reference pixel based on the following formula 1.
[0047] c1=x0-tanα*y0 Formula 1
[0048] Wherein, c1 is the horizontal coordinate of the reference pixel, x0 is the horizontal coordinate of the pixel to be predicted, y0 is the vertical coordinate of the pixel to be predicted, and α is the value of the angle prediction mode.
[0049] In the vertical prediction mode, the vertical coordinate of the reference pixel is 0. That is, the coordinate of the reference pixel is (c1, 0).
[0050] In the horizontal prediction mode, the encoder can determine the position of the reference pixel based on the following formula 2.
[0051] c2=y0-tanα*x0 Formula 2
[0052] Wherein, c2 is the horizontal coordinate of the reference pixel.
[0053] In the horizontal prediction mode, the vertical coordinate of the reference pixel is 0. That is, the coordinate of the reference pixel is (0, c2).
[0054] Step 3: The encoder determines the predicted pixel value of the pixel to be predicted based on the pixel value of the reference pixel.
[0055] The pixel value of the reference pixel is the pixel value corresponding to the position of the reference pixel calculated in step 2. The pixel value of the reference pixel and the position of the reference pixel mentioned in the subsequent description all satisfy this relationship.
[0056] As an example, the encoder may calculate the predicted pixel value of the pixel to be predicted by using a 4-tap cubic interpolation filter.
[0057] In this case, the encoding end may determine the predicted pixel value of the pixel to be predicted based on the following formula 3.
[0058] p[x0][y0]=f[0]*p[c][0]+f[1]*p[c+1][0]+f[2]*p[c+2][0]+f[3]*p[c+3][0] Formula 3
[0059] Among them, p[x0][y0] is the predicted pixel value of the pixel to be predicted with coordinate position (x0, y0), p[c][0] is the pixel value of the reference pixel with pixel position (c, 0), p[c+1][0] is the pixel value of the pixel with pixel position (c+1, 0), p[c+2][0] is the pixel value of the pixel with pixel position (c+2, 0), and p[c+3] is the pixel value of the pixel with pixel position (c+3, 0). f[0], f[1], f[2], and f[3] are filter coefficients in the interpolation filter, which are pre-set fixed values.
[0060] As an example, Figure 1 As shown in the figure, in the one-dimensional projection prediction process, the projection path of the reference pixel is a linear straight line, and the pixels passed by the straight line are considered to have the same pixel value. Since the one-dimensional projection prediction usually predicts that the pixels on a straight line have the same pixel value, it is more accurate in predicting linear texture images, but less accurate in predicting nonlinear texture images.
[0061] In order to solve the problem that one-dimensional projection prediction cannot accurately predict nonlinear texture images, a HOIP technology is proposed. In this technology, the pixel value of the pixel to be predicted is predicted by a nonlinear projection function (for example, a quadratic function). The projection path of the reference pixel calculated based on the quadratic function is a quadratic function curve, which can accurately predict the pixel value of the nonlinear texture image, thereby solving the problem that the projection path of the reference pixel in the one-dimensional projection function is a straight line and cannot predict the nonlinear texture image.
[0062] The process of predicting the pixel value of the pixel to be predicted based on HOIP technology is as follows:
[0063] Step a: The encoder determines the position of the pixel to be predicted in the prediction unit and determines the angle prediction mode group.
[0064] The angle prediction mode group includes: angle prediction mode α and angle prediction mode β. Both angle prediction mode α and angle prediction mode β are angle prediction modes in the vertical prediction angle prediction mode; or both angle prediction mode α and angle prediction mode β are angle prediction modes in the horizontal prediction angle prediction mode.
[0065] Step b: The encoding end calculates the position of the pixel to be predicted and the angle prediction mode based on the quadratic function to determine the position of the reference pixel corresponding to the pixel to be predicted.
[0066] In the case where both the angular prediction mode α and the angular prediction mode β are angular prediction modes in the vertical prediction angular prediction mode, the position of the reference pixel is calculated based on Formula 4.
[0067]
[0068] Wherein, c3 is the horizontal coordinate of the reference pixel, and h is the height of the coding unit. In the vertical prediction mode, the vertical coordinate of the reference pixel is 0. That is, the coordinate of the reference pixel is (c3, 0).
[0069] In the case where both the angular prediction mode α and the angular prediction mode β are angular prediction modes in the horizontal prediction angular prediction mode, the position of the reference pixel is calculated based on Formula 5.
[0070]
[0071] Wherein, c4 is the vertical coordinate of the reference pixel, and w is the width of the coding unit. In the horizontal prediction mode, the vertical coordinate of the reference pixel is 0. That is, the coordinates of the reference pixel are (0, c4).
[0072] Step c: The encoding end predicts the pixel value of the pixel to be predicted in the prediction unit according to the pixel value of the reference pixel.
[0073] The specific implementation process of step c is similar to that of step 3 above, and will not be repeated here.
[0074] As an example, Figure 2 As shown, the projection curve of the projection path of the reference pixel in the prediction process of HOIP is a nonlinear quadratic function curve. Based on this, the HOIP technology can well predict the pixel values of the pixels to be predicted in the prediction unit in the nonlinear texture image.
[0075] In order to solve the problem of low prediction accuracy of one-dimensional projection prediction for nonlinear texture images, the related technology proposes the high-order intra-frame prediction HOIP technology, which can find the reference pixel position corresponding to the pixel to be predicted through the nonlinear projection function. The projection path of the reference pixel is the nonlinear projection function curve, which can accurately predict the pixel value of the nonlinear texture image. Therefore, how to encode the video image frame using the HOIP technology has become a technical problem that needs to be solved urgently.
[0076] In order to solve the technical problem that it is impossible to encode a video image frame for high-order intra-frame prediction in the related art, an embodiment of the present application provides an intra-frame prediction encoding method, in which the encoding end encodes the target main angle prediction mode and the target extended angle prediction mode for high-order intra-frame prediction when generating the bitstream information of the video image frame, and sends the bitstream including the encoding information of the target main angle prediction mode and the target extended angle prediction mode to the decoding end. In this way, after receiving the bitstream, the decoding end can decode the encoding information of the target main angle prediction mode and the target extended angle prediction mode, thereby accurately performing high-order intra-frame prediction on the video image.
[0077] like Figure 3 As shown, this application provides Figure 3 The intra-frame prediction encoding method shown can be specifically implemented by following steps 301 and 302:
[0078] Step 301: The encoding end generates code stream information of a video image frame.
[0079] Among them, the code stream information of the video image frame includes first indication information corresponding to the target main angle prediction mode and second indication information corresponding to the target extended angle prediction mode. The target main angle prediction mode and the target extended angle prediction mode are angle prediction modes used to perform high-order intra-frame prediction on the pixels to be predicted in the prediction unit in the video image frame.
[0080] In some embodiments, the first indication information is used to indicate the index value of the target main angle prediction mode. The implementation method of encoding the index value of the target main angle prediction mode as the first indication information can refer to the relevant technology and will not be described in detail here.
[0081] In some embodiments, the second indication information is used to indicate an index value of the target extended angle prediction mode.
[0082] As a specific implementation method, the encoding end first determines multiple candidate angle prediction mode groups, each candidate angle prediction mode group includes a candidate main angle prediction mode and a candidate extended angle prediction mode. Then the encoding end determines the candidate angle prediction mode group with the best cost value as the target angle prediction mode group based on the HOIP technology, and the target angle prediction mode group includes the above-mentioned target main angle prediction mode and target extended angle prediction mode. The encoding end encodes the target main angle prediction mode to determine the first indication information, encodes the target extended angle prediction mode to determine the second indication information, and adds the first indication information and the second indication information to the bitstream information of the generated video image frame.
[0083] Step 302: The encoder sends code stream information of the video image frame to the decoder.
[0084] In the embodiment of the present application, when the encoding end generates the bitstream information of the video image frame, the target main angle prediction mode and the target extended angle prediction mode for high-order intra-frame prediction are encoded, and the bitstream including the encoding information of the target main angle prediction mode and the target extended angle prediction mode is sent to the decoding end. In this way, after receiving the bitstream, the decoding end can decode the encoding information of the target main angle prediction mode and the target extended angle prediction mode, thereby accurately performing high-order intra-frame prediction on the video image.
[0085] In some embodiments, the code stream information of the video image frame includes at least one of the following:
[0086] The first identification information is used to indicate whether high-order intra-frame prediction is enabled for a video image frame.
[0087] The second identification information is used to indicate an index value of an extended angle prediction mode of high-order intra prediction.
[0088] The third identification information is used to indicate whether high-order intra-frame prediction is disabled for all video image frames.
[0089] Fourth identification information, the fourth identification information is used to indicate whether the prediction unit enables high-order intra prediction.
[0090] Prediction residual information, where the prediction residual information is used to indicate a prediction residual between a predicted pixel value and an original pixel value of a pixel to be predicted in the prediction unit.
[0091] The prediction residual information may be information obtained after entropy encoding the difference or the prediction residual. The prediction residual may be the difference between the predicted pixel value and the original pixel value of the pixel to be predicted, or may be the value after transformation and quantization of the difference between the predicted pixel value and the original pixel value of the pixel to be predicted.
[0092] As an example, the encoding end may add a corresponding field to the bitstream information of the video image frame to identify at least one of the first identification information, the second identification information, the third identification information, and the fourth identification information, which is described in detail below.
[0093] For the first identification information, the encoder adds a sps_hoip_enabled_flag field in a sequence parameter set (SPS) as the first identification information. That is, the encoder indicates whether the high-order intra prediction is enabled for the video image frame through the sps_hoip_enabled_flag field in the SPS.
[0094] When the value of the sps_hoip_enabled_flag field is 1, it indicates that high-order intra prediction is enabled in the coded layer video sequence (CLVS). When the value of the sps_hoip_enabled_flag field is 0, it indicates that high-order intra prediction is not enabled in the CLVS.
[0095] Exemplarily, part of the content of the SPS with the newly added sps_hoip_enabled_flag field is shown in Table 1 below:
[0096] Table 1. Added sps_hoip_enabled_flag field in SPS
[0097] … … sps_log2_parallel_merge_level_minus2 ue(v) sps_isp_enabled_flag u(1) sps_mrl_enabled_flag u(1) sps_mip_enabled_flag u(1) sps_hoip_enabled_flag u(1) … …
[0098] For the above second identification information, the encoder adds an appendIntraDir field in the intra prediction data structure (Struct IntraPredictionData for prediction unit) of the prediction unit (Prediction Unit, PU) as the above second identification information. That is, the encoder indicates the index value of the extended angle prediction mode of the high-order intra prediction by adding the appendIntraDir (i.e., the second identification information) field in the intra prediction data structure of the PU.
[0099] It should be noted that, when the PU does not enable HOIP, the value of the appendIntraDir (ie, the second identification information) field is 0 or does not exist.
[0100] For the third identification information, the encoder adds a gci_no_hoip_constraint_flag field in the general constraints information syntax. That is, the encoder indicates whether to disable high-order intra prediction for all video image frames in the video by adding a gci_no_hoip_constraint_flag field in the general constraints information syntax.
[0101] When the value of the gci_no_hoip_constraint_flag (i.e., the third identification information) field is 1, it means that high-order intra-frame prediction is disabled for all video image frames in the video, that is, high-order intra-frame prediction is not allowed to be enabled. At this time, the value of the sps_hoip_enabled_flag (i.e., the first identification information field) of all video image frames in the video should be 0.
[0102] When the value of the gci_no_hoip_constraint_flag (i.e., the third identification information) field is 0, high-order intra-frame prediction is not disabled for the image frames in the video, that is, high-order intra-frame prediction is allowed to be enabled. At this time, the value of the sps_hoip_enabled_flag (i.e., the first identification information) of each video image frame in the video can be based on whether the HOIP technology is used in the video image frame.
[0103] All the above identification information is exemplary, and the location of all the newly added identification information is not limited in practical applications. For example, when the first identification information is in a sequence parameter set, it can be expressed as sps_hoip_enabled_flag (i.e., the first identification information). The first identification information can also be included in a video parameter set (VPS), in which case it can be expressed as vps_hoip_enabled_flag.
[0104] Exemplarily, part of the content of the general information constraint syntax message of the newly added gci_no_hoip_constraint_flag (ie, the third identification information) field is shown in the following Table 2:
[0105] Table 2. Added gci_no_hoip_constraint_flag field in general information constraint syntax message
[0106] … … gci_no_isp_constraint_flag u(1) gci_no_mrl_constraint_flag u(1) gci_no_mip_constraint_flag u(1) gci_no_hoip_constraint_flag u(1) … …
[0107] For the fourth identification information, the encoder adds an extendIntraPredFlag field in the intra prediction data structure of the PU. That is, the encoder indicates whether the prediction unit enables high-order intra prediction by adding an extendIntraPredFlag field in the intra prediction data structure of the PU.
[0108] When the value of the extendIntraPredFlag field (ie, the fourth identification information) is 1, it indicates that the prediction unit enables high-order intra prediction.
[0109] When the value of the extendIntraPredFlag field (ie, the fourth identification information) is 0, it indicates that the prediction unit does not enable high-order intra prediction.
[0110] For the fifth flag, the encoding end may refer to the prior art to indicate the residual value of the pixel to be predicted in the prediction unit, which will not be elaborated in this application.
[0111] In the above, the identification information included in the code stream information is described in detail.
[0112] The process of generating bitstream information at the encoding end in the above step 301 is described in detail below in combination with a specific implementation method.
[0113] First, the process of generating the second indication information in the bitstream information by the encoding end is described.
[0114] In the process of generating the second indication information at the encoding end, the encoding end needs to first determine the index value of the target extended angle prediction mode, and then perform encoding based on the index value of the target extended angle prediction mode to generate the second indication information.
[0115] It should be pointed out that in an embodiment of the present application, the high-order intra-frame prediction technology includes a first version and a second version, and the number of candidate angle prediction mode groups determined by the high-order intra-frame prediction of the first version is greater than the number of candidate angle prediction mode groups determined by the high-order intra-frame prediction of the second version.
[0116] As an example, the first version is a high-efficiency (HE) version, and the second version is a low complexity (LC) version.
[0117] In the first version and the second version, the encoder selects the candidate angular prediction mode group in different ways, which results in different ways for the encoder to determine the index value of the target extended angular prediction mode in different versions.
[0118] Generally speaking, in the first version, when the encoder selects the extended angle prediction mode, it selects all angle prediction modes or all angle prediction modes in the same horizontal or vertical mode as the main angle prediction mode.
[0119] In the second version, when selecting the extended angle prediction mode, the encoder selects a plurality of most commonly used extended angle prediction modes corresponding to the candidate main angle prediction mode for the candidate main angle prediction mode. The plurality of most commonly used extended angle prediction modes should satisfy that the angle difference between the extended angle prediction mode and the candidate main angle prediction mode is greater than a set threshold.
[0120] Therefore, for the first version, the index value of the target extended angular prediction mode determined by the encoder satisfies situation 1: the index value of the target extended angular prediction mode is the index value of the target extended angular prediction mode in the set containing all angular prediction modes.
[0121] For the second version, the index value of the target extended angle prediction mode determined by the encoding end satisfies situation 2: the index value of the target extended angle prediction mode is the index value of the target extended angle prediction mode in the set of multiple most commonly used extended angle prediction modes corresponding to the target main angle prediction mode.
[0122] The following describes the process in which the encoder encodes the index value of the target extended angle prediction mode to generate the second indication information in the above-mentioned case 1 and case 2 respectively.
[0123] Case 1: the index value of the target extended angular prediction mode is the index value of the target extended angular prediction mode in the set including all angular prediction modes.
[0124] In case 1, combined with Figure 3 ,like Figure 4 As shown, the process of the encoder encoding the index value of the target extended angle prediction mode to generate the second indication information can be specifically implemented by the following steps 401 to 403:
[0125] Step 401: The encoder determines a number to be encoded according to an index value of a target extended angle prediction mode.
[0126] In some embodiments, the encoder uses the other 65 angle prediction modes except Planar and DC among the 67 angle prediction modes of VVC as candidate extended angle prediction modes. Each angle prediction mode in the 67 angle prediction modes has a fixed index, where the index of Planar is 1, the index of DC is 2, and the indexes of the other 65 angle prediction modes are 2-66 respectively. The index value of the target extended angle prediction mode is recorded as one of 2-66.
[0127] It can be understood that, among the above 65 angle prediction modes, the index of the horizontal angle prediction mode is 2-34, and the index of the vertical angle prediction mode is 35-66.
[0128] The encoding end encodes the index value of the target extended angle prediction mode to indicate the target extended angle prediction mode to the decoding end.
[0129] In some embodiments, in order to reduce the number of encoding bits, the encoding end may subtract a fixed value from the index value of the target extended angle prediction mode to determine the number to be encoded.
[0130] For example, the number to be encoded is equal to the index value of the target extended angular prediction mode minus the first value.
[0131] Alternatively, when the target extended angle prediction mode belongs to a vertical angle prediction mode, the number to be encoded is equal to the index value of the target extended angle prediction mode minus a second value; wherein the second value is greater than the first value, and the difference between the second value and the first value is equal to the total number of horizontal angle prediction modes.
[0132] As an example, the first value is equal to 2, and the second value is equal to 35.
[0133] Specifically, since the index value of the target extended angle prediction mode ranges from 2 to 66, in order to reduce the number of coding bits of the index value of the target extended angle prediction mode, the index value of the target extended angle prediction mode can be subtracted by 2, so that the value range of the coding number is 0-64. 0-64 will use fewer coding bits than 2-66.
[0134] Step 402: The encoding end performs binarization processing on the number to be encoded to obtain a binary value corresponding to the number to be encoded.
[0135] In some embodiments, the encoding end may use any one of truncated rice binarization, K-th order exp-Golomb binarization, or fixed-length binarization to binarize the coded number idx to obtain the binarized coded number idx binary The specific implementation method is not described in detail in the embodiment of this application.
[0136] Step 403: The encoding end encodes the binary value to obtain second indication information.
[0137] In some embodiments, the encoding end may encode the binary data of the index value of the target extended angle prediction mode by bypass encoding or the like, which is not elaborated in this application.
[0138] In case 1, the encoder first processes the index value of the target extended angle prediction mode to obtain a number to be encoded, and the encoder obtains the second indication information by binarizing and encoding the number to be encoded, so that the code stream information sent by the encoder to the decoder can accurately indicate the index value of the target extended angle prediction mode, and then the decoder can perform intra-frame prediction according to the index value of the target extended angle prediction mode to determine the pixel value of the pixel to be predicted in the prediction unit. At the same time, the number to be encoded determined by the encoder can be a number less than the index value of the target extended angle prediction mode, thereby reducing the number of encoding bits.
[0139] The following describes a process in which the encoder encodes the index value of the target extended angle prediction mode to generate the second indication information in situation 2.
[0140] Case 2: the index value of the target extended angle prediction mode is the index value of the target extended angle prediction mode in a set of multiple most frequently used extended angle prediction modes corresponding to the target main angle prediction mode.
[0141] In case 2, combined with Figure 3 ,like Figure 5 As shown, in case 2, the process in which the encoder encodes the index value of the target extended angle prediction mode to generate the second indication information can be specifically implemented by the following steps 501 and 502:
[0142] Step 501: The encoding end binarizes the index value of the target extended angle prediction mode to obtain a binary value corresponding to the number to be encoded.
[0143] Step 502: The encoding end encodes the binary value to obtain second indication information.
[0144] The specific implementation process of step 501 and step 502 can refer to the above-mentioned step 402 and step 403, and this application will not elaborate on this.
[0145] It should be noted that in case 2, when the encoder determines the candidate extended angle prediction mode, it usually selects the 4 most commonly used extended angle prediction modes for each candidate main angle prediction mode. In this way, when the encoder determines the index value of the target extended angle prediction mode, it first determines the target main angle prediction mode corresponding to the index value of the target extended angle prediction mode, and then determines that the index value of the target extended angle prediction mode is an index value in the set of multiple most commonly used extended angle prediction modes corresponding to the target main angle prediction mode. At this time, the index value of the target extended angle prediction mode is 0-3.
[0146] In situation 2, the encoder directly binarizes the index value of the target extended angle prediction mode and encodes it to obtain the second indication information, so that the code stream information sent by the encoder to the decoder can accurately indicate the index value of the target extended angle prediction mode, and then the decoder can perform intra-frame prediction according to the index value of the target extended angle prediction mode to determine the pixel value of the pixel to be predicted in the prediction unit.
[0147] Before the encoder generates the second indication information in the bitstream information, the encoder also needs to determine multiple candidate angle prediction modes, and then select a target angle prediction mode group from the multiple candidate angle prediction mode groups, and then determine a target main angle prediction mode and a target extended angle prediction mode. Detailed description is given below.
[0148] Second, the encoding end determines multiple candidate angle prediction modes.
[0149] Combination Figure 3 ,like Figure 6 As shown, the process of selecting the target main angle prediction mode and the target extended angle prediction mode by the encoder can be specifically implemented by following steps 601 to 603, which are described in detail below:
[0150] Step 601: The encoder determines a plurality of candidate main angle prediction modes corresponding to a prediction unit.
[0151] In the high-order intra prediction technology, different encoding ends based on different versions determine multiple candidate main angle prediction modes corresponding to a prediction unit in different ways.
[0152] Scenario 1: First version
[0153] In the first version, the multiple candidate main angle prediction modes corresponding to the prediction unit include: multiple most probable modes (MPMs) corresponding to the prediction unit and the first P angle prediction modes in the rate-distortion optimization (RDO) list, where P is a positive integer.
[0154] In some embodiments, if there may be repeated angle prediction modes in the multiple most likely modes corresponding to the prediction unit and the first P angle prediction modes in the RDO list, the encoder removes duplicates after obtaining the multiple most likely modes corresponding to the prediction unit and the first P angle prediction modes in the RDO list, and determines multiple candidate main angle prediction modes corresponding to the prediction unit.
[0155] As an example, the number of multiple most likely modes corresponding to the prediction unit is Q, and there are R repeated angle prediction modes among the multiple most likely modes corresponding to the prediction unit and the first P angle prediction modes in the RDO list, then the number of multiple candidate main angle prediction modes corresponding to the prediction unit determined by the encoding end is (Q+PR), where R is an integer less than Q and less than P.
[0156] Scenario 2, second version
[0157] In the second version, the multiple candidate main-angle prediction modes corresponding to the prediction unit include: multiple most likely modes corresponding to the prediction unit.
[0158] As an example, the number of the multiple most likely modes corresponding to the prediction unit is Q. At this time, the multiple candidate main-angle prediction modes corresponding to the prediction unit are the Q most likely modes.
[0159] In the above process, as an example, the value of Q is 22, and the value of P is a value that can be flexibly set.
[0160] Step 602: The encoder determines a plurality of candidate extended angular prediction modes corresponding to the candidate main angular prediction mode.
[0161] It should be noted that, in conjunction with the above step 601, the encoding end selects the candidate extended angle prediction mode in different ways in different versions, which are described in detail below in conjunction with the above first version and the above second version respectively.
[0162] In combination with the above-mentioned first version, the encoder determines that the multiple candidate extended angular prediction modes corresponding to the candidate main angular prediction mode include angular prediction modes of the same type as the candidate main angular prediction mode in all angular prediction modes.
[0163] The same type mentioned above means that: the main angle prediction mode and the extended angle prediction mode are both angle prediction modes in the vertical prediction mode; or the main angle prediction mode and the extended angle prediction mode are both angle prediction modes in the horizontal prediction mode.
[0164] Specifically, in the first version, step 602 can be implemented by the following process:
[0165] After the encoder determines (Q+PR) candidate main-angle prediction modes, it determines the type of the candidate main-angle prediction mode.
[0166] When the type of the candidate main angular prediction mode is a candidate main angular prediction mode in a horizontal prediction mode, the encoder selects all angular prediction modes from the horizontal prediction mode as candidate extended angular prediction modes.
[0167] When the type of the candidate main angular prediction mode is a candidate main angular prediction mode in a vertical prediction mode, the encoding end selects all angular prediction modes from the vertical prediction mode as multiple candidate extended angular prediction modes.
[0168] As an example, in the first version, the number of candidate extended angular prediction modes may be 64. That is, the encoder selects 64 extended angular prediction modes as candidate extended angular prediction modes for each candidate main angular prediction mode.
[0169] In combination with the above-mentioned second version, the encoder determines that the multiple candidate extended angle prediction modes corresponding to the candidate main angle prediction mode include: multiple most commonly used extended angle prediction modes corresponding to the candidate main angle prediction mode.
[0170] Specifically, in the second version, step 602 can be implemented by the following process:
[0171] After the Q candidate main-angle prediction modes are determined at the encoding end, for each candidate main-angle prediction mode, a plurality of most commonly used extended-angle prediction modes corresponding to the main-angle prediction mode are selected as candidate extended-angle prediction modes.
[0172] In some embodiments, the plurality of most frequently used extended angular prediction modes corresponding to the candidate main angular prediction modes are related to the size of the coding unit.
[0173] Step 603: The encoder determines M candidate angle prediction mode groups according to multiple candidate main angle prediction modes and multiple candidate extended angle prediction modes corresponding to each candidate main angle prediction mode in the multiple candidate main angle prediction modes.
[0174] The candidate angle prediction mode group includes a candidate main angle prediction mode and a candidate extended angle prediction mode corresponding to the candidate main angle prediction mode; M is an integer greater than 1.
[0175] In combination with the example in the first version above, the encoder determines a total of (22+PR)×64 candidate angular prediction mode groups. At this time, M=(22+PR)×64.
[0176] In combination with the example in the second version above, each main angle prediction mode corresponds to the four most commonly used extended angle prediction modes. When the value of Q is 22, a total of 22×4=88 candidate angle prediction mode groups are selected in the second version. At this time, M=88.
[0177] The above describes in detail the process of determining multiple candidate angle prediction modes at the encoding end.
[0178] After the encoder determines a plurality of candidate angular prediction mode groups, the encoder needs to select a target angular prediction mode group from the plurality of candidate angular prediction mode groups, which is described in detail below.
[0179] Third, the encoding end determines multiple candidate angle prediction modes.
[0180] like Figure 6 As shown, after calculating M candidate angle prediction mode groups, the encoding end selects the target angle prediction mode group from the M candidate angle prediction mode groups through the following steps 604-605, which are described in detail below.
[0181] Step 604: The encoder calculates the first generation value of each of the M candidate angle prediction mode groups, and adds the first N candidate angle prediction mode groups with the smallest first generation value to the RDO list.
[0182] N is a positive integer less than M.
[0183] In some embodiments, the encoder calculates each candidate angle prediction mode group through a rough mode decision (RMD) algorithm to determine their respective first generation values.
[0184] Specifically, the encoding end determines to predict the pixel value of the prediction unit according to a candidate angle prediction mode group, and then performs Hadamard transform on the residual value between the predicted pixel value and the original pixel value of the prediction unit to determine the sum of absolute transformed difference (SATD) distortion of the prediction unit, and then determines the first generation value of the candidate angle prediction mode group, and finally, adds the first N candidate angle prediction mode groups with the smallest first generation value to the RDO list.
[0185] In some embodiments, in combination with the first version, the encoder adds the three candidate angle prediction mode groups with the smallest first-generation values to the RDO list.
[0186] In combination with the above second version, the encoder adds the candidate angle prediction mode group with the smallest value in the first generation to the RDO list.
[0187] In some embodiments, before calculating the first generation value, the encoder pre-determines whether the angle difference between the candidate main angle prediction mode and the extended angle prediction mode in the candidate angle prediction mode group is greater than a preset threshold. If the angle difference is greater than the preset threshold, the encoder calculates the first generation value of the candidate angle prediction mode group.
[0188] Since the calculated distortion of the candidate angle prediction mode group with a large angle difference is usually high, the probability of it being selected as the target angle prediction mode group is very small. Therefore, by pre-screening the candidate angle prediction mode group with a large angle difference, the computational complexity of encoding can be further reduced.
[0189] Step 605: The encoder calculates the second generation value of each candidate angle prediction mode group in the RDO list, and selects the candidate angle prediction mode group with the smallest second generation value as the target angle prediction mode group.
[0190] The target angle prediction mode group includes a target main angle prediction mode and a target extended angle prediction mode.
[0191] In some embodiments, the encoder traverses all candidate angle prediction mode groups in the full RDO list to perform transformation, quantization, inverse transformation, and inverse quantization, and determines the second generation value of each candidate angle prediction mode group. The candidate angle prediction mode group with the smallest second generation value is selected as the target angle prediction mode group.
[0192] It should be pointed out that in addition to the first N candidate angle prediction mode groups with the smallest first cost value screened out based on HOIP, the RDO list also includes parameters obtained through prediction methods. For example, parameters obtained through intra-frame prediction methods such as multi-reference lines (MRL) intra-frame prediction and matrix weighted intra-frame prediction (MIP). During the RDO calculation process, the encoder calculates the prediction method with the smallest RD cost value among all parameters as the final prediction method. When the RD cost value of the first N candidate angle prediction mode groups screened out based on HOIP is the smallest, the encoder determines to use HOIP as the final intra-frame prediction method.
[0193] In the embodiment of the present application, the encoding end finally selects the candidate angle prediction mode group with the smallest cost value as the target angle prediction mode group, which can ensure that the encoding cost is minimized when encoding the video image frame, thereby improving the encoding performance of the encoding end.
[0194] It is understandable that after the encoder determines the RD cost value target angle prediction mode group, it calculates the predicted pixel value of the pixel to be predicted in the prediction unit according to the target angle prediction mode group, and then calculates the residual value between the predicted pixel value and the original pixel value. The encoder determines the prediction residual information in the bitstream information according to the residual value.
[0195] In some embodiments, the encoding end determines the second pixel position of the reference pixel corresponding to the pixel to be predicted in the prediction unit according to the pixel position of the pixel to be predicted in the prediction unit, the target main angle prediction mode, the target extended angle prediction mode and the nonlinear projection function; and determines the predicted pixel value of the pixel to be predicted in the prediction unit according to the second pixel position of the reference pixel, the target main angle prediction mode, and the target extended angle prediction mode.
[0196] Although high-order intra prediction can accurately predict linear texture images, the calculation process of the nonlinear projection function is relatively complicated, resulting in high computational complexity when the encoder uses high-order intra prediction technology for intra prediction.
[0197] In order to reduce the computational complexity of intra-frame prediction, in the embodiment of the present application, the position deviation value between the position of the reference pixel determined by the linear projection function and the position of the reference pixel predicted by the high-order intra-frame can be calculated in advance, and then the accurate position of the reference pixel can be calculated according to the linear projection function and the position deviation value. In this way, the computational complexity of the high-order intra-frame prediction is greatly reduced without affecting the accurate prediction of the linear texture image.
[0198] like Figure 7 As shown, the process of calculating the position of the reference pixel according to the linear projection function and the position deviation value can be specifically implemented through the following steps 701 to 704.
[0199] Step 701: The encoder determines the first pixel position of a reference pixel corresponding to the pixel to be predicted according to the pixel position of the pixel to be predicted in the prediction unit, the target main angle prediction mode, and the linear projection function.
[0200] The linear projection function is a linear function, which can refer to the above formula 1 or formula 2.
[0201] Step 702: The encoder determines a position deviation value of a reference pixel according to a target main angle prediction mode, a target extended angle prediction mode, and a preset correspondence relationship.
[0202] The preset corresponding relationship is the corresponding relationship among the main angle prediction mode, the extended angle prediction mode and the position deviation value.
[0203] Exemplarily, the above-mentioned preset corresponding relationship can be implemented in the form of a table. In this way, the position deviation value can be simply determined by looking up the table to reduce the amount of calculation.
[0204] Step 703: The encoding end determines the second pixel position of the reference pixel according to the first pixel position of the reference pixel and the position deviation value of the reference pixel.
[0205] In some embodiments, the second pixel position of the reference pixel is a pixel position determined based on the pixel position of the pixel to be predicted in the prediction unit, the target main angle prediction mode, the target extended angle prediction mode, and a nonlinear function.
[0206] As an example, the nonlinear functions involved in the embodiments of the present application include, but are not limited to: quadratic function, logarithmic function, exponential function, trigonometric function, and inverse proportional function.
[0207] In this way, based on the first pixel position of the reference pixel and the position deviation value of the reference pixel, the pixel position calculated by the nonlinear function can be accurately obtained, which greatly reduces the calculation complexity of the intra-frame prediction.
[0208] Step 704: The encoder determines a predicted pixel value of a pixel to be predicted in the prediction unit according to the second pixel position of the reference pixel, the target main angle prediction mode, and the target extended angle prediction mode.
[0209] The details of this process may refer to the method described in Formula 3 in the above intra-frame prediction to determine the predicted pixel value of the pixel to be predicted in the prediction unit, which will not be described in detail here.
[0210] The above gives the reference pixel position determined by the encoder through a pre-calculated projection method and the position deviation value of the reference pixel predicted by the high-order intra-frame, and then the accurate position of the reference pixel is calculated according to the linear projection function and the position deviation value.
[0211] In some embodiments, the preset correspondence relationship can be determined in the following manner: determining a position deviation value calculation function based on the nonlinear projection function and the linear projection function; for each angle prediction mode group, determining a position deviation value corresponding to the angle prediction mode group based on the pixel position of the pixel to be predicted, the angle prediction mode group and the position deviation value calculation function, each of the angle prediction mode groups including a main angle prediction mode and an extended angle prediction mode; establishing the preset correspondence relationship based on each of the angle prediction mode groups and the position deviation value corresponding to each of the angle prediction mode groups.
[0212] Taking the nonlinear function as the quadratic function shown in the above formula 3 as an example, when both the main angle prediction mode and the extended angle prediction mode are vertical prediction mode sets, the encoder performs
[0213] The difference between Formula 4 and Formula 1 is the position deviation calculation formula:
[0214]
[0215] Among them, error vertical is the position deviation value.
[0216] When both the main angle prediction mode and the extended angle prediction mode are vertical prediction mode sets, the deviation value calculation formula is obtained by subtracting the above formula 5 from formula 2:
[0217]
[0218] Afterwards, in the case where the vertical prediction mode in the angular prediction mode group is a vertical prediction mode, the encoder may bring the angular prediction mode in the candidate angular prediction mode group into Formula 6 to determine the position deviation value of each candidate angular prediction mode group.
[0219] In the case where the horizontal prediction mode is a vertical prediction mode in the angle prediction mode group, the encoder may bring the angle prediction mode in the candidate angle prediction mode group into Formula 7 to determine the position deviation value of each candidate angle prediction mode group.
[0220] Furthermore, the encoder can establish a correspondence table between angle prediction mode groups and position deviation values based on the position deviation value of each angle prediction mode group. In the subsequent high-order intra prediction process, the position deviation value corresponding to the angle prediction mode group can be directly determined by table lookup.
[0221] As an example, the encoding end establishes a 93×93×64 position deviation value lookup table, where 93 identifies 65 medium-angle prediction modes + 28 wide-angle prediction modes in VVC, and 64 is the width or height of PU (specifically, in the vertical prediction mode, 64 is the height of PU, and in the horizontal prediction mode, 64 is the width of PU).
[0222] Taking the main angle prediction mode as 50 and the extended angle prediction mode as 49 as an example, bring it into the above formula 6 or formula 7 to determine the set of position deviation values: [0,0,0,0,0,0,-1,-1,-2,-2,-3,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-15,-16,-18,-19,-21,-22,-24, -26,-28,-30,-32,-34,-36,-38,-40,-42,-45,-47,-50,-52,-55,-57,-60,-63,-66,-69,-72,-75,-78,-81,-84,-87,-91,-94,-98,-101,-105,-108,-112,-116,-120,-124].
[0223] After that, for the angle prediction mode set with the main angle prediction mode being 50 and the extended angle prediction mode being 49, the encoder can directly select the corresponding position deviation value from the above set according to the width or height of the PU.
[0224] In the embodiment of the present application, the encoder can pre-calculate the position deviation value between the position of the reference pixel determined by the nonlinear projection function and the position of the reference pixel predicted by the high-order intra-frame, and then calculate the accurate position of the reference pixel according to the linear projection function and the position deviation value. In this way, the computational complexity of the high-order intra-frame prediction is greatly reduced without affecting the accurate prediction of the linear texture image.
[0225] The encoding process in the first version and the second version described below is described in detail with reference to specific examples.
[0226] First version
[0227] a) The encoder determines the size of the coding unit (CU). In the first version, the CU size is limited to w×h≥16.
[0228] b) The encoder selects the Q most likely modes corresponding to the prediction unit and the first P angle prediction modes in the RDO list, and deletes R repeated angle prediction modes as candidate main angle prediction modes. As an example, the value of Q is 22, and the value of P can be flexibly set according to requirements.
[0229] The specific implementation process can refer to the description of the first version in the above step 601, which will not be repeated here.
[0230] c) The encoder selects T angle prediction modes corresponding to each candidate main angle prediction mode as candidate extended angle prediction modes. In one example, the value of T is 64.
[0231] The specific implementation process can refer to the description of the first version in the above step 602, which will not be repeated here.
[0232] d) The encoding end generates ((Q+PR)×T) candidate angle prediction mode groups according to the candidate main angle prediction mode and the candidate extended angle prediction mode.
[0233] The specific implementation process can refer to the description of the first version in the above step 603, which will not be repeated here.
[0234] e) The encoding end performs HOIP calculation on each candidate angle prediction mode group to determine the cost value of each candidate angle prediction mode group.
[0235] The specific implementation process can refer to the description in the above step 604, which will not be repeated here.
[0236] f) The encoder adds the candidate angle prediction mode group with the smallest cost value to the RDO list, performs full RDO calculation, and determines the target angle prediction mode group.
[0237] The specific implementation process can refer to the description in the above step 605, which will not be repeated here.
[0238] As an example, in the first version, the specific encoding process of the encoding end includes:
[0239] The encoding end first encodes the sps_hoip_enabled_flag field (i.e., the first identification information). If the video image frame uses the HOIP technology, the sps_hoip_enabled_flag (i.e., the first identification information) field is encoded as 1; if the HOIP technology is not used, the sps_hoip_enabled_flag (i.e., the first identification information) field is encoded as 0, and the encoding end skips the relevant calculation process of the HOIP technology.
[0240] It should be noted that, in the subsequent encoding process, the encoding process of the target main angle prediction mode can refer to the prior art, which will not be described in detail here. The following only describes the encoding process of the target extended angle prediction mode.
[0241] When pu.extendIntraPredFlag (i.e., the fourth identification information) is true, the encoding end encodes the field as 1; when pu.extendIntraPredFlag (i.e., the fourth identification information) is false, the field is encoded as 0; when the pu.extendIntraPredFlag (i.e., the fourth identification information) field is encoded as 0, the encoding end skips the relevant calculation process of the HOIP technology.
[0242] When pu.extendIntraPredFlag (ie, the fourth identification information) is encoded as 1, the encoder determines whether the target extended angle prediction mode is among the four candidate extended angle prediction modes corresponding to the target main angle prediction mode.
[0243] When the target extended angle prediction mode is one of the four candidate extended angle prediction modes corresponding to the target main angle prediction mode, the encoder encodes the first bit of the appendIntraDir (ie, the second identification information) field as 1.
[0244] At this time, the encoder determines the index value idx∈{0, 1, 2, 3} of the target extended angle prediction mode in the four candidate extended angle prediction modes corresponding to the target main angle prediction mode.
[0245] The encoding end uses any of the binarization methods, such as truncated Rice binarization, K-order exponential Columbus binarization, or fixed-length binarization, to binarize idx and obtain the binary coded number idx. binary .
[0246] The encoding end uses bypass coding (equal probability) to binarize the number idx binary Encoding is performed to obtain second indication information.
[0247] When the target extended angle prediction mode is not one of the four candidate extended angle prediction modes corresponding to the target main angle prediction mode, the encoder encodes the first bit of the appendIntraDir (ie, the second identification information) field as 0.
[0248] At this time, the encoding end subtracts the first value from the target extended angle prediction mode (for example, using the formula (idx=β-2) to determine the encoding number idx.
[0249] The encoding end uses any of the binarization methods, such as truncated Rice binarization, K-order exponential Columbus binarization, or fixed-length binarization, to binarize idx and obtain the binary coded number idx. binary .
[0250] The encoding end uses bypass coding (equal probability) to binarize the number idx binary Encoding is performed to obtain second indication information.
[0251] Second version
[0252] a) The encoding end determines the size of the CU. In the second version, the CU size is limited to w×h≥128.
[0253] b) The encoder selects Q most likely modes corresponding to the prediction unit as candidate main angle prediction modes. As an example, the value of Q is 22.
[0254] The specific implementation process can refer to the description of the second version in the above step 601, which will not be repeated here.
[0255] c) The encoder selects T angle prediction modes corresponding to each candidate main angle prediction mode as candidate extended angle prediction modes. In one example, the value of T is 4.
[0256] The specific implementation process can refer to the description of the second version in the above step 602, which will not be repeated here.
[0257] d) The encoding end generates (Q×T) candidate angle prediction mode groups according to the candidate main angle prediction modes and the candidate extended angle prediction modes.
[0258] The specific implementation process can refer to the description of the second version in the above step 603, which will not be repeated here.
[0259] e) The encoding end performs HOIP calculation on each candidate angle prediction mode group to determine the cost value of each candidate angle prediction mode group.
[0260] The specific implementation process can refer to the description in the above step 604, which will not be repeated here.
[0261] f) The encoder adds the candidate angle prediction mode group with the smallest cost value to the RDO list, performs full RDO calculation, and determines the target angle prediction mode group.
[0262] The specific implementation process can refer to the description in the above step 605, which will not be repeated here.
[0263] As an example, in the second version, the specific encoding process of the encoding end includes:
[0264] The encoding end first encodes the sps_hoip_enabled_flag (i.e., the first identification information) field. If the video image frame uses the HOIP technology, the sps_hoip_enabled_flag (i.e., the first identification information) field is encoded as 1. If the HOIP technology is not used, the sps_hoip_enabled_flag (i.e., the first identification information) field is encoded as 0, and the encoding end skips the relevant calculation process of the HOIP technology.
[0265] It should be noted that, in the subsequent encoding process, the encoding process of the target main angle prediction mode can refer to the prior art, which will not be described in detail here. The following only describes the encoding process of the target extended angle prediction mode.
[0266] When pu.extendIntraPredFlag (i.e., the fourth identification information) is true, the encoding end encodes the field as 1; when pu.extendIntraPredFlag (i.e., the fourth identification information) is false, the field is encoded as 0; when the pu.extendIntraPredFlag (i.e., the fourth identification information) field is encoded as 0, the encoding end skips the relevant calculation process of the HOIP technology.
[0267] When pu.extendIntraPredFlag (ie, the fourth identification information) is encoded as 1, the encoder determines the index value idx∈{0, 1, 2, 3} of the target extended angle prediction mode in the four candidate extended angle prediction modes corresponding to the target main angle prediction mode.
[0268] The encoding end uses any of the binarization methods, such as truncated Rice binarization, K-order exponential Columbus binarization, or fixed-length binarization, to binarize idx and obtain the binary coded number idx. binary .
[0269] The encoding end uses bypass coding (equal probability) to binarize the number idx binary Encoding is performed to obtain second indication information.
[0270] After the encoding end generates the code stream information of the video image frame, the code stream information of the video image frame is sent to the decoding end so that the decoding end decodes the code stream information of the video image frame to determine the image information of the video image frame. The following will describe the process of decoding the video image frame by the decoding end.
[0271] like Figure 8 As shown, the process of decoding the video image frame by the decoding end can be specifically implemented by following steps 801 to 803:
[0272] Step 801: The decoding end receives code stream information of a video image frame.
[0273] Among them, the code stream information of the video image frame includes first indication information corresponding to the target main angle prediction mode and second indication information corresponding to the target extended angle prediction mode. The target main angle prediction mode and the target extended angle prediction mode are angle prediction modes used to perform high-order intra-frame prediction on the prediction unit in the video image frame.
[0274] Among them, the specific understanding of the code stream information can refer to the timeliness of the code stream information at the aforementioned decoding end, and this application will not elaborate on this.
[0275] Step 802: The decoding end determines a target main angle prediction mode based on the first indication information.
[0276] In some embodiments, the first indication information is used to indicate the index value of the target main angle prediction mode. The implementation method of encoding the index value of the target main angle prediction mode as the first indication information can refer to the relevant technology and will not be described in detail here.
[0277] Step 803: The decoding end determines a target extended angle prediction mode based on the second indication information.
[0278] In some embodiments, the second indication information is used to indicate an index value of the target extended angle prediction mode.
[0279] In some embodiments, the index value of the target extended angular prediction mode is the index value of the target extended angular prediction mode in a set including all angular prediction modes.
[0280] For understanding of the second indication information, reference may be made to the description of the second indication information in the encoding process of the encoding end, which will not be elaborated here.
[0281] In the embodiment of the present application, after receiving the bitstream, the decoding end can determine the target main angle prediction mode according to the first indication information in the bitstream, and determine the target extended angle prediction mode according to the second indication information in the bitstream, so as to accurately perform high-order intra-frame prediction on the video image frame, obtain the predicted pixel value of each pixel, and further determine the original pixel value of each pixel according to the prediction residual information contained in the bitstream, so as to complete the decoding of the video image frame.
[0282] In some embodiments, in combination Figure 8 ,like Fig. 9 As shown, in the above step 803, the process in which the decoding end determines the target extended angle prediction mode based on the second indication information can be specifically implemented by the following steps 901 to 904, which are described in detail below:
[0283] Step 901: The decoding end decodes the second indication information to obtain a binary value.
[0284] Step 902: The decoding end decimalizes the binary value to obtain a number to be encoded.
[0285] In some embodiments, the number to be encoded is equal to the index value of the target extended angle prediction mode minus the first value; or, when the target extended angle prediction mode belongs to the vertical angle prediction mode, the number to be encoded is equal to the index value of the target extended angle prediction mode minus the second value; wherein the second value is greater than the first value, and the difference between the second value and the first value is equal to the total number of horizontal angle prediction modes.
[0286] As an example, the first value is equal to 2, and the second value is equal to 35.
[0287] Step 903: The decoding end determines the index value of the target extended angle prediction mode based on the number to be encoded.
[0288] In some embodiments, the index value of the target extended angular prediction mode is an index value of the target extended angular prediction mode in a set including a plurality of most frequently used extended angular prediction modes corresponding to the target main angular prediction mode.
[0289] Step 904: The decoding end determines a target extended angular prediction mode from a set including all angular prediction modes based on the index value of the target extended angular prediction mode.
[0290] It should be pointed out that the implementation method of the decoding end decoding the target main angle prediction mode according to the first indication information can refer to the existing technology and will not be described in detail here.
[0291] After the target main angle prediction mode and the target extended angle prediction mode are decoded at the decoding end, the predicted pixel value of the pixel to be predicted in the prediction unit can be determined according to the target main angle prediction mode and the target extended angle prediction mode, which is described in detail below.
[0292] In some embodiments, the decoding end determines the second pixel position of the reference pixel corresponding to the pixel to be predicted in the prediction unit according to the pixel position of the pixel to be predicted in the prediction unit, the target main angle prediction mode, the target extended angle prediction mode and the nonlinear projection function; and determines the predicted pixel value of the pixel to be predicted in the prediction unit according to the second pixel position of the reference pixel, the target main angle prediction mode, and the target extended angle prediction mode.
[0293] like Fig. 9 As shown, after the decoding end determines the target extended angle prediction mode in step 904, the decoding end may specifically determine the predicted pixel value of the pixel to be predicted in the prediction unit through the following steps 905 to 908.
[0294] Step 905: The decoding end determines the first pixel position of the reference pixel corresponding to the pixel to be predicted according to the pixel position of the pixel to be predicted in the prediction unit, the target main angle prediction mode and the linear projection function.
[0295] The specific implementation of step 905 may refer to the above step 701 and will not be described in detail here.
[0296] Step 906: The decoding end determines the position deviation value of the reference pixel according to the target main angle prediction mode, the target extended angle prediction mode, and the preset corresponding relationship.
[0297] The preset corresponding relationship is the corresponding relationship among the main angle prediction mode, the extended angle prediction mode and the position deviation value.
[0298] The specific implementation of step 906 may refer to the above step 702 and will not be described in detail here.
[0299] Step 907: The decoding end determines the second pixel position of the reference pixel according to the first pixel position of the reference pixel and the position deviation value of the reference pixel.
[0300] The specific implementation of step 907 may refer to the above step 703 and will not be described in detail here.
[0301] Step 908: The decoding end determines a predicted pixel value of a pixel to be predicted in the prediction unit according to the second pixel position of the reference pixel, the target main angle prediction mode, and the target extended angle prediction mode.
[0302] The specific implementation of step 908 may refer to the above step 704 and will not be described in detail here.
[0303] After the predicted pixel value of the pixel to be predicted in the prediction unit is determined at the decoding end, the original pixel value of the pixel to be predicted in the prediction unit can be further determined according to the residual value between the predicted pixel value decoded from the bitstream information and the original pixel value, thereby making the decoded image more accurate.
[0304] like Fig. 9 As shown, after the decoding end determines the predicted pixel value of the pixel to be predicted in the prediction unit in step 908, the decoding end can determine the original pixel value of the video image frame through the following steps 909 and 910. The following is a detailed description:
[0305] Step 909: The decoding end determines the residual value in the bitstream information of the video image frame.
[0306] In a possible implementation manner, the decoding end parses the prediction residual information in the bitstream information of the video image frame to determine the residual value.
[0307] The specific calculation process of the residual value can refer to the description in the above step 605, which will not be repeated here.
[0308] Step 910: The decoding end determines the original pixel value of the video image frame according to the predicted pixel value and the residual value of the pixel to be predicted.
[0309] It should be noted that, in the present application, the descriptions of residual, prediction residual, and transform quantization residual can all be understood as residual unless otherwise specified.
[0310] In an embodiment of the present application, after receiving the bitstream information of the video image frame, the decoding end decodes the bitstream information and determines the target angle prediction mode group based on the first indication information and the second indication information in the bitstream information. The decoding end uses HOIP to calculate the target angle prediction mode group to determine the predicted pixel value of the pixel to be predicted in the prediction unit. Thereafter, the decoding end calculates the original pixel value of each pixel to be predicted based on the residual value between the predicted pixel value and the original pixel value in the bitstream information, and the predicted pixel value, thereby reconstructing and restoring the video image frame. In this way, the decoding end decodes the video image frame based on the HOIP technology, which can make the prediction accuracy of the decoded image higher, and the residual between the predicted pixel value and the original pixel value of the pixel to be predicted determined based on HOIP is smaller, and the amount of data transmitted between the encoding and decoding ends will also be smaller.
[0311] In addition, when the decoding end decodes the video image frame based on the HOIP technology, the position of the reference pixel determined by the projection method and the position deviation value of the reference pixel predicted by the high-order intra-frame can be calculated in advance, and then the accurate position of the reference pixel can be calculated according to the linear projection function and the position deviation value. In this way, the computational complexity of the high-order intra-frame prediction is greatly reduced without affecting the accurate prediction of the linear texture image.
[0312] The decoding process of the decoding end in the first version and the second version is described below with reference to specific examples.
[0313] First version
[0314] After receiving the bitstream information, the decoding end decodes the bitstream information. The decoding end first decodes the SPS in the bitstream information and determines whether the decoded value of the sps_hoip_enabled_flag field (i.e., the first identification information) in the SPS is 1. If the decoded value of this field is 1, the subsequent decoding and calculation process of the video image frame is performed based on the high-order intra-frame prediction in the subsequent process. If the decoded value of this field is 0, the decoding and calculation process of the high-order intra-frame prediction is skipped in the subsequent process.
[0315] It should be noted that, in the subsequent decoding process, the decoding process of the target main angle prediction mode can refer to the prior art, which will not be described in detail here. The following only describes the decoding process of the target extended angle prediction mode.
[0316] When the decoded value of the sps_hoip_enabled_flag field (i.e., the first identification information) is 1, the position of the pu.extendIntraPredFlag (i.e., the fourth identification information) field is decoded. If the decoded value of this field is 1, it means that the prediction unit uses high-order intra-frame prediction to encode the image. Accordingly, the decoding end enables high-order intra-frame prediction to decode the image. If the decoded value of this field is 0, it means that the prediction unit does not enable high-order intra-frame prediction to encode the image. Accordingly, the decoding end does not enable high-order intra-frame prediction to decode the image.
[0317] When the value of the decoded pu.extendIntraPredFlag (ie, the fourth identification information) field is 1, the position of the appendIntraDir (ie, the second identification information) field is decoded to determine whether the first binary digit obtained by decoding is 1.
[0318] If the first binary digit obtained by decoding is 1, the encoder sets its own pu.extendIntraPredReadMFEMsFlag to true. Then the encoder reads a two-digit binary value from the bitstream, and performs a decimal conversion on the two-digit binary value to determine the index value of the target extended angle prediction mode. After that, the encoder looks up the table according to the index value to determine the target extended angle prediction mode corresponding to the index value in the extended angle prediction mode corresponding to the target main angle prediction mode. The encoder writes the value of the target extended angle prediction mode to the pu.appendIntraDir (i.e., the second identification information) field.
[0319] If the first binary digit obtained by decoding is 0, the encoder sets pu.extendIntraPredReadMFEMsFlag to false. Then the encoder reads the specific encoding method of the encoder from the bitstream, and decodes it according to the encoding method to obtain the index value of the target extended angle prediction mode. After that, the encoder adds 2 (or 35, determined based on the response encoding method) to the index value to obtain the target extended angle prediction mode. The encoder writes the value of the target extended angle prediction mode to the pu.appendIntraDir (i.e., the second identification information) field.
[0320] Second version
[0321] After receiving the bitstream information, the decoding end decodes the bitstream information. The decoding end first decodes the SPS in the bitstream information and determines whether the decoded value of the sps_hoip_enabled_flag (i.e., the first identification information) field in the SPS is 1. If the decoded value of this field is 1, the subsequent decoding and calculation process of the video image frame is performed based on the high-order intra-frame prediction in the subsequent process. If the decoded value of this field is 0, the decoding and calculation process of the high-order intra-frame prediction is skipped in the subsequent process.
[0322] It should be noted that, in the subsequent decoding process, the decoding process of the target main angle prediction mode can refer to the prior art, which will not be described in detail here. The following only describes the decoding process of the target extended angle prediction mode.
[0323] When the decoded value of the sps_hoip_enabled_flag (i.e., the first identification information) field is 1, the position of the pu.extendIntraPredFlag (i.e., the fourth identification information) field is decoded. If the decoded value of this field is 1, it means that the prediction unit uses high-order intra-frame prediction to encode the image. Accordingly, the decoding end enables high-order intra-frame prediction to decode the image. If the decoded value of this field is 0, it means that the prediction unit does not enable high-order intra-frame prediction to encode the image. Accordingly, the decoding end does not enable high-order intra-frame prediction to decode the image.
[0324] The encoder reads a two-bit binary value from the bitstream, and performs a decimal conversion on the two-bit binary value to determine the index value of the target extended angle prediction mode. After that, the encoder performs a table lookup based on the index value to determine the target extended angle prediction mode corresponding to the index value in the extended angle prediction mode corresponding to the target main angle prediction mode. The encoder writes the value of the target extended angle prediction mode into the pu.appendIntraDir (i.e., the second identification information) field.
[0325] As an example, taking the case where the encoding end uses truncated binary code encoding as an example, the table when the encoding end looks up the table according to the index value is shown in the following Table 3:
[0326] Table 3
[0327] Idx Corresponding binary code 0 00 1 01 2 10 3 II
[0328] In some embodiments, if the extendIntraPredReadFlag field is configured in the decoding end, if the decoding end does not read a valid target extended angular prediction mode, the extendIntraPredReadFlag field is set to false, and the field is initialized to false.
[0329] It should be pointed out that the implementation process of the decoding end is similar to that of the encoding end. The specific implementation and terminology of the decoding end can refer to the above-mentioned encoding end, and this application will not go into details.
[0330] It is understandable that, in order to realize the above functions, the communication device includes a hardware structure and / or software module corresponding to each function. It should be easily appreciated by those skilled in the art that, in conjunction with the algorithm steps of each example described in the embodiments of the present application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware 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 the present application.
[0331] The embodiment of the present application can divide the functional modules of the communication device according to the above method embodiment. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one functional module. The above integrated module can be implemented in the form of hardware or software. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.
[0332] Fig.10 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application. The communication device can execute the intra-frame prediction encoding method provided in the above method embodiment. Fig.10 As shown, the communication device includes: a communication unit 1002 and a processing unit 1001.
[0333] Processing unit 1001 is used to generate bitstream information of a video image frame, wherein the bitstream information of the video image frame includes first indication information corresponding to a target main angle prediction mode and second indication information corresponding to a target extended angle prediction mode, wherein the target main angle prediction mode and the target extended angle prediction mode are angle prediction modes for performing high-order intra-frame prediction on a prediction unit in a video image frame.
[0334] The communication unit 1002 is used to send code stream information of the video image frame to the decoding end.
[0335] In some embodiments, the second indication information is used to indicate an index value of the target extended angle prediction mode.
[0336] In some embodiments, the index value of the target extended angular prediction mode is the index value of the target extended angular prediction mode in a set including all angular prediction modes.
[0337] In some embodiments, the processing unit 1001 is specifically used to: determine the number to be encoded according to the index value of the target extended angle prediction mode; binarize the number to be encoded to obtain a binary value corresponding to the number to be encoded; and encode the binary value to obtain second indication information.
[0338] In some embodiments, the number to be encoded is equal to the index value of the target extended angle prediction mode minus the first value; or, when the target extended angle prediction mode belongs to the vertical angle prediction mode, the number to be encoded is equal to the index value of the target extended angle prediction mode minus the second value; wherein the second value is greater than the first value, and the difference between the second value and the first value is equal to the total number of horizontal angle prediction modes.
[0339] In some embodiments, the first value is equal to 2 and the second value is equal to 35.
[0340] In some embodiments, the index value of the target extended angular prediction mode is an index value of the target extended angular prediction mode in a set including a plurality of most frequently used extended angular prediction modes corresponding to the target main angular prediction mode.
[0341] In some embodiments, the processing unit 1001 is specifically used to: determine the second indication information by: binarizing the index value of the target extended angle prediction mode to obtain a binary value corresponding to the number to be encoded; encoding the binary value to obtain the second indication information.
[0342] In some embodiments, the bitstream information of the video image frame also includes at least one of the following: first identification information, the first identification information is used to indicate whether the video image frame enables high-order intra-frame prediction; second identification information, the second identification information is used to indicate the index value of the extended angle prediction mode of the high-order intra-frame prediction; third identification information, the third identification information is used to indicate whether high-order intra-frame prediction is disabled for all video image frames; fourth identification information, the fourth identification information is used to indicate whether the prediction unit enables high-order intra-frame prediction; prediction residual information, the prediction residual information is used to indicate the residual value between the predicted pixel value and the original pixel value of the prediction unit.
[0343] In some embodiments, the processing unit 1001 is also used to: determine multiple candidate main-angle prediction modes corresponding to the prediction unit; determine multiple candidate extended angle prediction modes corresponding to the candidate main-angle prediction modes; determine multiple candidate angle prediction mode groups based on the multiple candidate main-angle prediction modes, and M candidate extended angle prediction modes corresponding to each candidate main-angle prediction mode in the multiple candidate main-angle prediction modes; wherein the candidate angle prediction mode group includes a candidate main-angle prediction mode, and a candidate extended angle prediction mode corresponding to the candidate main-angle prediction mode; M is an integer greater than 1.
[0344] In some embodiments, the multiple candidate main angle prediction modes corresponding to the prediction unit include: multiple most likely modes corresponding to the prediction unit and the first P angle prediction modes in the RDO list, where P is a positive integer.
[0345] In some embodiments, the multiple candidate extended angular prediction modes corresponding to the candidate main angular prediction mode include angular prediction modes of the same type as the candidate main angular prediction mode among all angular prediction modes.
[0346] In some embodiments, the plurality of candidate main-angle prediction modes corresponding to the prediction unit include: a plurality of most likely modes corresponding to the prediction unit.
[0347] In some embodiments, the multiple candidate extended angular prediction modes corresponding to the candidate main angular prediction mode include: multiple most frequently used extended angular prediction modes corresponding to the candidate main angular prediction mode.
[0348] In some embodiments, the plurality of most frequently used extended angular prediction modes corresponding to the candidate main angular prediction modes are related to the size of the coding unit.
[0349] In some embodiments, the high-order intra prediction includes a first version and a second version, and the number of candidate angular prediction mode groups determined by the high-order intra prediction of the first version is greater than the number of candidate angular prediction mode groups determined by the high-order intra prediction of the second version.
[0350] In some embodiments, the processing unit 1001 is also used to: calculate the first generation value of each of the M candidate angle prediction mode groups, and add the first N candidate angle prediction mode groups with the smallest first generation values to the rate-distortion optimization RDO list, where N is a positive integer less than M; calculate the second generation value of each candidate angle prediction mode group in the RDO list, and select the candidate angle prediction mode group with the smallest second generation value as the target angle prediction mode group, wherein the target angle prediction mode group includes a target main angle prediction mode and a target extended angle prediction mode.
[0351] In some embodiments, the processing unit 1001 is specifically used to: determine whether the angle difference between the candidate main angle prediction mode and the extended angle prediction mode in the candidate angle prediction mode group is greater than a preset threshold; when the angle difference is greater than the preset threshold, calculate the first generation value of the candidate angle prediction mode group.
[0352] In some embodiments, the processing unit 1001 is further used to: determine the first pixel position of the reference pixel corresponding to the pixel to be predicted in the prediction unit according to the pixel position of the pixel to be predicted in the prediction unit, the target main angle prediction mode and the linear projection function; determine the position deviation value of the reference pixel according to the target main angle prediction mode, the target extended angle prediction mode, and a preset correspondence, and the preset correspondence is the correspondence between the main angle prediction mode, the extended angle prediction mode and the position deviation value; determine the second pixel position of the reference pixel according to the first pixel position of the reference pixel and the position deviation value of the reference pixel; determine the predicted pixel value of the pixel to be predicted in the prediction unit according to the second pixel position of the reference pixel, the target main angle prediction mode, and the target extended angle prediction mode.
[0353] In some embodiments, the second pixel position of the reference pixel is a pixel position determined based on the pixel position of the pixel to be predicted in the prediction unit, the target main angular prediction mode, the target extended angular prediction mode, and a nonlinear projection function.
[0354] Fig.11 is a schematic diagram of the structure of another communication device provided in an embodiment of the present application, and the communication device can execute the intra-frame prediction decoding method provided in the above method embodiment. Fig.11 As shown, the communication device includes: a communication unit 1102 and a processing unit 1101.
[0355] Communication unit 1102 is used to receive code stream information of a video image frame, wherein the code stream information of the video image frame includes first indication information corresponding to a target main angle prediction mode and second indication information corresponding to a target extended angle prediction mode, wherein the target main angle prediction mode and the target extended angle prediction mode are angle prediction modes for performing high-order intra-frame prediction on a prediction unit in a video image frame.
[0356] The processing unit 1101 is configured to determine a target main angle prediction mode based on the first indication information.
[0357] The processing unit 1101 is further configured to determine a target extended angle prediction mode based on the second indication information.
[0358] In some embodiments, the second indication information is used to indicate an index value of the target extended angle prediction mode.
[0359] In some embodiments, the index value of the target extended angular prediction mode is the index value of the target extended angular prediction mode in a set including all angular prediction modes.
[0360] In some embodiments, the processing unit 1101 is also used to: decode the second indication information to obtain a binary value; decimalize the binary value to obtain a number to be encoded; determine the index value of the target extended angle prediction mode based on the number to be encoded; and determine the target extended angle prediction mode from a set of all angle prediction modes based on the index value of the target extended angle prediction mode.
[0361] In some embodiments, the number to be encoded is equal to the index value of the target extended angle prediction mode minus the first value; or, when the target extended angle prediction mode belongs to the vertical angle prediction mode, the number to be encoded is equal to the index value of the target extended angle prediction mode minus the second value; wherein the second value is greater than the first value, and the difference between the second value and the first value is equal to the total number of horizontal angle prediction modes.
[0362] In some embodiments, the first value is equal to 2 and the second value is equal to 35.
[0363] In some embodiments, the index value of the target extended angular prediction mode is an index value of the target extended angular prediction mode in a set including a plurality of most frequently used extended angular prediction modes corresponding to the target main angular prediction mode.
[0364] In some embodiments, the bitstream information of the video image frame also includes at least one of the following: first identification information, the first identification information is used to indicate whether the video image frame enables high-order intra-frame prediction; second identification information, the second identification information is used to indicate the index value of the extended angle prediction mode of the high-order intra-frame prediction; third identification information, the third identification information is used to indicate whether high-order intra-frame prediction is disabled for all video image frames; fourth identification information, the fourth identification information is used to indicate whether the prediction unit enables high-order intra-frame prediction; prediction residual information, the prediction residual information is used to indicate the residual value between the predicted pixel value and the original pixel value of the prediction unit.
[0365] In some embodiments, the processing unit 1101 is further used to: determine the first pixel position of the reference pixel corresponding to the prediction unit according to the pixel position of the prediction unit, the target main angle prediction mode and the linear projection function; determine the position deviation value of the reference pixel according to the target main angle prediction mode, the target extended angle prediction mode, and a preset correspondence, wherein the preset correspondence is the correspondence between the main angle prediction mode, the extended angle prediction mode and the position deviation value; determine the second pixel position of the reference pixel according to the first pixel position of the reference pixel and the position deviation value of the reference pixel; determine the predicted pixel value of the prediction unit according to the second pixel position of the reference pixel, the target main angle prediction mode, and the target extended angle prediction mode.
[0366] In some embodiments, the processing unit 1101 is further used to: determine the residual value in the code stream information of the video image frame; and determine the original pixel value of the video image frame based on the predicted pixel value of the prediction unit and the residual value.
[0367] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the embodiment of the present application provides another possible structure of the communication device involved in the above-mentioned embodiment. Fig.12 As shown, the communication device 120 includes: a processor 1202 and a bus 1204. Optionally, the communication device may further include a memory 1201; optionally, the communication device may further include a communication interface 1203.
[0368] Processor 1202 may be a processor that implements or executes various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of the present application. The processor 1202 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of the present application. Processor 1202 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0369] The communication interface 1203 is used to connect with other devices via a communication network, such as Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0370] The memory 1201 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0371] As a possible implementation, the memory 1201 may exist independently of the processor 1202, and the memory 1201 may be connected to the processor 1202 via a bus 1204 for storing instructions or program codes. When the processor 1202 calls and executes the instructions or program codes stored in the memory 1201, the intra-frame prediction encoding method or intra-frame prediction decoding method provided in the embodiment of the present application can be implemented.
[0372] In another possible implementation, the memory 1201 may also be integrated with the processor 1202 .
[0373] The bus 1204 may be an extended industry standard architecture (EISA) bus, etc. The bus 1204 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0374] Some embodiments of the present application provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium), which stores computer program instructions. When the computer program instructions are executed on a computer, the computer executes the intra-frame prediction encoding method or the intra-frame prediction decoding method as described in any of the above embodiments.
[0375] Exemplarily, the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks or magnetic tapes, etc.), optical disks (e.g., compact disks (CD), digital versatile disks (DVD), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memory (EPROM), cards, sticks or key drives, etc.). The various computer-readable storage media described in this application may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.
[0376] An embodiment of the present application provides a computer program product comprising instructions. When the computer program product is run on a computer, the computer is enabled to execute the intra-frame prediction encoding method or the intra-frame prediction decoding method described in any of the above embodiments.
[0377] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An intra-frame prediction encoding method, characterized in that: Applied to the encoding end, the method includes: Generate bitstream information of a video image frame, wherein the bitstream information of the video image frame includes first indication information corresponding to a target main angle prediction mode and second indication information corresponding to a target extended angle prediction mode, wherein the target main angle prediction mode and the target extended angle prediction mode are angle prediction modes for performing high-order intra-frame prediction on pixels to be predicted in a prediction unit in the video image frame; The code stream information of the video image frame is sent to a decoding end.
2. The method according to claim 1, characterized in that The second indication information is used to indicate an index value of the target extended angle prediction mode.
3. The method according to claim 2, characterized in that The index value of the target extended angular prediction mode is an index value of the target extended angular prediction mode in a set including all angular prediction modes.
4. The method according to claim 3, characterized in that The second indication information is determined by: Determining a number to be encoded according to the index value of the target extended angle prediction mode; Binarize the number to be encoded to obtain a binary value corresponding to the number to be encoded; The binary value is encoded to obtain the second indication information.
5. The method according to claim 4, characterized in that The number to be encoded is equal to the index value of the target extended angle prediction mode minus a first value; or, when the target extended angle prediction mode belongs to a vertical angle prediction mode, the number to be encoded is equal to the index value of the target extended angle prediction mode minus a second value; wherein the second value is greater than the first value, and the difference between the second value and the first value is equal to the total number of the horizontal angle prediction modes.
6. The method according to claim 5, characterized in that The first value is equal to 2, and the second value is equal to 35.
7. The method according to claim 2, characterized in that The index value of the target extended angular prediction mode is an index value of the target extended angular prediction mode in a set of multiple most frequently used extended angular prediction modes corresponding to the target main angular prediction mode.
8. The method according to claim 7, characterized in that The second indication information is determined by: Binarizing the index value of the target extended angle prediction mode to obtain a binary value corresponding to the number to be encoded; The binary value is encoded to obtain the second indication information.
9. The method according to claim 1, characterized in that: The code stream information of the video image frame also includes at least one of the following: first identification information, where the first identification information is used to indicate whether high-order intra-frame prediction is enabled for the video image frame; Second identification information, where the second identification information is used to indicate an index value of an extended angle prediction mode of a high-order intra prediction; third identification information, where the third identification information is used to indicate whether high-order intra-frame prediction is disabled for all video image frames; Fourth identification information, the fourth identification information is used to indicate whether the prediction unit enables high-order intra prediction; Prediction residual information, where the prediction residual information is used to indicate a residual value between a predicted pixel value and an original pixel value of a pixel to be predicted in the prediction unit.
10. The method according to claim 1, characterized in that The method further comprises: Determining a plurality of candidate main angle prediction modes corresponding to the prediction unit; Determine a plurality of candidate extended angle prediction modes corresponding to the candidate main angle prediction mode; Based on the multiple candidate main angle prediction modes and the M candidate extended angle prediction modes corresponding to each of the multiple candidate main angle prediction modes, multiple candidate angle prediction mode groups are determined; wherein the candidate angle prediction mode group includes one candidate main angle prediction mode and the candidate extended angle prediction mode corresponding to the candidate main angle prediction mode; M is an integer greater than 1.
11. The method according to claim 10, characterized in that The multiple candidate main angle prediction modes corresponding to the prediction unit include: multiple most likely modes corresponding to the prediction unit and first P angle prediction modes in a rate-distortion optimization (RDO) list, where P is a positive integer.
12. The method according to claim 11, characterized in that The multiple candidate extended angular prediction modes corresponding to the candidate main angular prediction mode include angular prediction modes of the same type as the candidate main angular prediction mode among all angular prediction modes.
13. The method according to claim 10, characterized in that The multiple candidate main-angle prediction modes corresponding to the prediction unit include: multiple most likely modes corresponding to the prediction unit.
14. The method according to claim 13, characterized in that The multiple candidate extended angle prediction modes corresponding to the candidate main angle prediction mode include: multiple most commonly used extended angle prediction modes corresponding to the candidate main angle prediction mode.
15. The method according to claim 14, characterized in that The multiple most frequently used extended angular prediction modes corresponding to the candidate main angular prediction modes are related to the size of the coding unit.
16. The method according to claim 10, characterized in that The high-order intra prediction includes a first version and a second version, and the number of the candidate angular prediction mode groups determined by the high-order intra prediction of the first version is greater than the number of the candidate angular prediction mode groups determined by the high-order intra prediction of the second version.
17. The method according to claim 10, characterized in that The method further comprises: Calculate the first generation value of each of the M candidate angle prediction mode groups, and add the first N candidate angle prediction mode groups with the smallest first generation values to the RDO list, where N is a positive integer less than M; Calculate the second generation value of each candidate angle prediction mode group in the RDO list, select the candidate angle prediction mode group with the smallest second generation value as the target angle prediction mode group, and the target angle prediction mode group includes the target main angle prediction mode and the target extended angle prediction mode.
18. The method according to claim 16, characterized in that The calculating of the first generation values of the plurality of candidate angle prediction mode groups comprises: Determine whether an angle difference between the candidate main angle prediction mode and the extended angle prediction mode in the candidate angle prediction mode group is greater than a preset threshold; When the angle difference is greater than a preset threshold, a first generation value of the candidate angle prediction mode group is calculated.
19. The method according to claim 1, characterized in that The method further comprises: Determine, according to the pixel position of the prediction unit, the target main angle prediction mode and the linear projection function, a first pixel position of a reference pixel corresponding to the pixel to be predicted in the prediction unit; Determining the position deviation value of the reference pixel according to the target main angle prediction mode, the target extended angle prediction mode, and a preset corresponding relationship, wherein the preset corresponding relationship is a corresponding relationship between the main angle prediction mode, the extended angle prediction mode, and the position deviation value; Determining a second pixel position of the reference pixel according to a first pixel position of the reference pixel and a position deviation value of the reference pixel; A predicted pixel value of a pixel to be predicted in the prediction unit is determined according to the second pixel position of the reference pixel, the target main angular prediction mode, and the target extended angular prediction mode.
20. The method according to claim 19, characterized in that The preset corresponding relationship is established in the following manner: Determine a position deviation value calculation function according to the nonlinear projection function and the linear projection function; For each angular prediction mode group, determining a position deviation value corresponding to the angular prediction mode group according to a pixel position of a pixel to be predicted in the prediction unit, the angular prediction mode group and the position deviation value calculation function, wherein each angular prediction mode group includes one main angular prediction mode and one extended angular prediction mode; The preset corresponding relationship is established according to each of the angle prediction mode groups and the position deviation value corresponding to each of the angle prediction mode groups.
21. The method according to claim 1, characterized in that The method further comprises: Determine a second pixel position of a reference pixel corresponding to the pixel to be predicted in the prediction unit according to the pixel position of the pixel to be predicted in the prediction unit, the target main angle prediction mode, the target extended angle prediction mode and a nonlinear projection function; A predicted pixel value of a pixel to be predicted in the prediction unit is determined according to the second pixel position of the reference pixel, the target main angular prediction mode, and the target extended angular prediction mode.
22. A decoding method for intra-frame prediction, characterized in that: Applied to a decoding end, the method comprises: Receive code stream information of the video image frame, the code stream information of the video image frame includes first indication information corresponding to a target main angle prediction mode and second indication information corresponding to a target extended angle prediction mode, the target main angle prediction mode and the target extended angle prediction mode being angle prediction modes for performing high-order intra-frame prediction on pixels to be predicted in a prediction unit in the video image frame; Determining the target main angle prediction mode based on the first indication information; Based on the second indication information, the target extended angle prediction mode is determined.
23. The method according to claim 22, characterized in that The second indication information is used to indicate an index value of the target extended angle prediction mode.
24. The method according to claim 23, characterized in that The index value of the target extended angular prediction mode is an index value of the target extended angular prediction mode in a set including all angular prediction modes.
25. The method according to claim 24, characterized in that The determining the target extended angle prediction mode based on the second indication information includes: Decoding the second indication information to obtain a binary value; Performing decimal processing on the binary value to obtain the number to be encoded; Based on the to-be-encoded number, determining an index value of the target extended angle prediction mode; The target extended angular prediction mode is determined from a set including all angular prediction modes based on the index value of the target extended angular prediction mode.
26. The method according to claim 25, characterized in that The number to be encoded is equal to the index value of the target extended angle prediction mode minus a first value; or, when the target extended angle prediction mode belongs to a vertical angle prediction mode, the number to be encoded is equal to the index value of the target extended angle prediction mode minus a second value; wherein the second value is greater than the first value, and the difference between the second value and the first value is equal to the total number of the horizontal angle prediction modes.
27. The method according to claim 23, characterized in that The index value of the target extended angular prediction mode is an index value of the target extended angular prediction mode in a set of multiple most frequently used extended angular prediction modes corresponding to the target main angular prediction mode.
28. The method according to claim 22, characterized in that The code stream information of the video image frame also includes at least one of the following: first identification information, where the first identification information is used to indicate whether high-order intra-frame prediction is enabled for the video image frame; Second identification information, where the second identification information is used to indicate an index value of an extended angle prediction mode of a high-order intra prediction; third identification information, where the third identification information is used to indicate whether high-order intra-frame prediction is disabled for all video image frames; Fourth identification information, the fourth identification information is used to indicate whether the prediction unit enables high-order intra prediction; Prediction residual information, where the prediction residual information is used to indicate a residual value between a predicted pixel value and an original pixel value of a pixel to be predicted in the prediction unit.
29. The method according to claim 28, characterized in that The method further comprises: Determine, according to the pixel position of the pixel to be predicted in the prediction unit, the target main angle prediction mode and the linear projection function, a first pixel position of a reference pixel corresponding to the pixel to be predicted in the prediction unit; Determining the position deviation value of the reference pixel according to the target main angle prediction mode, the target extended angle prediction mode, and a preset corresponding relationship, wherein the preset corresponding relationship is a corresponding relationship between the main angle prediction mode, the extended angle prediction mode, and the position deviation value; Determining a second pixel position of the reference pixel according to a first pixel position of the reference pixel and a position deviation value of the reference pixel; A predicted pixel value of a pixel to be predicted in the prediction unit is determined according to the second pixel position of the reference pixel, the target main angular prediction mode, and the target extended angular prediction mode.
30. The method according to claim 28, characterized in that The method further comprises: Determine a second pixel position of a reference pixel corresponding to the pixel to be predicted in the prediction unit according to the pixel position of the pixel to be predicted in the prediction unit, the target main angle prediction mode, the target extended angle prediction mode and a nonlinear projection function; A predicted pixel value of a pixel to be predicted in the prediction unit is determined according to the second pixel position of the reference pixel, the target main angular prediction mode, and the target extended angular prediction mode.
31. The method according to claim 29 or 30, characterized in that The method further comprises: Determining a residual value in the bitstream information of the video image frame; The predicted pixel value of the pixel to be predicted in the prediction unit and the residual value determine the original pixel value of the video image frame.
32. A communication device, characterized in that: include: Memory and processor; Memory and processor coupling; The memory is used to store instructions executable by the processor; When the processor executes the instructions, the method according to any one of claims 1 to 32 is performed.
33. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 32.
Citation Information
Patent Citations
Video signal processing method and apparatus
CN111373750A
Image processing method and device and storage medium
CN114554195A
Video coding method and device, video decoding method and device, electronic equipment and storage medium
CN115695812A
Intra-frame prediction method, coder, decoder and storage medium
WO2022174467A1
Cited By
Intra prediction coding method, intra prediction decoding method, communication apparatus, and storage medium
EP4672749A1
Intra prediction coding method, intra prediction decoding method, communication apparatus, and storage medium
WO2025007603A1
