Intra prediction method and device, computer readable storage medium

By using relative angle numbers to represent the actual angle mode in H.266/VVC, the problem of inaccurate intra-frame prediction caused by non-square block wide angle mode is solved, and unified and efficient encoding and decoding of luminance and chrominance prediction is achieved.

CN116800958BActive Publication Date: 2026-05-12GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2019-01-02
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In the next-generation video coding standard H.266/VVC, the wide-angle mode of non-square blocks causes inconsistencies in the actual angle direction represented by the angle mode number, affecting the accuracy of intra-frame prediction and encoding/decoding efficiency, especially in the process of luminance and chrominance prediction.

Method used

The actual angle mode is represented by a relative angle number. By configuring the relative angle number, the actual angle mode within the prediction direction range corresponding to the preset width and height relationship is represented in sequence. This ensures that each mode represents a consistent angle value meaning, simplifies angle conversion, and improves the accuracy of intra-frame prediction and encoding/decoding efficiency.

Benefits of technology

By processing reference blocks with different width-to-height relationships using a unified actual angle mode, deviations in luminance and chrominance prediction are eliminated, improving the accuracy of intra-frame prediction and encoding/decoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116800958B_ABST
    Figure CN116800958B_ABST
Patent Text Reader

Abstract

An intra prediction method and device, and a computer storage medium, comprising: configuring an actual angle mode of a relative angle number representation; wherein the relative angle number represents, in turn, the actual angle mode corresponding to a preset angle sampling point after sampling, starting from a starting angle, in a prediction direction range corresponding to a preset width-height relationship; the starting angle is determined according to the width-height relationship of a processing block and the prediction direction range corresponding to the preset width-height relationship; and an actual angle corresponds to the actual angle mode one by one.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the application filed on January 2, 2019, with application number 2019800712115, entitled "Intra-frame prediction method and apparatus, computer-readable storage medium". Technical Field

[0002] This application relates to intra-frame prediction technology in the field of video coding, and more particularly to an intra-frame prediction method and apparatus, as well as a computer storage medium. Background Technology

[0003] In the luma prediction process of next-generation video coding standards H.266 or Versatile Video Coding (VVC), an MPM (Multi-Modifier Model) list is constructed to store the prediction modes of adjacent blocks in order to reduce the number of bits used for entropy coding. Based on the principle of high similarity between spatially adjacent blocks, the prediction mode selected for the current block is highly likely to be the same as a mode existing in the MPM list. Therefore, fewer bits can be used to encode the prediction mode of the current block. However, due to the existence of wide-angle modes for non-square blocks, the actual angle direction represented by the angle mode number may differ from its original meaning. This results in the same angle mode number representing different prediction directions for adjacent blocks and the current block in the MPM list, with numerous possible cases. This affects the accurate representation and use of the prediction mode of the current block. Furthermore, in the chroma prediction process, the DM (Digital Modulation) mode borrows the prediction mode of the luma block located at the center of the current chroma block, regardless of whether the prediction mode of that luma block is a wide-angle mode. The DM mode will borrow the original angle mode number, which may cause a discrepancy between the angle mode actually used by the chroma block and the corresponding luma block's angle mode. In other words, in wide-angle mode, the angle mode number may correspond to different actual angle modes, making the angle conversion in the brightness prediction process more complicated, and also causing the angle mode of the brightness block borrowed for chromaticity prediction to be biased, resulting in inaccurate prediction. Summary of the Invention

[0004] This application provides an intra-frame prediction method and apparatus, as well as a computer-readable storage medium, which can effectively improve the accuracy of intra-frame prediction and improve encoding and decoding efficiency.

[0005] The technical solution of this application embodiment is implemented as follows:

[0006] This application provides an intra-frame prediction method, the method comprising:

[0007] Configure the actual angle mode represented by the relative angle number; wherein, the relative angle number sequentially represents the actual angle mode after sampling with the preset angle sampling point within the prediction direction range corresponding to the preset width and height relationship, starting from the starting angle; the starting angle is determined according to the width and height relationship of the processing block and the prediction direction range corresponding to the preset width and height relationship, and the actual angle corresponds one-to-one with the actual angle mode.

[0008] In the above scheme, when the preset angle sampling point is 65, the relative angle number is a consecutive number in the range of 2' to 66', and the actual angle pattern corresponding to the relative angle number is 65 consecutive actual angle patterns in the range of -14 to 80. The selection of the 65 actual angle patterns is determined by the width-height relationship. The relative angle number and the actual angle pattern correspond one-to-one in sequence.

[0009] In the above scheme, when the preset angle sampling point is 33, the relative angle number is a consecutive number in the range of 2' to 34', and the actual angle pattern corresponding to the relative angle number is 33 consecutive actual angle patterns in the range of -7 to 41. The selection of the 33 actual angle patterns is determined by the width-height relationship. The relative angle number and the actual angle pattern correspond one-to-one in sequence.

[0010] In the above scheme, when the preset angle sampling point is 129, the relative angle number is a consecutive number in the range of 2' to 130', and the actual angle pattern corresponding to the relative angle number is 129 consecutive actual angle patterns in the range of -28 to 158. The selection of the 129 actual angle patterns is determined by the width-height relationship. The relative angle number and the actual angle pattern correspond one-to-one in sequence.

[0011] This application also provides an intra-frame prediction method, including:

[0012] Obtain the width-to-height relationship of the reference block for the current block, the prediction direction range corresponding to the preset width-to-height relationship, and the preset angle sampling points;

[0013] Based on the width-height relationship, the predicted direction range corresponding to the preset width-height relationship, and the preset angle sampling points, the actual angle pattern corresponding to the reference block represented by the relative angle number is determined, so that the actual angle and the actual angle pattern correspond one-to-one.

[0014] Based on the actual angle pattern corresponding to the reference block, the angle prediction pattern corresponding to the reference block is obtained;

[0015] Based on the angle prediction mode, intra-frame prediction is performed on the current block.

[0016] In the above scheme, determining the actual angle pattern corresponding to the reference block represented by relative angle numbers based on the width-to-height relationship, the prediction direction range corresponding to the preset width-to-height relationship, and the preset angle sampling points includes:

[0017] Based on the width-to-height relationship and the predicted direction range corresponding to the preset width-to-height relationship, the starting angle of the angle pattern of the reference block is determined;

[0018] Based on the preset angle sampling points, the angle offset range of the reference block is determined;

[0019] Based on the starting angle and the angle offset range, the actual angle pattern corresponding to the reference block represented by the relative angle number is determined.

[0020] In the above scheme, the step of performing intra-frame prediction on the current block based on the angle prediction mode includes:

[0021] Based on the angle prediction mode, construct a prediction mode list for the current block;

[0022] An intra-frame prediction of the current block is achieved using a prediction mode list.

[0023] In the above scheme, the intra-frame prediction includes at least one of the following: luma intra-frame prediction and chroma intra-frame prediction.

[0024] This application provides an intra-frame prediction apparatus, including:

[0025] The system includes a processor, a memory storing intra-frame prediction instructions executable by the processor, and a communication bus for connecting the processor and the memory. When the intra-frame prediction instructions are executed, the above-described intra-frame prediction method is implemented.

[0026] This application provides a computer-readable storage medium storing intra-frame prediction instructions, wherein when the intra-frame prediction instructions are executed by a processor, the above-described intra-frame prediction method is implemented.

[0027] In this embodiment of the application, by adopting the above-described technical implementation scheme, the intra-frame prediction device can use a unified actual angle mode to process reference blocks with different width-to-height relationships during the intra-frame prediction process, so that the actual angle and the actual angle mode correspond one-to-one. In this way, whether in the luminance prediction process or the chrominance prediction process, when representing a certain angle, the angle mode of each shape of the block is specifically determined according to the aspect ratio, which simplifies the angle conversion of the relevant wide angle mode, unifies the meaning of the angle value represented by each mode, eliminates deviations, effectively improves the accuracy of intra-frame prediction, and improves encoding and decoding efficiency. Attached Figure Description

[0028] Figure 1 This is a schematic diagram illustrating the 67 intra-frame prediction modes supported by VVC in the embodiments of this application;

[0029] Figure 2A This is a schematic diagram of the composition structure of the video encoding system provided in the embodiments of this application;

[0030] Figure 2B This is a schematic diagram of the composition structure of the video decoding system provided in the embodiments of this application;

[0031] Figure 3 A schematic diagram of an exemplary wide-angle intra-frame prediction mode provided in an embodiment of this application;

[0032] Figure 4 A flowchart illustrating an intra-frame prediction method provided in an embodiment of this application;

[0033] Figure 5 A schematic diagram illustrating an exemplary intra-adjacent frame prediction mode provided for an embodiment of this application;

[0034] Figure 6 An exemplary arrangement of the luminance and chrominance blocks corresponding to the current block provided in this application embodiment. Figure 1 ;

[0035] Figure 7 A second exemplary diagram showing the arrangement of the luminance block and chrominance block corresponding to the current block, provided for an embodiment of this application;

[0036] Figure 8 A schematic diagram of the structure of an intra-frame prediction device provided in this application embodiment. Figure 1 ;

[0037] Figure 9 The second schematic diagram shows the structure of an intra-frame prediction device provided in an embodiment of this application. Detailed Implementation

[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely for explaining the relevant application and not for limiting the application. Furthermore, it should be noted that, for ease of description, only the parts relevant to the application are shown in the accompanying drawings.

[0039] The names used in this application will be explained below.

[0040] VVC / H.266: The next-generation video coding standard.

[0041] VTM: The Test Model of VVC, is the reference software testing platform for VVC.

[0042] MPM: Most Probable Modes.

[0043] DM: direct mode, a chromaticity prediction mode.

[0044] VER: Vertical Angle Prediction Mode, which corresponds to intra-frame prediction mode number 50 in VTM3.0.

[0045] HOR: Horizontal Angle Prediction Mode, which corresponds to intra-frame prediction mode number 18 in VTM3.0.

[0046] DIA: Diagonal Angle Prediction Mode, corresponding to intra-frame prediction mode number 34 in VTM3.0.

[0047] VDIA: Anti-angle direction prediction mode, corresponding to intra-frame prediction mode number 66 in VTM3.0.

[0048] In this embodiment, the function of predictive coding is to construct the predicted value of the current block in video coding using existing reconstructed images in space or time, and only transmit the difference between the original value and the predicted value to reduce the amount of data transmitted. Specifically, in luminance prediction, the original value and predicted value can be the original value of luminance and the predicted value of luminance; in chrominance prediction, the original value and predicted value can be the original value of chrominance and the predicted value of chrominance.

[0049] Intra-frame prediction works by constructing the predicted value for the current block using the pixel units in the row above and column to the left of the current block. It uses the recovered neighboring pixels around the current block (i.e., the pixel units in the row above and column to the left of the current block) to predict the value for each pixel unit in the current block.

[0050] For example, if the current block is a luminance block, when constructing the luminance prediction value of the current block using neighboring pixels, multiple prediction directions are used to sequentially predict the luminance of the current block, resulting in a luminance prediction value matrix corresponding to each prediction direction. Based on each luminance prediction value matrix and the original luminance value matrix of the current block, a difference matrix corresponding to each prediction direction is determined. Based on each difference matrix, an evaluation parameter value for the corresponding prediction direction is determined, which characterizes the prediction effect of the corresponding prediction direction on the current block. Based on each evaluation parameter value, a target prediction direction is determined from these multiple prediction directions. For example, the prediction direction that can obtain the minimum number of image coding bits while ensuring video restoration quality is determined as the target prediction direction. Then, the target prediction direction is written into the bitstream.

[0051] For example, VVC supports 67 intra-frame prediction directions, i.e., prediction modes, where intra-frame prediction directions with index numbers 2-66 are as follows: Figure 1 As shown.

[0052] It should be noted that, in order to adapt to the increasing demands of higher video resolutions and to more precisely and accurately represent the direction of video content, H.266 / VVC has expanded the 33 intra-frame luminance prediction angle modes defined in H.265 / HEVC to 65. The newly added angle modes... Figure 1 The numbers are indicated by dashed arrows. Number 0 represents Planar mode, number 1 represents DC mode, and numbers 2-66 represent 65 angle modes (from bottom left to top right), for a total of 67 intra-frame prediction modes. Here, 2-66 are absolute angle numbers.

[0053] In this embodiment, taking the intra-frame prediction direction with index number 66 as an example, a method for constructing the brightness prediction value of each pixel unit in the current block is given. The previous row of data adjacent to the current block represents the pixel units whose predictions have been completed. Each pixel unit in the current block is filled with pixel units along the upper right diagonal (i.e., the prediction direction with index number 66).

[0054] In addition, there are two other relatively flat methods for constructing prediction blocks: DC mode and PLANAR mode. DC mode fills the entire current block with the average of the feature values ​​(e.g., chroma or luminance values) of the previous row or left column, while PLANAR mode fills the current block in a gradient manner.

[0055] For brightness mode, according to Figure 1 The encoder predicts 0-66 directions sequentially and selects the direction that best matches the current block (e.g., with the smallest difference or the smallest rate-distortion cost) as the target prediction direction. This is used to construct the luminance prediction value for each pixel unit in the current block; this is the basic principle of intra-frame luminance prediction. After obtaining the target prediction direction and the difference for each pixel unit corresponding to it, the encoder writes the difference for each pixel unit and the index number of the target prediction direction for the current block into the bitstream. Upon receiving the bitstream, the decoder parses it to obtain the index number of the target prediction direction. It then calculates the luminance prediction value for each pixel unit in the current block and adds it to the difference obtained from the parsed bitstream to obtain the reconstructed luminance value for the corresponding pixel unit.

[0056] Based on the aforementioned fundamental concepts, a video coding system is provided. Figure 2A This is a schematic diagram of the composition structure of the video encoding system according to an embodiment of this application, as shown below. Figure 2A As shown, the video encoding system 21 includes:

[0057] The system comprises a transform and quantization unit 211, an intra-frame estimation unit 212, an intra-frame prediction unit 213, a motion compensation unit 214, a motion estimation unit 215, an inverse transform and inverse quantization unit 216, a filter control and analysis unit 217, a filtering unit 218, an encoding unit 219, and a decoding image buffer unit 210; for the input raw video signal, it uses coding tree blocks (Coding Tree Blocks) to transform and quantize the original video signal. A video reconstruction block can be obtained by partitioning the TreeUnit (CTU). Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transform and quantization unit 211, including transforming the residual information from the pixel domain to the transform domain and quantizing the resulting transform coefficients to further reduce the bit rate. The intra-frame estimation unit 212 and the intra-frame prediction unit 213 are used to perform intra-frame prediction on the video reconstruction block. The intra-frame estimation unit 212 and the intra-frame prediction unit 213 are used to determine the optimal intra-frame prediction direction (i.e., the target prediction direction) of the video reconstruction block. The motion compensation unit 214 and the motion estimation unit 215 are used to perform inter-frame prediction coding of the received video reconstruction block relative to one or more blocks in one or more reference frames to provide temporal prediction information. The motion estimation performed by the motion estimation unit 215 is a process of generating motion vectors, which can estimate the motion of the video reconstruction block. Then, the motion compensation unit 214 is based on the motion estimation unit 215. Motion compensation is performed on the determined motion vectors. After determining the intra-prediction direction, the intra-prediction unit 213 provides the selected intra-prediction data to the coding unit 219. The motion estimation unit 215 also sends the calculated motion vector data to the coding unit 219. In addition, the inverse transform and inverse quantization unit 216 is used to reconstruct the video reconstruction block. The residual block is reconstructed in the pixel domain. The reconstructed residual block is processed by the filter control analysis unit 217 and the filtering unit 218 to remove block artifacts. Then, the reconstructed residual block is added to a predictive block in the frame of the decoding image buffer unit 210 to generate the reconstructed video reconstruction block. The coding unit 219 is used to encode various coding parameters and quantized transform coefficients. In the CABAC-based coding algorithm, the context content can be based on adjacent reconstruction blocks and can be used to encode information indicating the determined intra-prediction direction, outputting the bitstream of the video signal. The decoding image buffer unit 210 is used to store the reconstructed video reconstruction block for prediction reference. As video image encoding proceeds, new reconstructed video blocks are continuously generated, and these reconstructed video blocks are stored in the decoding image buffer unit 210.

[0058] This application provides a video decoding system. Figure 2B This is a schematic diagram of the composition structure of the video decoding system according to an embodiment of this application, as shown below. Figure 2B As shown, the video decoding system 22 includes:

[0059] The system comprises a decoding unit 221, an inverse transform and inverse quantization unit 222, an intra-frame prediction unit 223, a motion compensation unit 224, a filtering unit 225, and a decoded image buffer unit 226. The input video signal is encoded by the video encoding system 21, and the resulting bitstream is output. This bitstream is input into the video decoding system 22, first passing through the decoding unit 221 to obtain the decoded transform coefficients. These transform coefficients are then processed by the inverse transform and inverse quantization unit 222 to generate residual blocks in the pixel domain. The intra-frame prediction unit 223 can generate prediction data for the current video decoding block based on the determined intra-frame prediction direction and data from previously decoded blocks in the current frame or image. The motion compensation unit 224... The prediction information for the video decoding block is determined by analyzing motion vectors and other associated syntax elements, and the prediction information is used to generate a predictive block of the video decoding block being decoded. The decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 222 with the corresponding predictive block generated by the intra-frame prediction unit 223 or the motion compensation unit 224. The decoded video signal is filtered by the filtering unit 225 to remove block artifacts, which can improve video quality. The decoded video block is then stored in the decoding image buffer unit 226, which stores reference images for subsequent intra-frame prediction or motion compensation and is also used for the output of the video signal to obtain the recovered original video signal.

[0060] The embodiments of this application mainly function on the intra-frame prediction unit 213 of the video coding system 21 and the intra-frame prediction unit 223 of the video decoding system 22; that is, if the video coding system 21 can obtain a better prediction effect through the intra-frame prediction method provided by the embodiments of this application, then, correspondingly, the video decoding and recovery quality can also be improved at the decoding end.

[0061] Based on this, the technical solution of this application will be further described in detail below with reference to the accompanying drawings and embodiments.

[0062] It should be noted that the intra-frame prediction device provided in this application embodiment can be either an encoder or a decoder, and this application embodiment does not impose any restrictions.

[0063] This application provides an intra-frame prediction method, which may include:

[0064] Configure the actual angle mode represented by the relative angle number; wherein, the relative angle number sequentially represents the actual angle mode after sampling using the preset angle sampling point within the prediction direction range corresponding to the preset width and height relationship, starting from the starting angle; the starting angle is determined according to the width and height relationship of the processing block and the prediction direction range corresponding to the preset width and height relationship, and the actual angle corresponds one-to-one with the actual angle mode.

[0065] The intra-frame pre-testing method provided in this application involves writing the pre-testing number of the prediction mode of the current block into the bitstream for encoding and decoding.

[0066] The following uses 65 intra-frame prediction modes at different angles to illustrate the wide-angle mode. Wide-angle mode: such as... Figure 1 The prediction directions for the 65 intra-angle prediction modes shown are defined clockwise as between 45 degrees (mode 66) and -135 degrees (mode 2). Considering the addition of the QTBT coding block partitioning structure in H.266 / VVC, some non-square coding blocks will be generated. For these non-square coding blocks, extended wide-angle modes will replace several traditional intra-angle prediction modes. The number of traditional angle modes that need to be replaced is related to the current coding block aspect ratio; the larger the aspect ratio, the more traditional angle modes need to be replaced with wide-angle modes.

[0067] VTM 2.0.1 features 85 angular direction modes, as well as DC and Planar modes, with 20 of these angular directions extending beyond -135 degrees to 45 degrees, representing wide angles. Angles ranging from -135 degrees (mode 2) to 45 degrees (mode 66) clockwise are designed for square blocks and encompass the diagonal directions of all square blocks (modes 2, 34, and 66). However, for non-square blocks, their diagonal directions are not always covered. Furthermore, the angular direction of square blocks extends from the bottom left diagonal to the top right diagonal, unlike the angular direction of non-square blocks.

[0068] like Figure 3 As shown, there are 93 angular direction modes as well as DC and Planar modes, of which 28 angular directions extend beyond the range of 45 degrees to -135 degrees, i.e., wide angles.

[0069] The latest H.266 / VVC reference software VTM3.0 has adopted a unified wide-angle mode proposed by L0279, which proposes three improvements:

[0070] • Restrict the angle pattern of the current coding block to between the lower left diagonal and the upper right diagonal;

[0071] • Restrict the wide-angle pattern extended from the current coding block to always include the lower left and upper right diagonal directions;

[0072] • The reference range is unified: the upper reference range is 2*W+1, and the left reference range is 2*H+1.

[0073] Where W is the width of the block (encoded block or decoded block) and H is the length of the block (encoded block or decoded block).

[0074] It should be noted that the unified approach proposed in L0279 modifies the number of traditional modes that need to be replaced with the wide-angle mode, so that the angle range after wide-angle expansion is exactly between the lower left diagonal and the upper right diagonal (e.g., between 2 and 66), as shown in Table 1. At the same time, this method also appropriately modifies the directions of the expanded wide-angle mode and the traditional angle modes that need to be replaced, so that they include the diagonal direction of the current coding block under various aspect ratios.

[0075] Table 1

[0076] width and height relationship of the coding block The traditional intra-frame mode that needs to be replaced with wide-angle mode W / H==2 Patterns 2, 3, 4, 5, 6, 7 – 67, …, 72 W / H==4 Patterns 2, 3, 4, 5, 6, 7, 8, 9, 10, 11—67,…, 76 W / H==8 Modulus 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13—67,……,78 W / H = 16 Patterns 2, 3, 4, 5, 6, 7, ..., 14, 15-67, ..., 80 W / H==0 none H / W = 2 Patterns 61, 62, 63, 64, 65, 66 — -6, ..., -1 H / W = 4 Patterns 57, 58, 59, ..., 64, 65, 66 --- 10, ..., -1 H / W = 8 Patterns 55, 56, 57, 58, 59, ..., 65, 66 --- 12, ..., -1 H / W = 16 Patterns 53, 54, 55, 56, 57, 58, ..., 66-14, ..., -1

[0077] Here, when the aspect ratio (or height-to-width ratio, the same below) is 2, 6 patterns need to be replaced; when the aspect ratio is 4, 10 patterns need to be replaced; when the aspect ratio is 8, 12 patterns need to be replaced; and when the aspect ratio is 16, 14 patterns need to be replaced.

[0078] In other words, based on Figure 3 As shown, the numbering range for all angle patterns is from -14 to 80, but the angle patterns are represented by consecutive numbers from 2 to 66 using the substitution method in Table 1.

[0079] In this embodiment of the application, when the intra-frame pre-spotting device configures or identifies the angle mode, it uses the actual angle mode represented by the relative angle number; wherein, the relative angle number sequentially represents the actual angle mode corresponding to the preset angle sampling point after sampling within the prediction direction range corresponding to the preset width-height relationship, starting from the starting angle; the starting angle is determined according to the width-height relationship of the processing block and the prediction direction range corresponding to the preset width-height relationship.

[0080] Specifically, the intra-frame pre-spotting device can determine the starting angle of the reference block's angle pattern based on the width-to-height relationship of the processing block and the prediction direction range corresponding to the preset width-to-height relationship; determine the angle offset range of the reference block based on the preset angle sampling points; and determine the actual angle pattern corresponding to the processing block represented by the relative angle number based on the starting angle and the angle offset range.

[0081] It should be noted that, in the embodiments of this application, the aspect ratio and the predicted direction range determine the starting angle. The predicted direction range characterizes the angle pattern of the preset angle sampling point selected from all angle patterns. The predicted direction range is known in the prior art. Referring to Table 1, for example, when the aspect ratio is 2, the predicted direction range is 65 angle patterns ranging from 8 to 72.

[0082] In some embodiments of this application, when the preset angle sampling point is 65, the relative angle number is a continuous number in the range of 2' to 66', and the actual angle pattern corresponding to the relative angle number is 65 consecutive actual angle patterns in the range of -14 to 80. The selection of the 65 actual angle patterns is determined by the width-height relationship, wherein the relative angle number and the actual angle pattern correspond one-to-one in sequence.

[0083] In this embodiment of the application, 2'-66' represents the actual angle pattern corresponding to the relative angle, which is represented by a number from 2' to 66. That is to say, the actual angle pattern represented by the continuous numbering in the range of 2'-66' is 65 actual angle patterns corresponding to 65 actual angles within the angle range of [starting angle + lower limit of angle offset range, starting angle + upper limit of angle offset range].

[0084] In this embodiment, the angle offset range is [0 - number of preset angle sampling points - 1]. For example, when the preset angle sampling point is 65°, the angle offset range is [0 - 64°].

[0085] For example, in this embodiment of the application, taking a preset angle sampling point, i.e., 65 angle directions, as an example, the preset width-height relationship, the meaning of the starting angle mode represented by 2', the relative angle number, and the meaning of the actual angle mode are shown in Table 2.

[0086] Table 2

[0087]

[0088] It is understandable that this representation method references the actual angle pattern representation method in Proposal L0279, representing the absolute numbers of all angle patterns within the range [-14, 80]. Regardless of the aspect ratio of the current coding block, it only includes 65 consecutive angle patterns, i.e., 65 angle numbers. However, the selection range of these 65 angle numbers (i.e., the prediction direction range) will vary depending on the aspect ratio. In the representation method of this application embodiment, regardless of whether there is a wide angle pattern extension, the pattern from the lower left diagonal direction to the upper right diagonal direction is fixed as 2'-66' (relative angle number). However, due to different aspect ratios, the meaning of the actual angle pattern represented by the starting angle number of the relative angle number will be different. Although the relative angle number range falls in different intervals due to the different prediction direction ranges, they all belong to the range [-14, 80]. For example, in W / H=2, the relative angle number in the lower left diagonal direction is 2', which actually represents the starting angle + the first value of the angle offset range: i.e., the actual angle pattern of 8+0 (using...). Figure 3 The angle number represents the actual angle; the relative angle number 3' represents the actual angle pattern of 8+1 (the second value in the angle offset range), i.e., the angle represented by the angle number 3'. Figure 3 Pattern 9 in the diagram, ..., relative angle number 66' represents the actual angle pattern of 8+64 (the 65th value in the angle offset range) (i.e., the represented pattern). Figure 3 (Mode 72 in the text).

[0089] The representation method of this application can avoid the deviation between the angle direction of the MPM list storage mode and the actual angle direction of adjacent blocks caused by using the same angle mode number during the luminance prediction process. It also avoids the deviation between the luminance direction borrowed at the center position of the current chroma block and the actual luminance direction during the chroma prediction process.

[0090] It should be noted that the relative angle numbering method provided in this application embodiment is transmitted in the code stream as a syntax element during encoding, that is, the relative angle number is included in the code stream. During decoding, the decoder agrees on the meaning of the relative angle number representing different aspect ratios. Therefore, the actual angle pattern corresponding to the received relative angle number can be parsed out.

[0091] In some embodiments of this application, when the preset angle sampling point is 33, the relative angle number is a consecutive number in the range of 2' to 34', and the actual angle pattern corresponding to the relative angle number is 33 consecutive actual angle patterns in the range of -7 to 41. The selection of the 33 actual angle patterns is determined by the width-height relationship, wherein the relative angle number and the actual angle pattern correspond one-to-one in sequence.

[0092] For example, in the embodiments of this application, a preset angle sampling point, i.e., the number of angle directions is 33, the preset width-height relationship, the meaning of the starting angle mode represented by 2', the relative angle number, and the meaning of the actual angle mode are shown in Table 3.

[0093] Table 3

[0094]

[0095]

[0096] In some embodiments of this application, when the preset angle sampling point is 129, the relative angle number is a consecutive number in the range of 2'-130', and the actual angle pattern corresponding to the relative angle number is 129 consecutive actual angle patterns in the range of -28 to 158. The selection of the 129 actual angle patterns is determined by the width-height relationship, wherein the relative angle number and the actual angle pattern correspond one-to-one in sequence.

[0097] For example, in the embodiments of this application, a preset angle sampling point, i.e., the number of angle directions is 129, the preset width-height relationship, the meaning of the starting angle mode represented by 2', the relative angle number, and the meaning of the actual angle mode are shown in Table 4.

[0098] Table 4

[0099] Reference block aspect ratio Starting angle Angular offset range Actual Angle Mode W / H = 2 14 2’~130’ 14~142 W / H = 4 22 2’~130’ 22~150 W / H = 8 26 2’~130’ 26~154 W / H = 16 30 2’~130’ 30~158 W / H = 1 2 2’~130’ 2~130 H / W = 2 -12 2’~130’ -12~118 H / W = 4 -20 2’~130’ -20~110 H / W = 8 -24 2’~130’ -24~106 H / W = 16 -28 2’~130’ -28~102

[0100] In this embodiment of the application, the number of preset angle sampling points is not limited.

[0101] This application provides an intra-frame prediction method, such as... Figure 4 As shown, the method may include:

[0102] S101. Obtain the width-to-height relationship of the reference block of the current block, the prediction direction range corresponding to the preset width-to-height relationship, and the preset angle sampling points.

[0103] S102. Based on the width-height relationship, the predicted direction range corresponding to the preset width-height relationship, and the preset angle sampling points, determine the actual angle pattern corresponding to the reference block represented by the relative angle number, so that the actual angle corresponds one-to-one with the actual angle pattern.

[0104] S103. Based on the actual angle pattern corresponding to the reference block, obtain the angle prediction pattern corresponding to the reference block.

[0105] S104. Based on the angle prediction mode, perform intra-frame prediction on the current block.

[0106] In the embodiments of this application, the reference block is a data block within a preset range where the current block is located and which has completed intra-frame prediction. The reference block can be at least one.

[0107] It should be noted that the intra-frame prediction device includes at least one of the following when performing intra-frame prediction: luma intra-frame prediction and chroma intra-frame prediction. Luma intra-frame prediction uses adjacent blocks as reference blocks, while chroma intra-frame prediction can use the luma block located at the center of the previous chroma block as a reference block. Chroma prediction modes can include DM, LM, LM_T, LM_L, etc.

[0108] In some embodiments of this application, the prediction mode includes at least one of the following: intra-frame prediction direction for luminance and intra-frame prediction direction for chrominance.

[0109] Understandably, when the prediction direction is the luma intra-prediction direction, the prediction direction of the reference block is the luma direction. For S104, when performing intra-prediction on the current block, it is actually performing intra-prediction on the luma of the current block. Similarly, when the prediction direction is the chroma intra-prediction direction, the prediction direction of the reference block is the chroma direction. For S104, when performing intra-prediction on the current block, it is actually performing intra-prediction on the chroma of the current block.

[0110] In S101, regardless of whether the intra-frame prediction device performs luminance intra-frame prediction or chrominance intra-frame prediction, during the acquisition of the prediction mode of the current block, the intra-frame prediction device can acquire the width-to-height relationship of the reference block of the current block, the prediction direction range corresponding to the preset width-to-height relationship, and the preset angle sampling points.

[0111] In the embodiments of this application, the width-to-height relationship of the reference block can be either the width-to-height ratio or the height-to-width ratio; the embodiments of this application do not impose any restrictions.

[0112] In this embodiment of the application, the predicted direction range corresponding to the preset width-height relationship is: for different width-height relationships of a processing block, the actual angle range obtained includes the number of consecutive preset angle sampling points from the lower left diagonal direction to the upper right diagonal direction.

[0113] In this embodiment of the application, the number of preset angle sampling points is the number of sampling points between the lower left diagonal direction and the upper right diagonal direction.

[0114] It should be noted that the intra-frame prediction device can obtain the width-to-height relationship of the reference block of the current block, the prediction direction range corresponding to the preset width-to-height relationship, determine the preset angle sampling point in each prediction direction range, and select the relative angle number of the prediction direction and the starting angle.

[0115] For example, the 65-angle intra-frame prediction modes are used as an example. The prediction direction of the 65-angle intra-frame prediction modes is defined in the clockwise direction as between -135 degrees (mode 2) and 45 degrees (mode 66), where [2', 66'] are relative angle numbers.

[0116] In this embodiment of the application, when the number of preset angle sampling points is fixed, the length of the prediction direction range of all angle patterns is the same. Regardless of the width and height relationship of the current block, it only includes the angle (i.e., the relative angle number) of the consecutive preset angle sampling points. However, the actual angle pattern selected from the length of the prediction direction range will be different due to the width and height relationship.

[0117] In S102, after obtaining the width-to-height relationship of the reference block of the current block, the prediction direction range corresponding to the preset width-to-height relationship, and the preset angle sampling points, the intra-frame prediction device can determine the actual angle mode corresponding to the reference block represented by relative angle numbers based on the width-to-height relationship, the prediction direction range corresponding to the preset width-to-height relationship, and the preset angle sampling points, so that the actual angle corresponds one-to-one with the actual angle mode. The specific implementation is as follows: S1021-1023.

[0118] S1021. Determine the starting angle of the reference block's angle mode based on the width-to-height relationship and the predicted direction range corresponding to the preset width-to-height relationship.

[0119] S1022. Determine the angular offset range of the reference block based on the preset angle sampling points.

[0120] S1023. Based on the starting angle and the angle offset range, determine the actual angle mode corresponding to the reference block represented by the relative angle number.

[0121] After acquiring the width-to-height relationship and the prediction direction range corresponding to the preset width-to-height relationship, the intra-frame prediction device can determine the starting angle of the reference block's angle pattern from the prediction direction range corresponding to the preset width-to-height relationship. Furthermore, the intra-frame prediction device determines the angle offset range of the reference block based on preset angle sampling points. Based on the starting angle and the angle offset range, the device determines the actual angle pattern corresponding to the reference block represented by the relative angle number. In this way, the intra-frame prediction device can select the actual angle pattern within the angle offset range using the relative angle number as the starting angle.

[0122] In some embodiments of this application, relative angle numbers can be used to characterize angles. In this way, the intra-frame prediction device can determine the relative angle start number of the starting angle of the reference block's angle pattern based on the width-height relationship and the prediction direction range corresponding to the preset width-height relationship; based on the preset angle sampling points, the angle offset range of the reference block is determined to be [0 - number of preset angle sampling points - 1]; based on the start number and the angle offset range, the actual angle pattern corresponding to the reference block is determined to be represented by consecutive numbers within the range of relative angle numbers [2'-66'].

[0123] For example, in this embodiment of the application, taking a preset angle sampling point of 65, that is, 65 angle directions, as an example, the preset width-height relationship, the meaning of the starting angle mode represented by 2', the relative angle number, and the meaning of the actual angle mode are shown in Table 2.

[0124] Understandably, this notation references Proposal L0279. Figure 3The actual angle pattern representation method represents all angle patterns in the range [-14, 80]. Regardless of the aspect ratio of the current coding block, it only includes 65 consecutive angle numbers, although the selection range of these 65 angle numbers will vary depending on the aspect ratio. In this new representation method, regardless of whether there is a wide angle pattern extension, the patterns from the lower left diagonal to the upper right diagonal are represented by relative angle numbers 2' to 66'. However, due to different aspect ratios, the starting angle numbers of the angle patterns will be different, ultimately causing all angle numbers to fall into different intervals, but all within the range [-14, 80]. For example, in W / H=2, the relative angle number in the lower left diagonal direction is 2', which actually represents the starting angle + the first value of the angle offset range: that is, the actual angle pattern of 8+0 (using...). Figure 3 The angle number represents the actual angle; the relative angle number 3' represents the actual angle pattern of 8+1 (the second value in the angle offset range), i.e., the angle represented by the angle number 3'. Figure 3 Pattern 9 in the diagram, ..., relative angle number 66' represents the actual angle pattern of 8+64 (the 65th value in the angle offset range) (i.e., the represented pattern). Figure 3 (Mode 72 in the example). The representation method of this application can avoid the deviation between the angle direction of the MPM list storage mode and the actual angle direction of adjacent blocks caused by using the same angle mode number during the luminance prediction process. At the same time, it avoids the deviation between the luminance direction borrowed at the center position of the current chrominance block and the actual luminance direction during the chrominance prediction process.

[0125] It should be noted that the relative angle numbering method provided in this application embodiment is transmitted in the code stream as a syntax element during encoding, that is, the relative angle number is included in the code stream. During decoding, the decoder agrees on the meaning of the relative angle number representing different aspect ratios. Therefore, the actual angle pattern corresponding to the received relative angle number can be parsed out.

[0126] Understandably, transmitting the relative angle number as a syntax element of the angle mode number in the bitstream simplifies the codec's acquisition of the true predicted angle in wide angle mode, which helps improve encoding and decoding efficiency.

[0127] In some embodiments of this application, when the preset angle sampling point is 33, the relative angle number is a consecutive number in the range of 2' to 34', and the actual angle pattern corresponding to the relative angle number is 33 consecutive actual angle patterns in the range of -7 to 41. The selection of the 33 actual angle patterns is determined by the width-height relationship, wherein the relative angle number and the actual angle pattern correspond one-to-one in sequence.

[0128] For example, in the embodiments of this application, a preset angle sampling point, i.e., the number of angle directions is 33, the preset width-height relationship, the meaning of the starting angle mode represented by 2', the relative angle number, and the meaning of the actual angle mode are shown in Table 3.

[0129] In some embodiments of this application, when the preset angle sampling point is 129, the relative angle number is a consecutive number in the range of 2' to 130', and the actual angle pattern corresponding to the relative angle number is 129 consecutive actual angle patterns in the range of -28 to 158. The selection of the 129 actual angle patterns is determined by the width-height relationship, wherein the relative angle number and the actual angle pattern correspond one-to-one in sequence.

[0130] For example, in the embodiments of this application, a preset angle sampling point, i.e., the number of angle directions is 129, the preset width-height relationship, the meaning of the starting angle mode represented by 2', the relative angle number, and the meaning of the actual angle mode are shown in Table 4.

[0131] In this embodiment of the application, the number of preset angle sampling points is not limited.

[0132] In S103, the intra-frame prediction device obtains the angle prediction mode corresponding to the reference block based on the actual angle mode corresponding to the reference block.

[0133] After obtaining the actual angle pattern corresponding to the reference block, the intra-frame prediction device can use the actual angle pattern to represent the angle prediction pattern (e.g., dirA, dirB) corresponding to the reference block.

[0134] In other words, in the embodiments of this application, the angle prediction mode corresponding to the reference block obtained by the intra-frame prediction device represents a one-to-one correspondence between the actual angle and the actual angle mode.

[0135] In S104, the intra-prediction device can perform intra-prediction on the current block based on the angle prediction mode. Here, the intra-prediction device needs to construct a prediction mode list for the current block based on the angle prediction mode; and then use the prediction mode list to perform intra-prediction on the current block.

[0136] In this embodiment of the application, for intra-frame prediction of luminance, the prediction mode list is the MPM list.

[0137] For intra-chroma prediction, the prediction mode list is either a DM list or an MDMS list.

[0138] For example, in intra-frame prediction of brightness, such as Figure 5As shown, reference blocks are determined from all adjacent blocks above and to the left of the current block. For example, the left (L), top (A), bottom left (BL), top right (AR), and top left (AL) adjacent blocks of the current block are used as reference blocks in the reference block set. The derivation of the MPM list considers the intra-prediction modes (also known as intra-prediction directions) of the five adjacent blocks of the current block, namely the left (L) block, top (A) block, bottom left (BL) block, top right (AR) block, and top left (AL) block.

[0139] The candidate prediction directions in the MPM list are divided into three groups: adjacent prediction modes, derived prediction modes, and default prediction modes. First, adjacent prediction modes are added to the MPM list. Each intra-frame prediction mode can only be added once to the MPM list; that is, the MPM list cannot contain duplicate prediction modes. If the MPM list contains fewer than six prediction modes after adding adjacent prediction modes, a derived intra-frame prediction mode is added to the MPM list. If the MPM list still contains fewer than six prediction modes after adding derived prediction modes, a default prediction mode is added to the MPM list, until an MPM list containing the six most likely intra-frame prediction modes is derived.

[0140] When entropy coding the intra-prediction mode for each lumen block, the MPM list for that lumen block is first obtained. It is then determined whether the selected intra-prediction mode for that lumen block is in the MPM list. If it is, a truncated binary code is used to binaryize the index number of the prediction mode in the MPM. The smaller the index number, the smaller the truncated binary code. The truncated binary code is then encoded using an arithmetic encoder, saving bit overhead. If the selected intra-prediction mode for that lumen block is one of the remaining 61 prediction modes not in the MPM list, these 61 prediction modes are renumbered starting from 0, and 16 prediction modes with numbers divisible by 4 are selected as the chosen modes. If the intra-prediction mode is among the selected modes, it is bypassed using a fixed 4-bit length. If the intra-prediction mode is among the remaining 45 non-selected modes, it is renumbered again, and a truncated binary code is used to binaryize it, generating a bit string of 5 or 6 bits depending on the number, which is then bypassed.

[0141] Because the 6MPM list in JEM is quite complex, a simplified 3MPM list was later proposed. However, the 3MPM list includes fewer prediction patterns, resulting in less accurate predictions. Therefore, a simplified 6MPM list was later proposed (the method currently used in VTM 3.0). For example, based on... Figure 5 Based on the prediction patterns corresponding to the upper (A) block and the left (L) block, a new candidate prediction pattern is constructed for the current block. The MPM list is constructed as follows:

[0142] The reference row index used by the current block is 0:

[0143] When the prediction modes dirL and dirA of block L and block A are equal and neither is an angle mode, then

[0144] MPM = {dirL, Planar / DC, HOR (18th), VER (50th), VER-4, VER+4}; Planar corresponds to 0, DC corresponds to 1, and MPM must have 6 patterns. Adjacent patterns are incremented or decremented by 1.

[0145] • When the prediction modes of block L and block A are equal and both are angular modes, then

[0146] MPM={dirL,Planar / DC,dirL-1,dirL+1,dirL-2,dirL+2};

[0147] • When the prediction modes of block L and block A are not equal, and both are angle modes, then

[0148] MPM={dirL,dirA,Planar / DC,max(dirL,dirA)-1,max(dirL,dirA)+1,max(dirL,dirA)-2};

[0149] • When the prediction modes of block L and block A are not equal, and there is only one angle mode, then

[0150] MPM={dirL,dirA,Planar / DC,dirL-1,dirL+1,dirL-2};

[0151] • When the prediction modes of block L and block A are not equal, and neither of them is an angle mode, then

[0152] MPM={dirL,dirA,HOR,VER,HOR-4,HOR+4};

[0153] When the reference row index is 1 or 3:

[0154] • When the prediction modes dirL and dirA of blocks L and A are not angular modes, then

[0155] MPM={VER,HOR,2,DIA,VDIA,26};

[0156] • When the prediction modes dirL and dirA of blocks L and A are both angular modes, then

[0157] MPM={dirL,dirA,min(dirL,dirA)-1,min(dirL,dirA)+1,max(dirL,dirA)-1,max(dirL,dirA)+1,…..};

[0158] • When there is an angle pattern (denoted by dir) in the prediction patterns dirL and dirA of block L and block A, then MPM = {dir, dir-1, dir+1, dir-1, dir+2, dir-3}.

[0159] In this embodiment of the application, the method for constructing the chroma intra-prediction direction of VVC draft 3 for DM in chroma intra-prediction is described below, as shown in Table 5:

[0160] Table 5

[0161]

[0162] For example, such as Figure 6 As shown in the diagram, this application embodiment illustrates the arrangement of the luminance blocks and chrominance blocks corresponding to the current block. Figure 6 As shown, the gray area in the left half of the square on the right represents the current chroma block 71, and the gray area in the left half of the square on the left represents the luminance region corresponding to the current chroma block 71. When performing intra-frame prediction of the current chroma block 71, the prediction direction recorded using the center position of the luminance region is... Figure 6 The prediction direction of CR brightness block 701 in the right square.

[0163] Combined with Table 5 and Figure 6 As shown, it can be determined that if the prediction direction obtained by DM is the same as one of the last four prediction directions, the same pattern in rows 3-6 will be replaced with the prediction direction with index number 66.

[0164] For MDMS for chroma intra-frame prediction, MDMS is a more complex method for constructing chroma intra-frame prediction directions. As shown in Table 6, it has a 0.2% bitrate saving compared to DM, but it has not yet been applied to VVC due to its high complexity.

[0165] Table 6

[0166]

[0167]

[0168] like Figure 7 As shown, Figure 7As shown in blocks 801 to 805 on the left, the MDMS mode in Table 6 is the intra-frame prediction mode for the corresponding luma blocks at the five positions of the current chroma block center CR, top left TL, top right TR, bottom left BL, and bottom right BR. Figure 7 As shown in blocks 806 to 810 on the right, the chroma neighboring block mode in Table 6 is the intra-prediction direction of the chroma block spatial neighboring left, upper left, lower left, upper and upper right blocks, that is, the prediction direction written to the bitstream.

[0169] In other words, in the embodiments of this application, the intra-frame prediction device can perform both luminance intra-frame prediction and chrominance intra-frame prediction.

[0170] It is understood that this application proposes to represent the actual angle mode corresponding to the sequential addition of the starting angle and the angle offset range for all rectangular blocks using relative angle numbers, and unifying them within a range of [starting angle + lower limit of angle offset range, starting angle + upper limit of angle offset range]. In the representation method of this application embodiment, different starting angles are set according to different reference block width-to-height relationships, and the old angle mode number is used to represent the meaning of the new angle mode. The angle mode and angle correspond one-to-one, thus unifying the angle mode numbers of rectangular blocks with various width-to-height relationships. Furthermore, the angle direction expressed in the luma MPM list and chroma prediction DM is consistent with the actual angle, simplifying the angle conversion related to wide angle modes, unifying the meaning of the angle value represented by each mode, eliminating deviations, and helping to improve the accuracy of intra-frame prediction.

[0171] Furthermore, transmitting the angle offset number as an angle mode number syntax element in the bitstream simplifies the codec's acquisition of the true predicted angle in wide angle mode, which helps improve encoding and decoding efficiency.

[0172] Based on the implementation of the foregoing embodiments, this application provides an intra-frame prediction apparatus, including:

[0173] In the configuration section, the actual angle mode is configured to be represented by a relative angle number. The relative angle number sequentially represents the actual angle mode after sampling using a preset angle sampling point within the prediction direction range corresponding to the preset width-height relationship, starting from the initial angle. The initial angle is determined based on the width-height relationship of the processing block and the prediction direction range corresponding to the preset width-height relationship. The actual angle corresponds one-to-one with the actual angle mode.

[0174] In some embodiments of this application, when the preset angle sampling point is 65, the relative angle number is a consecutive number in the range of 2' to 66', and the actual angle pattern corresponding to the relative angle number is 65 consecutive actual angle patterns in the range of -14 to 80. The selection of the 65 actual angle patterns is determined by the width-height relationship. The relative angle number and the actual angle pattern correspond one-to-one in sequence.

[0175] In some embodiments of this application, when the preset angle sampling point is 33, the relative angle number is a consecutive number in the range of 2' to 34', and the actual angle pattern corresponding to the relative angle number is 33 consecutive actual angle patterns in the range of -7 to 41. The selection of the 33 actual angle patterns is determined by the width-height relationship. The relative angle number and the actual angle pattern correspond one-to-one in sequence.

[0176] In some embodiments of this application, when the preset angle sampling point is 129, the relative angle number is a consecutive number in the range of 2' to 130', and the actual angle pattern corresponding to the relative angle number is 129 consecutive actual angle patterns in the range of -28 to 158. The selection of the 129 actual angle patterns is determined by the width-height relationship, wherein the relative angle number and the actual angle pattern correspond one-to-one in sequence.

[0177] Based on the implementation of the foregoing embodiments, such as Figure 8 As shown, this application embodiment also provides an intra-frame prediction device 1, including:

[0178] The acquisition section 10 is configured to acquire the width-to-height relationship of the reference block of the current block, the prediction direction range corresponding to the preset width-to-height relationship, and the preset angle sampling points;

[0179] Determining part 11 is configured to determine the actual angle pattern corresponding to the reference block represented by the relative angle number based on the width-height relationship, the prediction direction range corresponding to the preset width-height relationship, and the preset angle sampling point, so that the actual angle corresponds one-to-one with the actual angle pattern.

[0180] Part 10 is also configured to obtain the angle prediction mode corresponding to the reference block based on the actual angle mode corresponding to the reference block.

[0181] The intra-frame prediction section 12 is configured to perform intra-frame prediction on the current block based on the angle prediction mode.

[0182] In some embodiments of this application, the determining part 11 is specifically configured to determine the starting angle of the angle pattern of the reference block according to the predicted direction range corresponding to the width-height relationship and the preset width-height relationship; determine the angle offset range of the reference block based on the preset angle sampling point; and determine the actual angle pattern corresponding to the reference block represented by the relative angle number according to the starting angle and the angle offset range.

[0183] In some embodiments of this application, the intra-frame prediction part 12 is specifically configured to construct a prediction mode list for the current block based on the angle prediction mode; and to perform intra-frame prediction on the current block using the prediction mode list.

[0184] In some embodiments of this application, the intra-frame prediction includes at least one of the following: luma intra-frame prediction and chroma intra-frame prediction.

[0185] like Figure 9 As shown in the illustration, this application also provides an intra-frame prediction apparatus, comprising:

[0186] The processor 13, the memory 14 storing intra-frame prediction instructions that the processor 13 can execute, and the communication bus 15 for connecting the processor 13 and the memory 14, when the intra-frame prediction instructions are executed, implement the above-described intra-frame prediction method.

[0187] In the embodiments of this application, the processor 13 can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that for different devices, the electronic device used to implement the above-mentioned processor function can also be other types, and the embodiments of this application do not specifically limit it. The intra-frame prediction device may further include a memory 14, which may be connected to the processor 13. The memory 14 is used to store executable program code, which includes computer operation instructions. The memory 14 may be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of memory, and provides instructions and data to the processor 13.

[0188] In embodiments of this application, the communication bus 15 is used to connect the processor 13 and the memory 14 and the mutual communication between these devices.

[0189] Furthermore, in this embodiment, the functional modules can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.

[0190] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method of this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0191] This application provides a computer-readable storage medium storing intra-frame prediction instructions, wherein when the intra-frame prediction instructions are executed by a processor, the above-described intra-frame prediction method is implemented.

[0192] Specifically, the intra-prediction instruction corresponding to an intra-prediction method in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the intra-prediction instruction corresponding to an intra-prediction method in the storage medium is read or executed by an electronic device, the following steps are included: obtaining the width-to-height relationship of the reference block of the current block, the preset width-to-height relationship and the correspondence between relative angles, and the preset absolute angle range; determining the actual angle mode corresponding to the reference block based on the width-to-height relationship, the preset width-to-height relationship and the correspondence between relative angles, and the predicted absolute angle range, so that the actual angle and the actual angle mode correspond one-to-one; obtaining the angle prediction mode corresponding to the reference block based on the actual angle mode corresponding to the reference block; and performing intra-prediction on the current block based on the angle prediction mode.

[0193] Understandably, during intra-frame prediction, the intra-frame prediction device can use a unified actual angle mode to process reference blocks with different aspect ratios, ensuring a one-to-one correspondence between actual angles and actual angle modes. This simplifies angle conversions under wide-angle modes, unifies the meaning of angle values ​​represented by each mode, eliminates biases, effectively improves the accuracy of intra-frame prediction, and enhances encoding and decoding efficiency.

[0194] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0195] This application is described with reference to schematic and / or block diagrams of implementations of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the schematic and / or block diagrams can be implemented by computer program instructions, and combinations of blocks in the schematic and / or block diagrams can be implemented. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the schematic and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0196] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the implementation flow diagram. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0197] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0198] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.

[0199] Industrial applicability

[0200] This application provides an intra-frame prediction method and apparatus, as well as a computer storage medium. During intra-frame prediction, the intra-frame prediction apparatus can use a unified actual angle mode to process reference blocks with different aspect ratios, ensuring a one-to-one correspondence between actual angles and actual angle modes. This simplifies angle conversion under wide-angle modes, unifies the meaning of angle values ​​represented by each mode, eliminates deviations, effectively improves the accuracy of intra-frame prediction, and simultaneously enhances encoding / decoding efficiency.

Claims

1. An intra-frame prediction method applied to a decoder, characterized in that, The method includes: Identify multiple adjacent blocks of the current block; Determine the first intra-frame prediction mode of the plurality of adjacent blocks; When the first intra-frame prediction mode is the angle intra-frame prediction mode, an intra-frame prediction mode list for the current block is constructed based on the first intra-frame prediction modes of the multiple adjacent blocks. Based on the intra-prediction mode list, determine the first intra-prediction mode number of the current block; Obtain the aspect ratio of the current block, and map the first intra-frame prediction mode number of the current block to the second intra-frame prediction mode number under the wide-angle intra-frame prediction mode according to the aspect ratio; Based on the target intra-frame prediction mode corresponding to the second intra-frame prediction mode number of the current block, the current block is predicted to obtain the prediction block; Wherein, the plurality of adjacent blocks of the current block include the left adjacent block corresponding to the current block; wherein, when the width of the current block is greater than its height and the ratio of its width to its height is greater than or equal to 2: When the width-to-height ratio is 2, if the value of the first intra-frame prediction mode number is less than 8, the second intra-frame prediction mode number is determined by the sum of the first intra-frame prediction mode number and the first preset value 65. When the width-to-height ratio is 4, if the value of the first intra-frame prediction mode number is less than 12, the second intra-frame prediction mode number is determined by the sum of the first intra-frame prediction mode number and the first preset value 65. When the width-to-height ratio is 8, if the value of the first intra-frame prediction mode number is less than 14, the second intra-frame prediction mode number is determined by the sum of the first intra-frame prediction mode number and the first preset value 65. When the width-to-height ratio is 16, if the value of the first intra-frame prediction mode number is less than 16, the second intra-frame prediction mode number is determined by the sum of the first intra-frame prediction mode number and the first preset value 65. The value range of the second intra-frame prediction mode number is 8-80.

2. The method according to claim 1, wherein, The method further includes: Determine the maximum and minimum values ​​of the first intra-frame prediction mode for the plurality of adjacent blocks; The intra-prediction mode list of the current block is constructed based on at least one of the first intra-prediction modes of the plurality of neighboring blocks, the maximum value of the first intra-prediction modes of the plurality of neighboring blocks, and the minimum value of the first intra-prediction modes of the plurality of neighboring blocks.

3. The method according to claim 2, wherein, The method further includes: Using at least one of the first intra-frame prediction modes of the plurality of adjacent blocks, the maximum value and the minimum value of the first intra-frame prediction modes of the plurality of adjacent blocks as relative angle prediction modes, at least one actual angle prediction mode is calculated. Construct an intra-frame prediction mode list for the current block based on the at least one actual angle prediction mode.

4. The method according to claim 3, wherein, The method further includes: Based on the preset offset value and the relative angle prediction mode, the at least one actual angle prediction mode is obtained.

5. The method according to claim 4, wherein, The method further includes: Calculate the sum or difference between the relative angle prediction mode and the preset offset value, and determine the at least one actual angle prediction mode based on the calculation result.

6. The method according to any one of claims 1-5, wherein, Mapping the first intra-prediction mode number of the current block to the second intra-prediction mode number under the wide-angle intra-prediction mode based on the aspect ratio includes: If the width of the current block is greater than its height and the ratio of its width to its height is greater than or equal to 2, the second intra-frame prediction mode number is determined based on the first preset value and the first intra-frame prediction mode number. When the height of the current block is greater than its width and the ratio of its height to its width is greater than or equal to 2, the second intra-frame prediction mode number is determined based on the second preset value and the first intra-frame prediction mode number.

7. The method according to claim 6, wherein, If the width of the current block is equal to its height, skip the step of mapping the first intra-prediction mode number of the current block to the second intra-prediction mode number under the wide-angle intra-prediction mode based on the aspect ratio.

8. The method according to claim 5, wherein, If the height of the current block is greater than its width, and the ratio of the height to the width is greater than or equal to 2: When the height-to-width ratio is 2, if the value of the first intra-frame prediction mode number is greater than 60, the second intra-frame prediction mode number is determined by the difference between the first intra-frame prediction mode number and the second preset value 67. When the height-to-width ratio is 4, if the value of the first intra-frame prediction mode number is greater than 58, the second intra-frame prediction mode number is determined by the difference between the first intra-frame prediction mode number and the second preset value 67. When the height-to-width ratio is 8, if the value of the first intra-frame prediction mode number is greater than 56, the second intra-frame prediction mode number is determined by the difference between the first intra-frame prediction mode number and the second preset value 67. When the height-to-width ratio is 16, if the value of the first intra-frame prediction mode number is greater than 54, the second intra-frame prediction mode number is determined by the difference between the first intra-frame prediction mode number and the second preset value 67. The value range of the second intra-frame prediction mode number is -14 to 60.

9. The method according to any one of claims 1-5, wherein, If the width of the current block is greater than its height, and the ratio of its width to its height is greater than or equal to 2, the second intra-frame prediction mode number is determined as follows: When the width-to-height ratio is 2, if the first intra-frame prediction mode number is a natural number from 2 to 7, then the second intra-frame prediction mode number is determined to be a natural number from 67 to 72. When the width-to-height ratio is 4, if the first intra-frame prediction mode number is a natural number from 2 to 11, then the second intra-frame prediction mode number is determined to be a natural number from 67 to 76. When the width-to-height ratio is 8, if the first intra-frame prediction mode number is a natural number from 2 to 13, then the second intra-frame prediction mode number is determined to be a natural number from 67 to 78. When the width-to-height ratio is 16, if the first intra-frame prediction mode number is a natural number from 2 to 15, then the second intra-frame prediction mode number is determined to be a natural number from 67 to 80. If the height of the current block is greater than its width, and the ratio of its height to its width is greater than or equal to 2, the second intra-frame prediction mode number is determined as follows: When the height-to-width ratio is 2, if the first intra-frame prediction mode number is a natural number between 61 and 66, then the second intra-frame prediction mode number is determined to be a negative integer between -6 and -1. When the height-to-width ratio is 4, if the first intra-frame prediction mode number is a natural number between 57 and 66, then the second intra-frame prediction mode number is determined to be a negative integer between -10 and -1. When the height-to-width ratio is 8, if the first intra-frame prediction mode number is a natural number between 55 and 66, then the second intra-frame prediction mode number is determined to be a negative integer between -12 and -1. When the height-to-width ratio is 16, if the first intra-frame prediction mode number is a natural number between 53 and 66, then the second intra-frame prediction mode number is determined to be a negative integer between -14 and -1. In this configuration, the first intra-frame prediction mode number is sequentially mapped to the second intra-frame prediction mode number.

10. An intra-frame prediction method applied to an encoder, characterized in that, The method includes: Identify multiple adjacent blocks of the current block; Determine the first intra-frame prediction mode of the plurality of adjacent blocks; When the first intra-frame prediction mode is the angle intra-frame prediction mode, an intra-frame prediction mode list for the current block is constructed based on the first intra-frame prediction modes of the multiple adjacent blocks. Based on the intra-prediction mode list, determine the first intra-prediction mode number of the current block; Obtain the aspect ratio of the current block, and map the first intra-frame prediction mode number of the current block to the second intra-frame prediction mode number under the wide-angle intra-frame prediction mode according to the aspect ratio; Based on the target intra-frame prediction mode corresponding to the second intra-frame prediction mode number of the current block, the current block is predicted to obtain the prediction block; The plurality of adjacent blocks of the current block include the left adjacent block corresponding to the current block; Specifically, if the width of the current block is greater than its height, and the ratio of its width to its height is greater than or equal to 2: When the width-to-height ratio is 2, if the value of the first intra-frame prediction mode number is less than 8, the second intra-frame prediction mode number is determined by the sum of the first intra-frame prediction mode number and the first preset value 65. When the width-to-height ratio is 4, if the value of the first intra-frame prediction mode number is less than 12, the second intra-frame prediction mode number is determined by the sum of the first intra-frame prediction mode number and the first preset value 65. When the width-to-height ratio is 8, if the value of the first intra-frame prediction mode number is less than 14, the second intra-frame prediction mode number is determined by the sum of the first intra-frame prediction mode number and the first preset value 65. When the width-to-height ratio is 16, if the value of the first intra-frame prediction mode number is less than 16, the second intra-frame prediction mode number is determined by the sum of the first intra-frame prediction mode number and the first preset value 65. The value range of the second intra-frame prediction mode number is 8-80.

11. The method according to claim 10, wherein, The method further includes: Determine the maximum and minimum values ​​of the first intra-frame prediction mode for the plurality of adjacent blocks; The intra-prediction mode list of the current block is constructed based on at least one of the first intra-prediction modes of the plurality of neighboring blocks, the maximum value of the first intra-prediction modes of the plurality of neighboring blocks, and the minimum value of the first intra-prediction modes of the plurality of neighboring blocks.

12. The method according to claim 11, wherein, The method further includes: Using at least one of the first intra-frame prediction modes of the plurality of adjacent blocks, the maximum value and the minimum value of the first intra-frame prediction modes of the plurality of adjacent blocks as relative angle prediction modes, at least one actual angle prediction mode is calculated. Construct an intra-frame prediction mode list for the current block based on the at least one actual angle prediction mode.

13. The method according to claim 12, wherein, The method further includes: Based on the preset offset value and the relative angle prediction mode, the at least one actual angle prediction mode is obtained.

14. The method according to claim 12, wherein, The method further includes: Calculate the sum or difference between the relative angle prediction mode and the preset offset value, and determine the at least one actual angle prediction mode based on the calculation result.

15. The method according to any one of claims 10-14, wherein, Mapping the first intra-prediction mode number of the current block to the second intra-prediction mode number under the wide-angle intra-prediction mode based on the aspect ratio includes: If the width of the current block is greater than its height and the ratio of its width to its height is greater than or equal to 2, the second intra-frame prediction mode number is determined based on the first preset value and the first intra-frame prediction mode number. When the height of the current block is greater than its width and the ratio of its height to its width is greater than or equal to 2, the second intra-frame prediction mode number is determined based on the second preset value and the first intra-frame prediction mode number.

16. The method according to claim 15, wherein, If the width of the current block is equal to its height, skip the step of mapping the first intra-prediction mode number of the current block to the second intra-prediction mode number under the wide-angle intra-prediction mode based on the aspect ratio.

17. The method according to claim 15, wherein, If the height of the current block is greater than its width, and the ratio of the height to the width is greater than or equal to 2: When the height-to-width ratio is 2, if the value of the first intra-frame prediction mode number is greater than 60, the second intra-frame prediction mode number is determined by the difference between the first intra-frame prediction mode number and the second preset value 67. When the height-to-width ratio is 4, if the value of the first intra-frame prediction mode number is greater than 58, the second intra-frame prediction mode number is determined by the difference between the first intra-frame prediction mode number and the second preset value 67. When the height-to-width ratio is 8, if the value of the first intra-frame prediction mode number is greater than 56, the second intra-frame prediction mode number is determined by the difference between the first intra-frame prediction mode number and the second preset value 67. When the height-to-width ratio is 16, if the value of the first intra-frame prediction mode number is greater than 54, the second intra-frame prediction mode number is determined by the difference between the first intra-frame prediction mode number and the second preset value 67. The value range of the second intra-frame prediction mode number is -14 to 60.

18. The method according to any one of claims 10-14, wherein, If the width of the current block is greater than its height, and the ratio of its width to its height is greater than or equal to 2, the second intra-frame prediction mode number is determined as follows: When the width-to-height ratio is 2, if the first intra-frame prediction mode number is a natural number from 2 to 7, then the second intra-frame prediction mode number is determined to be a natural number from 67 to 72. When the width-to-height ratio is 4, if the first intra-frame prediction mode number is a natural number from 2 to 11, then the second intra-frame prediction mode number is determined to be a natural number from 67 to 76. When the width-to-height ratio is 8, if the first intra-frame prediction mode number is a natural number from 2 to 13, then the second intra-frame prediction mode number is determined to be a natural number from 67 to 78. When the width-to-height ratio is 16, if the first intra-frame prediction mode number is a natural number from 2 to 15, then the second intra-frame prediction mode number is determined to be a natural number from 67 to 80. If the height of the current block is greater than its width, and the ratio of its height to its width is greater than or equal to 2, the second intra-frame prediction mode number is determined as follows: When the height-to-width ratio is 2, if the first intra-frame prediction mode number is a natural number between 61 and 66, then the second intra-frame prediction mode number is determined to be a negative integer between -6 and -1. When the height-to-width ratio is 4, if the first intra-frame prediction mode number is a natural number between 57 and 66, then the second intra-frame prediction mode number is determined to be a negative integer between -10 and -1. When the height-to-width ratio is 8, if the first intra-frame prediction mode number is a natural number between 55 and 66, then the second intra-frame prediction mode number is determined to be a negative integer between -12 and -1. When the height-to-width ratio is 16, if the first intra-frame prediction mode number is a natural number between 53 and 66, then the second intra-frame prediction mode number is determined to be a negative integer between -14 and -1. In this configuration, the first intra-frame prediction mode number is sequentially mapped to the second intra-frame prediction mode number.

19. A computer-readable storage medium, characterized in that, It stores a computer program and a bitstream thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the intra-frame prediction method for an encoder as described in claim 10 to generate the bitstream.