Intra prediction method and device, and computer-readable storage medium
By using relative angle numbers to correspond to actual angle modes in the H.266/VVC video coding standard, the solution addresses inconsistencies in angular mode representation for non-square blocks, improving intra prediction accuracy and encoding/decoding efficiency.
Patent Information
- Application Number
- JP2025043656
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-06-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the H.266/VVC video coding standard, the wide-angle mode for non-square blocks leads to inconsistencies in angular mode representation, affecting the accuracy of intra prediction and encoding/decoding efficiency due to deviations in angular mode usage between luminance and chrominance blocks.
The proposed solution involves setting an actual angle mode indicated by a relative angle number, which sequentially corresponds to actual angle modes after sampling at predetermined angle sampling points. This method ensures that the actual angle and actual angle mode correspond one-to-one, simplifying angle conversion and unifying angle values across different block shapes.
This approach improves the accuracy of intra prediction by eliminating deviations in angular mode usage and enhances encoding/decoding efficiency by simplifying angle conversions and unifying angle values across different block shapes.
Smart Images

Figure 2025090830000001_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to intra prediction technology in the field of video coding, and in particular to an intra prediction method and apparatus, and a computer storage medium.
Background Art
[0002] In the luminance prediction process of the next-generation video coding standard H.266 or Versatile Video Coding (VVC), in order to reduce the number of bits entropy-coded, one MPM list is constructed to store the prediction modes of adjacent blocks. According to the principle that the similarity of spatially adjacent blocks is high, since the probability that the selected prediction mode of the current block is the same as a certain mode in the MPM list is high, the prediction mode of the current block can be coded with fewer bits. However, due to the existence of the wide-angle mode of non-square blocks, the actual angular direction represented by the angular mode number may be different from the original meaning. As a result, in the MPM list, angular modes with the same number may represent different prediction directions for adjacent blocks and the current block, and the situations are various, which affects the accurate description and use of the prediction mode of the current block. And in the chrominance prediction process, the DM mode uses the prediction mode of the luminance block at the center position of the current chrominance block. Regardless of whether the prediction mode of the luminance block is the wide-angle mode, the DM mode uses the original angular mode number. Therefore, there may be a deviation between the actually used angular mode of the chrominance block and the angular mode of the corresponding luminance block. That is, in the wide-angle mode, the angular mode number may correspond to different actual angular modes, which makes the angular conversion in the luminance prediction process relatively complex, and there is also a deviation in the angular mode of the luminance block used by the chrominance prediction, resulting in inaccurate prediction.
Summary of the Invention
Problems to be Solved by the Invention
[0003] Embodiments of the present application provide an intra prediction method, an apparatus, and a computer-readable storage medium that can effectively improve the accuracy of intra prediction and improve the encoding / decoding efficiency. **Means for Solving the Problem**
[0004] The technical solution of the embodiment of the present application is realized as follows.
[0005] The present application provides an intra prediction method, and the method includes: setting an actual angle mode indicated by a relative angle number, where the relative angle number sequentially indicates the corresponding actual angle mode after sampling at a predetermined angle sampling point from a start angle within a prediction direction range corresponding to a relationship between a predetermined width and height, the start angle is determined by a relationship between the width and height of a processing block and the prediction direction range corresponding to the relationship between the predetermined width and height, and the actual angle corresponds one-to-one to the actual angle mode.
[0006] In the above solution, when the sampling of the predetermined angle sampling point is 65, the relative angle number is a continuous number within the range of 2' to 66', the actual angle mode corresponding to the relative angle number is 65 consecutive actual angle modes within the range of -14 to 80, the selection of the 65 actual angle modes is determined by the relationship between the width and height, and the relative angle number and the actual angle mode correspond one-to-one in sequence.
[0007] In the above solution, when the sampling of the predetermined angle sampling point is 33, the relative angle number is a continuous number within the range of 2' to 34', the actual angle mode corresponding to the relative angle number is 33 consecutive actual angle modes within the range of -7 to 41, the selection of the 33 actual angle modes is determined by the relationship between the width and height, and the relative angle number and the actual angle mode correspond one-to-one in sequence.
[0008] In the above solution, when the sampling of the predetermined angle sampling points is 129, the relative angle numbers are consecutive numbers within the range of 2' to 130', the actual angle modes corresponding to the relative angle numbers are 129 consecutive actual angle modes within the range of -28 to 158, the selection of the 129 actual angle modes is determined by the relationship between the width and the height, and the relative angle numbers and the actual angle modes correspond to each other one by one in order.
[0009] The embodiments of the present application further provide an intra prediction method, obtaining the relationship between the width and the height of the reference block of the current block, the prediction direction range corresponding to the predetermined relationship between the width and the height, and the predetermined angle sampling points, determining the actual angle mode corresponding to the reference block indicated by the relative angle number based on the relationship between the width and the height, the prediction direction range corresponding to the predetermined relationship between the width and the height, and the predetermined angle sampling points, and making the actual angle and the actual angle mode correspond to each other one by 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, including.
[0010] In the above solution, determining the actual angle mode corresponding to the reference block indicated by the relative angle number based on the relationship between the width and the height, the prediction direction range corresponding to the predetermined relationship between the width and the height, and the predetermined angle sampling points includes: determining the start angle of the angle mode of the reference block based on the relationship between the width and the height and the prediction direction range corresponding to the predetermined relationship between the width and the height, determining the angle offset range of the reference block based on the predetermined angle sampling points, and determining the actual angle mode corresponding to the reference block indicated by the relative angle number based on the start angle and the angle offset range.
[0011] In the above solution, performing intra prediction on the current block based on the angle prediction mode means that constructing a prediction mode list of the current block based on the angle prediction mode, and realizing intra prediction for the current block using the prediction mode list.
[0012] In the above solution, the intra prediction includes at least one of luminance intra prediction and chrominance intra prediction.
[0013] Embodiments of the present application provide an intra prediction device, including a processor, a memory storing intra prediction instructions executable by the processor, and a communication bus for connecting the processor and the memory. When the intra prediction instructions are executed, the above intra prediction method is realized.
[0014] Embodiments of the present application provide a computer-readable storage medium storing intra prediction instructions. When the intra prediction instructions are executed by a processor, the above intra prediction method is realized.
Advantages of the Invention
[0015] In the embodiments of the present application, according to the above technical solution, in the intra prediction process, the intra prediction device processes reference blocks with different width-to-height relationships in a unified actual angle mode, and can make the actual angle and the actual angle mode correspond one-to-one. Then, in both the luminance prediction process and the chrominance prediction process, when indicating a certain angle, specifically determine the angle mode of each block shape based on the aspect ratio. Simplify the angle conversion in the related wide-angle mode, unify the meaning of the angle values represented by each mode, remove the deviation, effectively improve the accuracy of intra prediction, and improve the encoding / decoding efficiency.
Brief Description of the Drawings
[0016]
Figure 1
Figure 2A
Figure 2B
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
DETAILED DESCRIPTION OF THE INVENTION
[0017] Hereinafter, the technical solutions of the embodiments of the present application will be clearly and completely described with reference to the drawings of the embodiments of the present application. As can be understood, the specific embodiments described herein are for explaining the related applications and not for limiting the present application. It should be noted that only the relevant parts of the related applications are shown in the drawings for ease of explanation.
[0018] Hereinafter, the terms of the present application will be explained first.
[0019] VVC / H.266 is the next-generation video encoding standard.
[0020] VTM (The Test Model of VVC) is a reference software test platform for VVC.
[0021] MPM (Most Probable Modes) is the most probable mode.
[0022] DM (direct mode) is a chrominance prediction mode.
[0023] VER is a vertical direction angle prediction mode, corresponding to the intra prediction mode numbered 50 in VTM3.0.
[0024] HOR is a horizontal direction angle prediction mode, corresponding to the intra prediction mode numbered 18 in VTM3.0.
[0025] DIA is a diagonal direction angle prediction mode, corresponding to the intra prediction mode numbered 34 in VTM3.0.
[0026] VDIA is an anti-diagonal direction angle prediction mode, corresponding to the intra prediction mode numbered 66 in VTM3.0.
[0027] In the embodiments of the present application, the function of predictive coding constructs the predicted value of the current block by using a reconstructed image that already exists spatially or temporally in video coding, and only transmits the difference between the original value and the predicted value, thereby achieving the purpose of reducing the amount of transmitted data. In luminance prediction, the original value and the predicted value here may be the original value of luminance and the predicted value of luminance, and in chrominance prediction, the original value and the predicted value here may be the original value of chrominance and the predicted value of chrominance.
[0028] The function of intra prediction constructs the predicted value of the current block by using the pixel units in the previous row adjacent to the current block and the pixel units in the left column. The restored adjacent pixels around the current block (i.e., the pixel units in the previous row adjacent to the current block and the pixel units in the left column) are used to predict each pixel unit of the current block.
[0029] For example, when the current block is a luminance block and constructing a luminance prediction value of the current block using adjacent pixels, luminance prediction is sequentially performed on the current block using a plurality of prediction directions to obtain a luminance prediction value matrix corresponding to each prediction direction. A difference matrix corresponding to each prediction direction is determined based on each luminance prediction value matrix and the luminance original value matrix of the current block. An evaluation parameter value of the corresponding prediction direction is determined based on each difference matrix, and the evaluation parameter value is used to indicate the prediction effect on the current block in the corresponding prediction direction. A target prediction direction is determined from the plurality of prediction directions based on each evaluation parameter value. For example, on the premise of ensuring the video restoration quality, the prediction direction that can obtain the smallest image coding bit number is determined as the target prediction direction. Next, the target prediction direction is written into the bit stream.
[0030] Exemplarily, 67 intra prediction directions supported by VVC, that is, the intra prediction directions with index numbers 2 to 66 in the prediction mode, are shown in FIG. 1.
[0031] In addition, in order to meet the requirement of higher video resolution and more precisely and accurately represent the direction of video content, in H.266 / VVC, the 33 intra luminance prediction angle modes defined in H.265 / HEVC are extended to 65 types, and the added angle modes are indicated by dotted arrows in FIG. 1. Number 0 is the Planar mode, number 1 is the DC mode, numbers 2 to 66 indicate 65 angle modes (from bottom left to top right), and there are a total of 67 intra prediction modes, where 2 to 66 here are absolute angle numbers.
[0032] In the embodiment of the present application, taking the intra prediction direction with index number 66 as an example, a method for constructing the luminance prediction value of each pixel unit of the current block is provided. The data in the previous row adjacent to the current block are predicted pixel units. Each pixel unit of the current block is filled according to the pixel units on the upper right diagonal line (that is, the prediction direction with index number 66).
[0033] In addition, there are two relatively flat prediction block construction methods, namely, the DC mode and the PLANAR mode. In the DC mode, the entire current block is filled with the average value of the feature values (for example, chrominance values or luminance values) of the previous row or the leftmost column. In the PLANAR mode, the current block is filled in a gradient manner.
[0034] In the luminance mode, prediction is performed in order according to the 0 to 66 types of directions in FIG. 1, and the prediction direction that best matches the current block (for example, the smallest difference or the smallest rate distortion cost) is selected as the target prediction direction, and the luminance prediction value of each pixel unit of the current block is constructed. This is the basic principle of luminance intra prediction. After obtaining the difference corresponding to the target prediction direction and each pixel unit corresponding to the target prediction direction, the encoder writes the difference corresponding to each pixel unit and the index number of the target prediction direction corresponding to the current block into the bitstream. After receiving the bitstream, the decoder analyzes the received bitstream to obtain the index number of the target prediction direction, thereby calculating the luminance prediction value of each pixel unit in the corresponding current block. By adding the difference analyzed from the bitstream, the luminance reconstruction value of the corresponding pixel unit can be obtained.
[0035] After the above several basic concepts are known, a video encoding system is provided. FIG. 2A is a structural schematic diagram of the video encoding system according to an embodiment of the present application. As shown in FIG. 2A, the video encoding system 21 includes It includes a transformation and quantization unit 211, an intra prediction unit 212, an intra prediction unit 213, a motion compensation unit 214, a motion estimation unit 215, an inverse transformation and inverse quantization unit 216, a filter control analysis unit 217, a filtering unit 218, an encoding unit 219, and a decoded image buffer unit 210. For the input original video signal, one video reconstruction block can be obtained by the division of a coding tree unit (CTU). Then, for the residual pixel information obtained after intra or inter prediction, the transformation and quantization unit 211 transforms the video reconstruction block, which includes transforming the residual information from the pixel domain to the transform domain and quantizing the obtained transform coefficients, thereby further reducing the bit rate. The intra prediction unit 212 and the intra prediction unit 213 are used to perform intra prediction on the video reconstruction block. Here, the intra prediction unit 212 and the intra prediction unit 213 are used to determine the optimal intra prediction direction (i.e., the target prediction direction) of the video reconstruction block. To provide temporal prediction information, the motion compensation unit 214 and the motion estimation unit 215 are used to perform inter prediction coding on one or more blocks in one or more reference frames of the received video reconstruction block. The motion estimation performed by the motion estimation unit 215 is the process of generating a motion vector, and the motion vector can estimate the motion of the video reconstruction block. Next, the motion compensation unit 214 performs motion compensation based on the motion vector determined by the motion estimation unit 215. After determining the intra prediction direction, the intra prediction unit 213 is further used to provide the selected intra prediction data to the encoding unit 219. And the motion vector data determined by calculation by the motion estimation unit 215 is also sent to the encoding unit 219. Also, the inverse transformation and inverse quantization unit 216 is used for the reconstruction of the video reconstruction block to reconstruct the residual block in the pixel domain.The reconstructed residual block removes blocking artifacts by the filter control analysis unit 217 and the filtering unit 218, and then adds the reconstructed residual block to one prediction block in the frame of the decoded image buffer unit 210, thereby being used to generate a reconstructed video reconstruction block. The encoding unit 219 is used to encode various encoding parameters and the quantized transform coefficients. In the CABAC-based encoding algorithm, the context content may be based on adjacent reconstructed blocks, and may be used to encode the information indicating the determined intra prediction direction and output the bitstream of the video signal. The decoded image buffer unit 210 is used to store the reconstructed video reconstruction block and is used for prediction reference. As the execution of video image encoding progresses, new reconstructed video reconstruction blocks are continuously generated, and all of these reconstructed video reconstruction blocks are stored in the decoded image buffer unit 210.
[0036] Embodiments of the present application provide a video decoding system. FIG. 2B is a structural schematic diagram of the video decoding system according to the embodiments of the present application. As shown in FIG. 2B, the video decoding system 22 includes It includes a decoding unit 221, an inverse transform and inverse quantization unit 222, an intra prediction unit 223, a motion compensation unit 224, a filtering unit 225, and a decoded image buffer unit 226. After the input video signal is encoded by the video encoding system 21, the bitstream of the video signal is output, and the bitstream is input to the video decoding system 22. First, the decoded transform coefficients are obtained by passing through the decoding unit 221, and the transform coefficients are processed by the inverse transform and inverse quantization unit 222 to generate a residual block in the pixel domain. The intra prediction unit 223 may be used to generate prediction data for the current video decoded block based on the determined intra prediction direction and the data that has passed through the previously decoded block from the current frame or picture. The motion compensation unit 224 analyzes the motion vector and other related syntax elements to determine the prediction information for the video decoded block, and uses the prediction information to generate a prediction block of the video decoded block being decoded. By obtaining the sum of the residual block from the inverse transform and inverse quantization unit 222 and the corresponding prediction block generated by the intra prediction unit 223 or the motion compensation unit 224, a decoded video block is formed. The decoded video signal can pass through the filtering unit 225 to remove blocking artifacts and improve the video quality. Next, the decoded video block is stored in the decoded image buffer unit 226. The decoded image buffer unit 226 is used to store a reference image for subsequent intra prediction or motion compensation, and is also used to output a video signal to obtain the restored original video signal.
[0037] The embodiments of the present application mainly act on the intra prediction unit 213 in the video encoding system 21 and the intra prediction unit 223 in the video decoding system 22. That is, when a higher prediction effect can be obtained by the intra prediction method according to the embodiments of the present application in the video encoding system 21, the restoration quality of video decoding can also be correspondingly improved on the decoding side.
[0038] Based on this, the technical solution of the present application will be further described in detail by way of embodiments with reference to the drawings below.
[0039] It should be noted that the intra prediction device according to the embodiment of the present application may be an encoder or a decoder, and the embodiments of the present application do not limit this.
[0040] The embodiments of the present application provide an intra prediction method, and the method includes: setting an actual angle mode indicated by a relative angle number, where the relative angle number sequentially indicates the corresponding actual angle mode after sampling at a predetermined angle sampling point from a start angle within a prediction direction range corresponding to a relationship between a predetermined width and height, the start angle is determined by a relationship between the width and height of a processing block and a prediction direction range corresponding to a relationship between a predetermined width and height, and the actual angle may correspond one-to-one to the actual angle mode.
[0041] Regarding the process of writing the prediction number of the prediction mode of the current block into the bitstream for encoding / decoding in the intra prediction method according to the embodiment of the present application.
[0042] Hereinafter, the wide-angle mode will be described by 65 types of angular intra prediction modes. For the wide-angle mode, the prediction directions of the 65 types of angular intra prediction modes shown in FIG. 1 are defined as 45 degrees (mode 66) to -135 degrees (mode 2) in the clockwise direction. When adding a QTBT coding block partitioning structure to H.266 / VVC, it is conceivable that some non-square coding blocks are generated. For non-square coding blocks, some conventional angular intra prediction modes are replaced in the extended wide-angle mode. The number of conventional angular modes that need to be replaced is currently related to the aspect ratio of the coding block, and the larger the ratio, the more conventional angular modes need to be replaced by the wide-angle mode.
[0043] In VTM 2.0.1, there are 85 angular modes as well as DC and Planar modes. Among them, 20 angular directions exceed the range from -135 degrees to 45 degrees, that is, they are wide angles. The angular directions within -135 degrees (mode 2) to 45 degrees (mode 66) in the clockwise direction are designed to be used for blocks and include the diagonal directions of all rectangular blocks (modes 2, 34, and 66). However, for non-rectangular blocks, it is not always possible to cover their diagonal directions. Also, the angular directions of rectangular blocks are from the lower left diagonal direction to the upper right diagonal direction, while those of non-rectangular blocks are not.
[0044] As shown in Figure 3, there are 93 angular modes as well as DC and Planar modes. Among them, 28 angular directions exceed the range from 45 degrees to -135 degrees, that is, they are wide angles.
[0045] In the latest H.266 / VVC reference software VTM 3.0, the unified wide-angle mode proposed in the L0279 proposal is adopted. The proposal · An improvement that limits the angular mode of the current encoded block to be between the lower left diagonal direction and the upper right diagonal direction. · An improvement that limits the wide-angle mode extended from the current encoded block to always include the lower left and upper right diagonal directions, and · Proposes an improvement that the reference ranges are unified, the reference range for the above is 2*W + 1, and the reference range for the left is 2*H + 1.
[0046] Here, 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).
[0047] Still, the unified method proposed in the L0279 proposal modifies the number of conventional modes that need to be replaced with the wide-angle mode. As shown in Table 1, the angle range after expanding the wide angle is exactly between the lower left diagonal direction and the upper right diagonal direction (for example, between 2 and 66). At the same time, the method appropriately modifies the direction of the further expanded wide-angle mode and the conventional angle modes that need to be replaced, so as to include the diagonal direction of the current encoded block in the case of various aspect ratios.
[0048]
Table 1
[0049] Here, when the aspect ratio (or the vertical-horizontal ratio, the same hereinafter) is 2, 6 modes need to be replaced; when the aspect ratio is 4, 10 modes need to be replaced; when the aspect ratio is 8, 12 modes need to be replaced; when the aspect ratio is 16, 14 modes need to be replaced.
[0050] That is, according to FIG. 3, the number range of all angle modes is in the range of -14 to 80, but the angle modes are indicated by the continuous numbers from 2 to 66 in the replacement method of Table 1.
[0051] In the embodiment of the present application, when the intra prediction device sets or marks the angle mode, it uses the actual angle mode indicated by the relative angle number. The relative angle number shows the corresponding actual angle modes in sequence after sampling at a predetermined angle sampling point from the starting angle within the prediction direction range corresponding to the relationship between the predetermined width and height. The starting angle is determined by the relationship between the width and height of the processing block and the prediction direction range corresponding to the relationship between the predetermined width and height.
[0052] Specifically, the intra prediction device can determine the start angle of the angular mode of the reference block based on the relationship between the width and height of the processing block and the prediction direction range corresponding to the relationship between the predetermined width and height, determine the angular offset range of the reference block based on the predetermined angular sampling points, and determine the actual angular mode corresponding to the processing block indicated by the relative angular number based on the start angle and the angular offset range.
[0053] In addition, in the embodiments of the present application, the relationship between the width and height and the prediction direction range determine the start angle. The prediction direction range indicates which angular modes are the number of predetermined angular sampling points selected from all angular modes. The prediction direction range is known in the prior art. As shown in Table 1, for example, when the aspect ratio is 2, the prediction direction range is these 65 angular modes within the range of 8 to 72.
[0054] In some embodiments of the present application, when the sampling of the predetermined angular sampling points is 65, the relative angular numbers are consecutive numbers in the range of 2' to 66', and the actual angular modes corresponding to the relative angular numbers are 65 consecutive actual angular modes within the range of -14 to 80. The selection of the 65 actual angular modes is determined by the relationship between the width and height, and the relative angular numbers and the actual angular modes correspond one-to-one in order.
[0055] In the embodiments of the present application, at 2' to 66', the actual angular modes corresponding to the relative angles indicated by the numbers 2 to 66 are shown. That is, the actual angular modes indicated by the consecutive numbers within the range of 2' to 66' are 65 actual angular modes of the corresponding 65 actual angles within the angular range of [start value angle + lower limit value of the angular offset range, start value angle + upper limit value of the angular offset range].
[0056] In the embodiments of the present application, the angular offset range is [0 to the number of predetermined angular sampling points - 1]. For example, when the predetermined angular sampling point is 65, the angular offset range is [0 to 64].
[0057] Exemplarily, in the embodiments of the present application, taking the case where the number of sampling points at a predetermined angle, that is, the number of angular directions is 65 as an example, the relationship between the predetermined width and height, the meaning of the start angle mode indicated by 2′, the relative angle number, and the meaning indicating the actual angle mode are shown in Table 2.
[0058]
Table 2
[0059] As can be understood, in this display method, referring to the actual angle mode display method in the L0279 proposal, the absolute numbers of all angle modes are shown in the range of [-14, 80]. Regardless of the aspect ratio of the current encoded block, all of them include 65 consecutive angle modes therein, that is, 65 angle numbers. However, the selection range (i.e., the prediction direction range) of these 65 angle numbers is different depending on the aspect ratio. In the display method of the embodiments of the present application, regardless of whether there is an expansion of the wide angle mode, the modes from the lower left diagonal direction to the upper right diagonal direction are fixed to 2′~66′ (relative angle numbers). However, due to different aspect ratios, the meaning of the actual angle mode indicated by the start angle number of the relative angle number is different. Since the prediction direction ranges are different, the relative angle number ranges are in different intervals, but all belong to the range of [-14, 80]. For example, when W / H = 2, the relative angle number in the lower left diagonal direction is 2′, and actually it indicates the first value of the start angle + angle offset range, that is, the actual angle mode of 8 + 0 (indicating the actual angle with the angle number in FIG. 3), the relative angle number 3′ indicates the actual angle mode of 8 + 1 (the second value of the angle offset range) (that is, indicating mode 9 in FIG. 3), …, the relative angle number 66′ indicates the actual angle mode of 8 + 64 (the 65th value of the angle offset range) (that is, indicating mode 72 in FIG. 3).
[0060] Since the display method of the embodiments of the present application is indicated by the same angular mode number in the luminance prediction process, it is possible to avoid the deviation between the angular direction of the MPM list storage mode and the angular direction of the actual adjacent block. At the same time, the deviation between the luminance direction used at the center position of the current chrominance block in the chrominance prediction process and the actual luminance direction is avoided.
[0061] In addition, in the display method using the relative angle number according to the embodiments of the present application, during encoding, it is put into the bit stream in the form of a syntax element and transmitted, that is, the relative angle number is put into the bit stream. During decoding, the decoder agrees on the meaning indicated by the relative angle numbers of different aspect ratios. Therefore, the actual angular mode corresponding to the received relative angle number can be analyzed according to the received relative angle number.
[0062] In some embodiments of the present application, when the sampling of a predetermined angle sampling point is 33, the relative angle numbers are consecutive numbers within the range of 2' to 34', and the actual angular modes corresponding to the relative angle numbers are 33 consecutive actual angular modes within the range of -7 to 41. The selection of the 33 actual angular modes is determined by the relationship between the width and the height, and the relative angle numbers and the actual angular modes correspond to each other one by one in order.
[0063] Exemplarily, in the embodiments of the present application, taking the case where the predetermined angle sampling point, that is, the number of angular directions is 33 as an example, the relationship between the predetermined width and height, the meaning of the start angular mode indicated by 2', the relative angle number, and the meaning indicating the actual angular mode are shown in Table 3.
[0064]
Table 3
[0065] In some embodiments of the present application, when the sampling of the predetermined angle sampling points is 129, the relative angle numbers are consecutive numbers within the range of 2' to 130', and the actual angle modes corresponding to the relative angle numbers are 129 consecutive actual angle modes within the range of -28 to 158. The selection of the 129 actual angle modes is determined by the relationship between the width and the height, and the relative angle numbers and the actual angle modes correspond to each other one-to-one in sequence.
[0066] Exemplarily, in the embodiments of the present application, taking the case where the predetermined angle sampling points, that is, the number of angle directions, is 129 as an example, the relationship between the predetermined width and height, the meaning of the starting angle mode indicated by 2', the relative angle numbers, and the meaning of the actual angle modes are shown in Table 4.
[0067]
Table 4
[0068] In the embodiments of the present application, the number of the predetermined angle sampling points is not limited.
[0069] The embodiments of the present application provide an intra prediction method. As shown in FIG. 4, the method includes: S101 of obtaining the relationship between the width and height of the reference block of the current block, the prediction direction range corresponding to the predetermined width and height relationship, and the predetermined angle sampling points; S102 of determining the actual angle mode corresponding to the reference block indicated by the relative angle number based on the relationship between the width and height, the prediction direction range corresponding to the predetermined width and height relationship, and the predetermined angle sampling points, and making the actual angle and the actual angle mode correspond to each other one-to-one; S103 of obtaining the angle prediction mode corresponding to the reference block based on the actual angle mode corresponding to the reference block; S104 of performing intra prediction on the current block based on the angle prediction mode, which may be included.
[0070] In the embodiments of the present application, the reference block is a data block that has completed intra prediction within a predetermined range where the current block is located, and there may be at least one reference block.
[0071] In addition, when the intra prediction device performs intra prediction, it includes at least one of luminance intra prediction and chrominance intra prediction. For luminance intra prediction, adjacent blocks are used as reference blocks. When performing chrominance intra prediction, the luminance block at the center position of the previous chrominance block can be used as a reference block. The chrominance prediction mode may include modes such as DM, LM, LM_T, and LM_L.
[0072] In some embodiments of the present application, the prediction mode includes at least one of the luminance intra prediction direction and the chrominance intra prediction direction.
[0073] As can be understood, when the prediction direction is the luminance intra prediction direction, the prediction direction of the reference block is the luminance direction. For S104, when performing intra prediction on the current block, actually, intra prediction is performed on the luminance of the current block. Similarly, when the prediction direction is the chrominance intra prediction direction, the prediction direction of the reference block is the chrominance direction. For S104, when performing intra prediction on the current block, actually, it is a process of performing intra prediction on the chrominance of the current block.
[0074] In S101, regardless of whether the intra prediction device performs luminance intra prediction or chrominance intra prediction, in the process of obtaining the prediction mode of the current block, the intra prediction device can obtain the relationship between the width and height of the reference block of the current block, the prediction direction range corresponding to the relationship between the predetermined width and height, and the predetermined angle sampling points.
[0075] In the embodiments of the present application, the relationship between the width and height of the reference block may be an aspect ratio or a vertical-horizontal ratio, and the embodiments of the present application do not limit this.
[0076] In an embodiment of the present application, the predicted direction range corresponding to the relationship between the predetermined width and height is an actual angle range including the number of continuous predetermined angle sampling points from the lower left diagonal direction to the upper right diagonal direction, which is obtained for different relationships between the width and height of one processing block.
[0077] In an embodiment of the present application, the number of predetermined angle sampling points is the number of sampling points from the lower left diagonal direction to the upper right diagonal direction.
[0078] In addition, the intra prediction device can obtain the relationship between the width and height of the reference block of the current block and the predicted direction range corresponding to the relationship between the predetermined width and height, determine the predetermined angle sampling points within each predicted direction range, and select the relative angle numbers of the predicted direction and the start angle.
[0079] Exemplarily, 65 types of angle intra prediction modes will be described as an example. The prediction directions of the 65 types of angle intra prediction modes are defined as -135 degrees (mode 2) to 45 degrees (mode 66) in the clockwise direction, where [2′, 66′] here are relative angle numbers.
[0080] In an embodiment of the present application, when the number of predetermined angle sampling points is constant, the lengths of the predicted direction ranges of all angle modes are the same. Regardless of the relationship between the width and height of the current block, all of them only include the angles (i.e., relative angle numbers) of the continuous predetermined number of angle sampling points therein. However, the actual angle mode for selecting this predetermined number of angle sampling points from the length of the predicted direction range is different depending on the relationship between the width and height.
[0081] In S102, after the intra prediction device obtains the relationship between the width and height of the reference block of the current block, the prediction direction range corresponding to the relationship between the predetermined width and height, and the predetermined angle sampling points, the intra prediction device determines the actual angle mode corresponding to the reference block indicated by the relative angle number based on the relationship between the width and height, the prediction direction range corresponding to the relationship between the predetermined width and height, and the predetermined angle sampling points. The actual angle and the actual angle mode can be in one-to-one correspondence. Specifically, it is realized by S1021 to S1023 below.
[0082] S1021. Determine the start angle of the angle mode of the reference block based on the relationship between the width and height and the prediction direction range corresponding to the relationship between the predetermined width and height.
[0083] S1022. Determine the angle offset range of the reference block based on the predetermined angle sampling points.
[0084] S1023. Determine the actual angle mode corresponding to the reference block indicated by the relative angle number based on the start angle and the angle offset range.
[0085] After the intra prediction device obtains the relationship between the width and height and the prediction direction range corresponding to the relationship between the predetermined width and height, it can determine the start angle of the angle mode of the reference block from the prediction direction range corresponding to the relationship between the predetermined width and height based on the relationship between the width and height. And the intra prediction device determines the angle offset range of the reference block based on the predetermined angle sampling points, and determines the actual angle mode corresponding to the reference block indicated by the relative angle number based on the start angle and the angle offset range. Then, the intra prediction device can select the actual angle mode within the angle offset range indicated by the relative angle number with the start angle as the start angle.
[0086] In some embodiments of the present application, the angle may be indicated by a relative angle number. Thereby, the intra prediction device determines the starting number of the relative angle of the starting angle of the angle mode of the reference block based on the relationship between the width and the height and the prediction direction range corresponding to the relationship between the predetermined width and the height, and determines that the angle offset range of the reference block is [0 to the number of predetermined angle sampling points - 1] based on the predetermined angle sampling points, and can determine the actual angle mode corresponding to the reference block indicated in sequence by consecutive numbers within the range of the relative angle numbers [2' to 66'] based on the starting number and the angle offset range.
[0087] Exemplarily, in the embodiments of the present application, taking the case where the predetermined angle sampling point is 65, that is, the number of angle directions is 65, the relationship between the predetermined width and the height, the meaning of the starting angle mode indicated by 2', the relative angle number, and the meaning indicating the actual angle mode are shown in Table 2.
[0088]
Table 5
[0089] As can be understood, in such a display method, referring to the actual angle mode display method in FIG. 3 of the L0279 proposal, the absolute numbers of all angle modes are shown in the range of [-14, 80], and regardless of the aspect ratio of the current coded block, all of them only include 65 consecutive angle numbers therein, but the selection range of these 65 angle numbers varies depending on the aspect ratio. In such a new display method, regardless of whether there is an expansion of the wide angle mode, the modes from the lower left diagonal direction to the upper right diagonal direction are all indicated by relative angle numbers 2' to 66'. However, since the starting angle numbers of the angle modes are different due to different aspect ratios, ultimately the number ranges of all angles will be in different intervals, but all are within the range of [-14, 80]. For example, when W / H = 2, the relative angle number in the lower left diagonal direction is 2', and actually it represents the first value in the starting angle + angle offset range, that is, the actual angle mode of 8 + 0 (indicating the actual angle with the angle number in FIG. 3), the relative angle number 3' represents the actual angle mode of 8 + 1 (the second value in the angle offset range) (that is, indicating mode 9 in FIG. 3),..., the relative angle number 66' represents the actual angle mode of 8 + 64 (the 65th value in the angle offset range) (that is, indicating mode 72 in FIG. 3). The display method of the embodiment of the present application is indicated by the same angle mode number in the luminance prediction process, so it can avoid the deviation between the angle direction of the MPM list storage mode and the angle direction of the actual adjacent block. At the same time, it can avoid the deviation between the luminance direction used at the center position of the current chrominance block in the chrominance prediction process and the actual luminance direction.
[0090] In addition, in the display method using the relative angle number according to the embodiment of the present application, during encoding, it is put into the bit stream in the form of a syntax element for transmission, that is, the relative angle number is put into the bit stream. During decoding, the decoder agrees on the meaning indicated by the relative angle numbers of different aspect ratios. Therefore, the actual angle mode corresponding to the received relative angle number can be analyzed according to the received relative angle number.
[0091] As can be understood, transmitting the relative angle number as a grammatical element of the angle mode number in the bit stream simplifies the acquisition of the true predicted angle in the wide angle mode by the encoder / decoder and helps improve the encoding / decoding efficiency.
[0092] In some embodiments of the present application, when the sampling of the predetermined angle sampling point is 33, the relative angle number is a continuous number within the range of 2' to 34', and the actual angle modes corresponding to the relative angle numbers are 33 continuous actual angle modes within the range of -7 to 41. The selection of the 33 actual angle modes is determined by the relationship between the width and the height, and the relative angle number and the actual angle mode correspond one-to-one in order.
[0093] Exemplarily, in the embodiments of the present application, taking the case where the predetermined angle sampling point, that is, the number of angle directions is 33 as an example, the relationship between the predetermined width and height, the meaning of the starting angle mode indicated by 2', the relative angle number, and the meaning of the actual angle mode are shown in Table 3.
[0094]
Table 6
[0095] In some embodiments of the present application, when the sampling of the predetermined angle sampling point is 129, the relative angle number is a continuous number within the range of 2' to 130', and the actual angle modes corresponding to the relative angle numbers are 129 continuous actual angle modes within the range of -28 to 158. The selection of the 129 actual angle modes is determined by the relationship between the width and the height, and the relative angle number and the actual angle mode correspond one-to-one in order.
[0096] Exemplarily, in the embodiments of the present application, taking the case where the predetermined angle sampling point, that is, the number of angle directions is 129 as an example, the relationship between the predetermined width and height, the meaning of the starting angle mode indicated by 2', the relative angle number, and the meaning of the actual angle mode are shown in Table 4.
[0097]
Table 7
[0098] In the embodiment of the present application, the number of sampling points at a predetermined angle is not limited.
[0099] In S103, the intra prediction device obtains an angle prediction mode corresponding to the reference block based on the actual angle mode corresponding to the reference block.
[0100] After the intra prediction device obtains the actual angle mode corresponding to the reference block, it can indicate the angle prediction mode (for example, dirA, dirB) corresponding to the reference block in the actual angle mode.
[0101] That is, in the embodiment of the present application, the angle prediction mode corresponding to the reference block obtained by the intra prediction device indicates that the actual angle corresponds one-to-one to the actual angle mode.
[0102] 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 of the current block based on the angle prediction mode, and then use the prediction mode list to realize the intra prediction for the current block.
[0103] In the embodiment of the present application, in the case of luminance intra prediction, the prediction mode list is an MPM list.
[0104] In the case of chrominance intra prediction, the prediction mode list is a DM list or an MDMS list.
[0105] Exemplarily, in luminance intra prediction, as shown in FIG. 5, reference blocks are determined from all adjacent blocks above the current block and all adjacent blocks to the left of the current block. For example, the left (L), above (A), bottom left (BL), top right (AR), and top left (AL) of the adjacent blocks of the current block are used as reference blocks in the reference block set. The derivation process of the MPM list considers the intra prediction modes (also referred to as intra prediction directions) of five adjacent blocks of the current block, namely the left (L) block, the above (A) block, the bottom left (BL) block, the top right (AR) block, and the top left (AL) block.
[0106] The candidate prediction directions of the MPM list are divided into three groups, namely the adjacent prediction mode, the derived prediction mode, and the default prediction mode. First, the adjacent prediction mode is added to the MPM list. Each type of intra prediction mode can only be added to the MPM list once, that is, the MPM list cannot contain duplicate prediction modes. After completing the addition of the adjacent prediction mode, if the number of prediction modes included in the MPM list is less than six, the derived intra prediction mode is added to the MPM list. After completing the addition of the derived prediction mode, if the number of prediction modes included in the MPM list is still less than six, the default prediction mode is added to the MPM list until an MPM list containing six of the most likely intra prediction modes is derived.
[0107] When performing entropy coding for the intra prediction mode of each luminance block, first, obtain the MPM list of the luminance block, and determine whether the intra prediction mode selected by the luminance block is in the MPM list. If it is in the MPM list, use the truncated binary code to binaryize the index number in the MPM of the prediction mode. The smaller the index number, the smaller the generated truncated binary code. Then, the truncated binary code is encoded by the arithmetic encoder, thereby saving bit overhead. If the intra prediction mode selected by the luminance block is one of the remaining 61 prediction modes not located in the MPM list, re-number these 61 prediction modes from 0, and select 16 prediction modes that are divisible by 4 as the selection modes. If the intra prediction mode is located in the selection modes, bypass coding is performed with a fixed 4-bit length. If the intra prediction mode is located in the remaining 45 non-selection modes, re-number it again, binaryize it with the truncated binary code, generate a 5- or 6-bit length bit string based on the order of the numbers, and then perform bypass coding.
[0108] Since the 6MPM list in JEM is relatively complex, some people propose a solution using a simplified 3MPM list. However, since the number of prediction modes included in the 3MPM list is relatively small and the obtained prediction effect is not very accurate, some people propose using a simplified 6MPM list (which is also the method used in the current VTM3.0). For example, based on the prediction mode corresponding to the upper (A) block and the prediction mode corresponding to the left (L) block in FIG. 5, construct a new candidate prediction mode for the current block, and the structure of the MPM list is When the reference line index used for the current block is 0, · If the prediction modes dirL and dirA of block L and block A are equal and neither is an angular mode, MPM = {dirL, Planar / DC, HOR 18th, VER 50th, VER - 4, VER + 4}, where Planar corresponds to 0, DC corresponds to 1, MPM must contain exactly 6 modes, adding 1 to an adjacent mode or subtracting 1 from an adjacent mode, · If the prediction modes of block L and block A are equal and both are angular modes, MPM = {dirL, Planar / DC, dirL - 1, dirL + 1, dirL - 2, dirL + 2}, · If the prediction modes of block L and block A are not equal and both are angular modes, MPM = {dirL, dirA, Planar / DC, max(dirL, dirA) - 1, max(dirL, dirA) + 1, max(dirL, dirA) - 2}, · If the prediction modes of block L and block A are not equal and there is only one angular mode, MPM = {dirL, dirA, Planar / DC, dirL - 1, dirL + 1, dirL - 2}, · If the prediction modes of block L and block A are not equal and neither is an angular mode, MPM = {dirL, dirA, HOR, VER, HOR - 4, HOR + 4}, When the reference line index is 1 or 3, · If neither of the prediction modes dirL and dirA of block L and block A is an angular mode, MPM = {VER, HOR, 2, DIA, VDIA, 26}, · If both of the prediction modes dirL and dirA of block L and block A are angular modes, MPM = {dirL, dirA, min(dirL, dirA) - 1, min(dirL, dirA) + 1, max(dirL, dirA) - 1, max(dirL, dirA) + 1…}, · If there is one angular mode (indicated by dir) in the prediction modes dirL and dirA of block L and block A, then MPM = {dir, dir - 1, dir + 1, dir - 1, dir + 2, dir - 3}.
[0109] In the embodiments of the present application, regarding the construction method of the chrominance intra prediction direction in DM and VVC draft 3 in chrominance intra prediction, the related description of this method is shown in Table 5.
[0110]
Table 8
[0111] Exemplarily, FIG. 6 is a distribution schematic diagram of the luminance block and chrominance block corresponding to the current block according to the embodiment of the present application. As shown in FIG. 6, the gray area in the left half of the right square is the current processed chrominance block 71, and the gray area in the left half of the left square is the luminance area corresponding to the current processed chrominance block 71. When performing intra prediction on the current chrominance block 71, the prediction direction recorded at the center position of the luminance area, that is, the prediction direction of the CR luminance block 701 in the right square of FIG. 6, is used.
[0112] According to the content shown in Table 5 and FIG. 6, it can be seen that if the prediction direction obtained by DM is the same as one of the latter four types of prediction directions, the same modes in rows 3 - 6 will be replaced by the prediction direction with index number 66.
[0113] Regarding MDMS of chrominance intra prediction, MDMS is a more complex construction method for chrominance intra prediction direction. As shown in Table 6, compared with DM, the code rate decreases by 0.2%, but due to the excessive complexity, it has not yet been applied to VVC.
[0114]
Table 9
[0115] As shown in FIG. 7, as shown in the left blocks 801 to 805 in FIG. 7, the MDMS mode in Table 6 is the intra prediction mode of the corresponding luminance blocks at five positions: the center CR, top left TL, top right TR, bottom left BL, and bottom right BR of the currently used chrominance block. As shown in the right blocks 806 to 810 in FIG. 7, the chrominance adjacent block mode in Table 6 means that the used chrominance block is adjacent in the spatial left, top left, bottom left, top, and top right block intra prediction directions, that is, the prediction directions written into the bitstream.
[0116] That is, in the embodiments of the present application, the intra prediction device can not only perform luminance intra prediction, but also perform chrominance intra prediction.
[0117] As can be understood, for all rectangular blocks related to the present application, the angle mode uses the relative angle number, and successively shows the corresponding actual angle mode after successively adding the start angle and the angle offset range, and unifies it within a certain interval of [start value angle + angle offset range lower limit, start value angle + angle offset range upper limit]. In the display method of the embodiments of the present application, different start angles are set based on the relationship between the widths and heights of different reference blocks, and the old angle mode numbers are used as the meaning indicating the new angle mode, and the angle mode corresponds one-to-one to the angle. In this way, the angle mode numbers of rectangular blocks with various width and height relationships are unified, and the angle directions and actual angles expressed in the luminance MPM list and chrominance prediction DM are consistent, simplifying the angle conversion in related wide angle modes, unifying the meaning of the angle values represented by each mode, removing deviations, and helping to improve the accuracy of intra prediction.
[0118] Furthermore, transmitting the angle offset number as a syntax element of the angle mode number in the bitstream simplifies the acquisition of the true prediction angle in the wide angle mode by the encoder / decoder and helps to improve the encoding / decoding efficiency.
[0119] Based on the implementation of the above embodiments, an embodiment of the present application provides an intra prediction device, which includes a setting unit configured to set an actual angle mode indicated by a relative angle number. The relative angle number indicates, in a prediction direction range corresponding to a relationship between a predetermined width and height, the corresponding actual angle modes in sequence after sampling from a start angle at a predetermined angle sampling point. The start angle is determined by a relationship between the width and height of a processing block and the prediction direction range corresponding to the relationship between the predetermined width and height, and the actual angle corresponds one-to-one to the actual angle mode.
[0120] In some embodiments of the present application, when the sampling of the predetermined angle sampling point is 65, the relative angle number is a continuous number within the range of 2' to 66', and the actual angle modes corresponding to the relative angle numbers are 65 continuous actual angle modes within the range of -14 to 80. The selection of the 65 actual angle modes is determined by the relationship between the width and height, and the relative angle number and the actual angle mode correspond one-to-one in sequence.
[0121] In some embodiments of the present application, when the sampling of the predetermined angle sampling point is 33, the relative angle number is a continuous number within the range of 2' to 34', and the actual angle modes corresponding to the relative angle numbers are 33 continuous actual angle modes within the range of -7 to 41. The selection of the 33 actual angle modes is determined by the relationship between the width and height, and the relative angle number and the actual angle mode correspond one-to-one in sequence.
[0122] In some embodiments of the present application, when the sampling of the predetermined angle sampling point is 129, the relative angle number is a continuous number within the range of 2' to 130', and the actual angle modes corresponding to the relative angle numbers are 129 continuous actual angle modes within the range of -28 to 158. The selection of the 129 actual angle modes is determined by the relationship between the width and height, and the relative angle number and the actual angle mode correspond one-to-one in sequence.
[0123] Based on the implementation of the above embodiments, as shown in FIG. 8, an embodiment of the present application further provides an intra prediction device 1. An acquisition unit 10 configured to obtain the relationship between the width and height of the reference block of the current block, the predicted direction range corresponding to the relationship between the predetermined width and height, and the predetermined angle sampling points; A determination unit 11 configured to determine the actual angle mode corresponding to the reference block indicated by the relative angle number based on the relationship between the width and height, the predicted direction range corresponding to the relationship between the predetermined width and height, and the predetermined angle sampling points, and to correspond the actual angle and the actual angle mode one-to-one; An intra prediction unit 12 configured to perform intra prediction on the current block based on the angle prediction mode, and comprising: The acquisition unit 10 is further configured to obtain the angle prediction mode corresponding to the reference block based on the actual angle mode corresponding to the reference block.
[0124] In some embodiments of the present application, the determination unit 11 is specifically configured to determine the start angle of the angle mode of the reference block based on the relationship between the width and height and the predicted direction range corresponding to the relationship between the predetermined width and height, determine the angle offset range of the reference block based on the predetermined angle sampling points, and determine the actual angle mode corresponding to the reference block indicated by the relative angle number based on the start angle and the angle offset range.
[0125] In some embodiments of the present application, the intra prediction unit 12 is specifically configured to construct a prediction mode list of the current block based on the angle prediction mode, and use the prediction mode list to realize intra prediction on the current block.
[0126] In some embodiments of the present application, the intra prediction includes at least one of luminance intra prediction and chrominance intra prediction.
[0127] As shown in FIG. 9, the embodiment of the present application further provides an intra prediction device. A processor 13, a memory 14 in which an intra prediction instruction executable by the processor 13 is stored, and a communication bus 15 for connecting the processor 13 and the memory 14, and when the intra prediction instruction is executed, the intra prediction method is realized.
[0128] In an embodiment of the present application, the processor 13 may be at least one of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor. As can be understood, for different devices, the electronic device for realizing the processor function may be other, and the embodiments of the present application do not specifically limit. The intra prediction device may further include a memory 14, the memory 14 may be connected to the processor 13, the memory 14 is used to store executable program codes, the program codes include computer operation instructions, the memory 14 may be a volatile memory such as a random access memory (RAM), or a non-volatile memory such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD), or a combination of the above types of memories, and provides instructions and data to the processor 13.
[0129] In the embodiment of the present application, the communication bus 15 is used for connecting the processor 13 and the memory 14 and for communication between these devices.
[0130] Also, each functional module of this embodiment may be integrated into one processing unit, each unit may physically exist independently, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional module.
[0131] When the integrated unit is implemented in the form of a software functional module and is sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the essence of the technical solution of this embodiment or the part that contributes to the prior art, or all or part of the technical solution may be embodied in the form of a software product. The computer software product may include several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) or a processor to execute all or part of the steps of the method of this embodiment in one storage medium. And the above storage medium includes various media that can store program codes, such as a USB memory, a portable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0132] The embodiment of the present application provides a computer-readable storage medium in which an intra prediction instruction is stored. When the intra prediction instruction is executed by a processor, the above intra prediction method is realized.
[0133] Specifically, the intra prediction instruction corresponding to the intra prediction method according to this embodiment may be stored in a storage medium such as an optical disk, a hard disk, or a USB memory. When the intra prediction instruction corresponding to the intra prediction method in the storage medium is read or executed by an electronic device, the steps of obtaining the relationship between the width and height of the reference block of the current block, the corresponding relationship between the relationship of a predetermined width and height, the relative angle, and the predetermined absolute angle range, and determining the actual angle mode corresponding to the reference block based on the relationship between the width and height, the corresponding relationship between the relationship of the predetermined width and height, the relative angle, and the predicted absolute angle range, and making the actual angle and the actual angle mode correspond one-to-one, and 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, are included.
[0134] As can be understood, in the intra prediction process, the intra prediction device can process reference blocks with different width and height relationships in a unified actual angle mode method, and make the actual angle and the actual angle mode correspond one-to-one. Then, in both the luminance prediction process and the chrominance prediction process, when indicating a certain angle, the angle mode of each shaped block is specifically determined based on the aspect ratio. Simplify the angle conversion in the related wide angle mode, unify the meaning of the angle values represented by each mode, remove the deviation, effectively improve the accuracy of intra prediction, and improve the encoding / decoding efficiency.
[0135] As can be understood by those skilled in the art, the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application may use the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware. And the present application may also use the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk memories and optical memories, etc.) containing computer-usable program codes.
[0136] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. As can be understood, each process and / or block in the flowchart and / or block diagram can be realized by computer program instructions, as well as combinations of processes and / or blocks in the flowchart and / or block diagram. These computer program instructions can be provided to the processor of a general-purpose computer, a dedicated computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the functions specified in one or more processes in the implementation flowchart and / or one or more blocks in the block diagram are realized by the instructions executed by the processor of the computer or other programmable data processing device, thereby generating an apparatus for realizing the functions.
[0137] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, thereby generating a manufactured product comprising an instruction device stored in the computer-readable memory. The instruction device realizes the functions specified in one or more processes in the implementation flowchart and / or one or more blocks in the block diagram.
[0138] These computer program instructions may further be installed in a computer or other programmable data processing device, thereby generating a process implemented by the computer by executing a series of operation steps in the computer or other programmable device. Thus, the instructions executed in the computer or other programmable device provide steps for realizing the functions specified in one or more processes in the implementation flowchart and / or one or more blocks in the block diagram.
[0139] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Industrial Applicability
[0140] The embodiments of the present application provide an intra prediction method and apparatus, and a computer storage medium. In the intra prediction process, the intra prediction apparatus processes reference blocks with different width-to-height relationships in a unified actual angle mode, so that the actual angle and the actual angle mode can be made to correspond one-to-one. Then, in both the luminance prediction process and the chrominance prediction process, when indicating a certain angle, the angle mode of each shaped block is specifically determined based on the aspect ratio. This simplifies the angle conversion in the related wide-angle mode, unifies the meaning of the angle values represented by each mode, removes deviations, effectively improves the accuracy of intra prediction, and improves the encoding / decoding efficiency.
Claims
1. 1. An intra prediction method applied to a decoder, comprising: determining at least one neighboring block of the current block; determining a first intra-prediction mode number of at least one neighboring block; constructing an intra-prediction mode list corresponding to a current block based on a first intra-prediction mode number of at least one neighboring block; determining a first intra-prediction mode number of a current block based on the intra-prediction mode list; obtaining an aspect ratio of the current block, and mapping a first intra-prediction mode number of the current block to a second intra-prediction mode number in a wide-angle intra-prediction mode according to the aspect ratio; predicting the current block based on a target intra-prediction mode corresponding to a second intra-prediction mode number of the current block to obtain a predicted block; determining a reconstructed block of the current block based on the predicted block and a residual block; the at least one neighboring block of the current block includes one or more of a left neighboring block and an upper neighboring block corresponding to the current block; Mapping a first intra prediction mode number of the current block to a second intra prediction mode number in a wide-angle intra prediction mode based on the aspect ratio includes: When the width-to-height ratio is 2, if the value of the first intra-prediction mode number is less than 8, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; When the width-to-height ratio is 4, if the value of the first intra-prediction mode number is less than 12, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; When the width-to-height ratio is 8, if the value of the first intra-prediction mode number is less than 14, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; When the width-to-height ratio is 16, if the value of the first intra-prediction mode number is less than 16, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; The second intra-prediction mode number has a value range of 8 to 80.
2. The method further comprises: obtaining a reconstructed block of the at least one neighboring block, the reconstructed block being obtained by predicting based on a wide-angle intra prediction mode corresponding to a second intra prediction mode number of the at least one neighboring block, the second intra prediction mode number of the at least one neighboring block being obtained by mapping the first intra prediction mode number of the at least one neighboring block to an intra prediction mode number in a wide-angle prediction mode based on an aspect ratio of the at least one neighboring block; The method of claim 1 , further comprising: obtaining a prediction block according to a reconstructed block of the at least one neighboring block based on a target intra-prediction mode corresponding to a second intra-prediction mode number of the current block.
3. Mapping a first intra prediction mode number of the current block to a second intra prediction mode number in a wide-angle intra prediction mode based on the aspect ratio includes:
2. The method of claim 1 , further comprising: determining the second intra-prediction mode number based on a second preset value and the first intra-prediction mode number when the height of the current block is greater than its width and the ratio of the height to the width is 2 or greater.
4. The method of claim 1 or 3, further comprising skipping mapping the first intra-prediction mode number of the current block to the second intra-prediction mode number in a wide-angle intra-prediction mode based on the aspect ratio if the width of the current block is equal to the height.
5. If the height of the current block is greater than the width and the ratio of the height to the width is 2 or greater, When the height to width ratio is 2, if the value of the first intra prediction mode number is greater than 60, the second intra prediction mode number is determined according to a difference between the first intra prediction mode number and a second preset value of 67; When the height to width ratio is 4, if the value of the first intra prediction mode number is greater than 58, the second intra prediction mode number is determined according to a difference between the first intra prediction mode number and a second preset value of 67; When the height to width ratio is 8, if the value of the first intra prediction mode number is greater than 56, the second intra prediction mode number is determined according to a difference between the first intra prediction mode number and a second preset value of 67; When the height to width ratio is 16, if the value of the first intra prediction mode number is greater than 54, the second intra prediction mode number is determined according to a difference between the first intra prediction mode number and a second preset value of 67; The method of claim 3 , wherein the second intra-prediction mode number has a value range of −14 to 60.
6. If the width of the current block is greater than the height and the ratio of the width to the height is 2 or more, the second intra prediction mode number is determined according to the following table: 【Table 1】 If the height of the current block is greater than the width and the ratio of the height to the width is 2 or more, the second intra prediction mode number is determined according to the following table: 【Table 2】 The method of claim 3 , wherein in each table, the first intra-prediction mode numbers are mapped in a one-to-one manner to corresponding second intra-prediction mode numbers in sequence.
7. 1. An intra prediction method applied to an encoder, comprising: determining at least one neighboring block of the current block; determining a first intra-prediction mode number of at least one neighboring block; constructing an intra-prediction mode list corresponding to a current block based on a first intra-prediction mode number of at least one neighboring block; determining a first intra-prediction mode number of a current block based on the intra-prediction mode list; obtaining an aspect ratio of the current block, and mapping a first intra-prediction mode number of the current block to a second intra-prediction mode number in a wide-angle intra-prediction mode according to the aspect ratio; predicting the current block based on a target intra-prediction mode corresponding to a second intra-prediction mode number of the current block to obtain a predicted block; determining a reconstructed block of the current block based on the predicted block and a residual block; the at least one neighboring block of the current block includes one or more of a left neighboring block and an upper neighboring block corresponding to the current block; Mapping a first intra prediction mode number of the current block to a second intra prediction mode number in a wide-angle intra prediction mode based on the aspect ratio includes: When the width-to-height ratio is 2, if the value of the first intra-prediction mode number is less than 8, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; When the width-to-height ratio is 4, if the value of the first intra-prediction mode number is less than 12, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; When the width-to-height ratio is 8, if the value of the first intra-prediction mode number is less than 14, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; When the width-to-height ratio is 16, if the value of the first intra-prediction mode number is less than 16, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; The second intra-prediction mode number has a value range of 8 to 80.
8. 1. An intra prediction method applied to a decoder, comprising: determining a plurality of neighboring blocks of a current block; determining a first intra-prediction mode for the plurality of neighboring blocks; constructing an intra prediction mode list for a current block based on the first intra prediction modes of the neighboring blocks if the first intra prediction mode is an angular prediction mode; determining a first intra-prediction mode number of a current block based on the constructed intra-prediction mode list; obtaining an aspect ratio of the current block, and mapping a first intra-prediction mode number of the current block to a second intra-prediction mode number in a wide-angle prediction mode according to the aspect ratio of the current block; predicting the current block based on a target intra-prediction mode corresponding to a second intra-prediction mode number of the current block to obtain a predicted block; determining a reconstructed block of the current block based on the predicted block and a residual block; the neighboring blocks of the current block include a left neighboring block and / or an upper neighboring block corresponding to the current block; Mapping a first intra prediction mode number of the current block to a second intra prediction mode number in a wide angle prediction mode based on an aspect ratio of the current block, When the width-to-height ratio is 2, if the value of the first intra-prediction mode number is less than 8, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; When the width-to-height ratio is 4, if the value of the first intra-prediction mode number is less than 12, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; When the width-to-height ratio is 8, if the value of the first intra-prediction mode number is less than 14, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; When the width-to-height ratio is 16, if the value of the first intra-prediction mode number is less than 16, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; The second intra-prediction mode number has a value range of 8 to 80.
9. obtaining a reconstructed block of the neighboring blocks, the reconstructed block being obtained by predicting based on a wide-angle intra prediction mode corresponding to a second intra prediction mode number of the neighboring blocks, the second intra prediction mode number of the neighboring blocks being obtained by mapping the first intra prediction mode number of the neighboring blocks to an intra prediction mode number in the wide-angle prediction mode based on an aspect ratio of the neighboring blocks; The method of claim 8 , further comprising obtaining a prediction block according to a target intra-prediction mode corresponding to a second intra-prediction mode number of the current block and depending on reconstructed blocks of the plurality of neighboring blocks.
10. The method further comprises: determining a maximum and / or minimum value in a first intra prediction mode of the plurality of neighboring blocks; 9. The method of claim 8, further comprising: constructing an intra-prediction mode list for the current block based on one or more of the first intra-prediction modes of the neighboring blocks, a maximum value and a minimum value among the first intra-prediction modes of the neighboring blocks.
11. The method further comprises: Calculating at least one actual angle prediction mode using one or more of the first intra prediction modes of the neighboring blocks, a maximum value and a minimum value of the first intra prediction modes of the neighboring blocks as a relative angle prediction mode; and building an intra-prediction mode list for the current block based on the at least one actual angular prediction mode.
12. The method further comprises: The method of claim 11 , comprising: obtaining the at least one actual angle prediction mode based on a preset offset value and the relative angle prediction mode, and the preset offset value being 1 or 2.
13. The method further comprises: The method of claim 12 , further comprising: calculating a sum / difference between the relative angle prediction mode and the preset offset value, and determining the actual angle prediction mode based on a calculation result.
14. Mapping a first intra prediction mode number of the current block to a second intra prediction mode number in a wide angle prediction mode based on an aspect ratio of the current block, 9. The method of claim 8, further comprising: determining the second intra-prediction mode number based on a second preset value and the first intra-prediction mode number when the height of the current block is greater than its width and the ratio of the height to the width is 2 or greater.
15. The method of claim 8 , further comprising skipping mapping the first intra-prediction mode number to a second intra-prediction mode number in a wide-angle intra-prediction mode based on the aspect ratio if the width of the current block is equal to the height.
16. If the height of the current block is greater than the width and the ratio of the height to the width is 2 or greater, When the height to width ratio is 2, if the value of the first intra prediction mode number is greater than 60, the second intra prediction mode number is determined according to a difference between the first intra prediction mode number and a second preset value of 67; When the height to width ratio is 4, if the value of the first intra prediction mode number is greater than 58, the second intra prediction mode number is determined according to a difference between the first intra prediction mode number and a second preset value of 67; When the height to width ratio is 8, if the value of the first intra prediction mode number is greater than 56, the second intra prediction mode number is determined according to a difference between the first intra prediction mode number and a second preset value of 67; When the height to width ratio is 16, if the value of the first intra prediction mode number is greater than 54, the second intra prediction mode number is determined according to a difference between the first intra prediction mode number and a second preset value of 67; The method of claim 14 , wherein the second intra-prediction mode number has a value range of −14 to 60.
17. If the width of the current block is greater than the height and the ratio of the width to the height is 2 or more, the second intra prediction mode number is determined according to the following table: 【Table 3】 If the height of the current block is greater than the width and the ratio of the height to the width is 2 or more, the second intra prediction mode number is determined according to the following table: 【Table 4】 The method of claim 16 , wherein in each table, the first intra-prediction mode numbers are mapped in a one-to-one manner to corresponding second intra-prediction mode numbers in sequence.
18. 1. An intra prediction method applied to an encoder, comprising: determining a plurality of neighboring blocks of a current block; determining a first intra-prediction mode for the plurality of neighboring blocks; constructing an intra prediction mode list for a current block based on the first intra prediction modes of the neighboring blocks if the first intra prediction mode is an angular prediction mode; determining a first intra-prediction mode number of a current block based on the constructed intra-prediction mode list; obtaining an aspect ratio of the current block, and mapping a first intra-prediction mode number of the current block to a second intra-prediction mode number in a wide-angle prediction mode according to the aspect ratio of the current block; predicting the current block based on a target intra-prediction mode corresponding to a second intra-prediction mode number of the current block to obtain a predicted block; determining a reconstructed block of the current block based on the predicted block and a residual block; the neighboring blocks of the current block include a left neighboring block and / or an upper neighboring block corresponding to the current block; Mapping a first intra prediction mode number of the current block to a second intra prediction mode number in a wide angle prediction mode based on an aspect ratio of the current block, When the width-to-height ratio is 2, if the value of the first intra-prediction mode number is less than 8, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; When the width-to-height ratio is 4, if the value of the first intra-prediction mode number is less than 12, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; When the width-to-height ratio is 8, if the value of the first intra-prediction mode number is less than 14, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; When the width-to-height ratio is 16, if the value of the first intra-prediction mode number is less than 16, the second intra-prediction mode number is determined by the sum of the first intra-prediction mode number and a first preset value of 65; The second intra-prediction mode number has a value range of 8 to 80.
19. A decoder comprising a unit for implementing the method according to any one of claims 1 to 3 and 8 to 10.
20. An encoder comprising a unit for carrying out the method according to claim 7 or 18.
Citation Information
Patent Citations
Intra prediction method and device, and computer-readable storage medium
JP2025090829A
Intra prediction method and apparatus, computer-readable storage medium
JP7439219B2
An encoding apparatus for signaling an extension directional intra-prediction mode within a set of directional intra-prediction modes
WO2018117894A1
Video and image coding with wide-angle intra prediction
WO2018127624A1
Video signal processing method and apparatus
WO2019083284A1
Cited By
Intra prediction method and device, and computer-readable storage medium
JP2025090829A