Intra prediction method and apparatus, computer-readable storage medium
By using relative angle numbers to represent the actual angle mode in video encoding and determining the starting angle and angle offset range based on the width and height relationship of the block, the problems of complex angle conversion and inaccurate prediction in wide angle mode in video encoding are solved, and higher prediction accuracy and coding efficiency are achieved.
Patent Information
- Application Number
- JP2024018620
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-02-09
- Publication Date
- 2025-04-02
- Estimated Expiration
- 2039-01-02
AI Technical Summary
In video encoding, especially in the brightness prediction process in H.266 or Versatile Video Coding (VVC) standard, the actual angle mode of the block in the wide angle mode is different from the original mode, resulting in complex angle conversion, and the angle mode of the brightness block in the color prediction process is inconsistent with the actual angle mode of the color block, resulting in inaccurate prediction.
By setting the relative angle number to represent the actual angle mode, the relative angle number is arranged from the starting angle in a given angle sampling point in a certain relationship, the one-to-one correspondence between the actual angle mode and the relative angle number is determined, and the starting angle and angle offset range are determined based on the width and height relationship of the block and the predicted direction range, thereby determining the actual angle mode.
The unified processing of different aspect ratio blocks in video encoding is realized, angle conversion in wide angle mode is simplified, deviation in angle mode is eliminated, the accuracy of brightness and color prediction is improved, and the efficiency of encoding/decoding is improved.
Smart Images

Figure 0007656105000014 
Figure 0007656105000015 
Figure 0007656105000016
Abstract
Description
[Technical field]
[0001] TECHNICAL FIELD Embodiments of the present application relate to intra prediction techniques in the field of video coding, and in particular to an intra prediction method and apparatus, and a computer storage medium. [Background technology]
[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 entropy-coded bits, an MPM list is constructed to store the prediction modes of neighboring blocks. According to the principle that the spatial similarity of neighboring blocks is high, the selected prediction mode of the current block is more likely to be the same as a mode in the MPM list, so the prediction mode of the current block can be coded with fewer bits. However, due to the existence of wide-angle modes of non-rectangular blocks, the actual angle direction represented by the angle mode number may differ from the original meaning, and therefore, in the MPM list, the angle modes with the same number may represent different prediction directions for the neighboring blocks and the current block, and there are various situations, which affect 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, and regardless of whether the prediction mode of the luminance block is a wide-angle mode, the DM mode uses the original angle mode number. Therefore, there may be deviation between the angle mode actually used by the chrominance block and the angle mode of the corresponding luminance block, that is, in the wide angle mode, the angle mode number may correspond to different actual angle modes, so that the angle conversion in the luminance prediction process is relatively complicated, and there is also deviation in the angle mode of the luminance block used by the chrominance prediction, resulting in inaccurate prediction. Summary of the Invention [Problem to be solved by the invention]
[0003] SUMMARY OF THE DISCLOSURE The embodiments of the present application provide an intra prediction method and apparatus, and a computer-readable storage medium, which can effectively improve the accuracy of intra prediction and improve 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, the method comprising: setting an actual angle mode indicated by a relative angle number, the relative angle number sequentially indicating the corresponding actual angle mode after sampling at a predetermined angle sampling point from a start angle within a predicted direction range corresponding to a predetermined width-height relationship, the start angle being determined by a width-height relationship of a processing block and a predicted direction range corresponding to the predetermined width-height relationship, and the actual angle having a one-to-one correspondence with 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 consecutive number within the range of 2' to 66', and the actual angle modes corresponding to the relative angle numbers are 65 consecutive actual angle modes within the range of -14 to 80, and the selection of the 65 actual angle modes is determined according to the relationship between width and height, and the relative angle numbers and the actual angle modes correspond one-to-one in order.
[0007] In the above solution, when the sampling of the predetermined angle sampling point is 33, the relative angle number is a consecutive number within the range of 2' to 34', and the actual angle modes corresponding to the relative angle numbers are 33 consecutive actual angle modes within the range of -7 to 41, and the selection of the 33 actual angle modes is determined according to the relationship between width and height, and the relative angle numbers and the actual angle modes correspond one-to-one in order.
[0008] In the above solving means, when the sampling of the predetermined angle sampling point is 129, the relative angle number is a consecutive number 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 according to the relationship between the width and the height, and the relative angle numbers and the actual angle modes correspond one-to-one in order.
[0009] An embodiment of the present application further provides an intra prediction method, Obtaining a width-height relationship of a reference block of a current block, a prediction direction range corresponding to the predetermined width-height relationship, and a predetermined angle sampling point; determining an actual angle mode corresponding to the reference block indicated by a relative angle number based on the width-height relationship, a prediction direction range corresponding to the predetermined width-height relationship, and the predetermined angle sampling point, and making an actual angle correspond to the actual angle mode in one-to-one correspondence; obtaining an angular prediction mode corresponding to the reference block according to an actual angular mode corresponding to the reference block; performing intra prediction on the current block based on the angular prediction mode.
[0010] In the above solving means, determining an actual angle mode corresponding to the reference block indicated by a relative angle number based on the width-height relationship, a prediction direction range corresponding to the predetermined width-height relationship, and the predetermined angle sampling point, determining a start angle of an angle mode of the reference block based on the width-height relationship and a prediction direction range corresponding to the predetermined width-height relationship; determining an angular offset range for the reference block based on the predetermined angular sampling points; determining the actual angle mode corresponding to the reference block indicated by a relative angle number based on the start angle and the angle offset range.
[0011] In the above solving method, performing intra prediction on the current block based on the angular prediction mode includes: constructing a prediction mode list for the current block based on the angular prediction mode; and performing intra prediction for the current block using the prediction mode list.
[0012] In the above-mentioned solution, the intra prediction includes at least one of luma intra prediction and chroma intra prediction.
[0013] An embodiment of the present application provides an intra prediction device, The present invention comprises a processor, a memory in which intra prediction instructions executable by the processor are stored, and a communication bus for connecting the processor and the memory, and the above-mentioned intra prediction method is realized when the intra prediction instructions are executed.
[0014] An embodiment of the present application provides a computer-readable storage medium, in which intra prediction instructions are stored, and when the intra prediction instructions are executed by a processor, the above intra prediction method is realized. Effect of the Invention
[0015] In the embodiment of the present application, according to the above technical solution, the intra prediction device processes reference blocks with different width and height relationships in a unified actual angle mode manner in an intra prediction process, and can have one-to-one correspondence between the actual angle and the actual angle mode. Then, when a certain angle is indicated in both the luma prediction process and the chroma prediction process, the angle mode of each shape block is specifically determined based on the aspect ratio. The angle conversion in the related wide angle mode is simplified, the meaning of the angle value represented by each mode is unified, deviation is eliminated, and the accuracy of intra prediction is effectively improved, and the encoding / decoding efficiency is improved. [Brief description of the drawings]
[0016] [Figure 1]FIG. 1 is a schematic diagram of 67 types of intra prediction modes supported by VVC according to an embodiment of the present application. [Figure 2A] FIG. 2A is a structural schematic diagram of a video encoding system according to an embodiment of the present application. [Figure 2B] FIG. 2B is a structural schematic diagram of a video decoding system according to an embodiment of the present application. [Diagram 3] FIG. 3 is a schematic diagram of an exemplary intra-prediction mode in a wide-angle mode according to an embodiment of the present application. [Figure 4] FIG. 4 is a flowchart of an intra prediction method according to an embodiment of the present application. [Diagram 5] FIG. 5 is a schematic diagram of exemplary adjacent intra prediction modes according to an embodiment of the present application. [Figure 6] FIG. 6 is a distribution diagram 1 of a luma block and a chroma block corresponding to an exemplary current block according to an embodiment of the present application. [Figure 7] FIG. 7 is a distribution diagram 2 of a luma block and a chroma block corresponding to an exemplary current block according to an embodiment of the present application. [Figure 8] FIG. 8 is a structural schematic diagram 1 of an intra-prediction device according to an embodiment of the present application. [Figure 9] FIG. 9 is a structural schematic diagram 2 of an intra-prediction device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0017] The technical solutions of the embodiments of the present application will be described below clearly and completely with reference to the drawings of the embodiments of the present application. It should be understood that the specific embodiments described herein are for illustrating the related application, not for limiting the present application. For ease of description, only the relevant parts of the related application are shown in the drawings.
[0018] First, the terms used in this application will be explained below.
[0019] VVC / H.266 is the next generation video encoding standard.
[0020] VTM (The Test Model of VVC) is the reference software test platform for VVC.
[0021] MPM (Most Probable Modes) are the most possible modes.
[0022] DM (direct mode) is a chromaticity prediction mode.
[0023] VER is a vertical direction angular prediction mode, which corresponds to the intra prediction mode numbered 50 in VTM3.0.
[0024] HOR is a horizontal angle prediction mode, which corresponds to the intra prediction mode numbered 18 in VTM3.0.
[0025] DIA is a diagonal angular prediction mode, which corresponds to the intra prediction mode numbered 34 in VTM3.0.
[0026] VDIA is a opposite angle prediction mode, and corresponds to the intra prediction mode numbered 66 in VTM3.0.
[0027] In the embodiment of the present application, the function of predictive coding is to construct a predicted value of a current block using a spatially or temporally existing reconstructed image in video coding, and transmit only the difference between the original value and the predicted value to achieve the purpose of reducing the amount of transmission data. In luma prediction, the original value and the predicted value here may be an original luma value and a predicted luma value, and in chroma prediction, the original value and the predicted value here may be an original chroma value and a predicted chroma value.
[0028] The function of intra prediction is to construct a prediction value of a current block using a pixel unit in the previous row and a pixel unit in the left column adjacent to the current block, and to predict each pixel unit of the current block using the reconstructed neighboring pixels around the current block (i.e., the pixel unit in the previous row and the pixel unit in the left column adjacent to the current block).
[0029] For example, when the current block is a luminance block and the luminance prediction value of the current block is constructed using adjacent pixels, luminance prediction is performed on the current block in sequence using multiple 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 of the corresponding prediction direction on the current block. A target prediction direction is determined from the multiple prediction directions based on each evaluation parameter value, for example, a prediction direction that can obtain the smallest number of image coding bits under the premise of ensuring video reconstruction quality is determined as the target prediction direction. Then, the target prediction direction is written into a bitstream.
[0030] For example, 67 types of intra prediction directions supported by VVC, that is, intra prediction directions with index numbers 2 to 66 in the prediction modes, are shown in FIG.
[0031] In addition, in order to meet the requirement of higher video resolution and to express the direction of video content more precisely and accurately, the 33 types of intra luminance prediction angle modes defined in H.265 / HEVC are expanded to 65 types in H.266 / VVC, and the added angle modes are indicated by dotted arrows in Fig. 1. Number 0 indicates planar mode, number 1 indicates DC mode, and numbers 2 to 66 indicate 65 types of angle modes (from the lower left to the upper right), and there are a total of 67 types of intra prediction modes, where 2 to 66 are absolute angle numbers.
[0032] In the embodiment of the present application, a method for constructing a luminance prediction value for each pixel unit of a current block is provided by taking the intra prediction direction of index number 66 as an example. The data of the previous row adjacent to the current block is a predicted pixel unit. Each pixel unit of the current block is filled according to the pixel unit of the upper right diagonal (i.e., the prediction direction of index number 66).
[0033] There are also two relatively flat prediction block construction methods, namely DC mode and PLANAR mode. DC mode fills the entire current block with the average value of the feature values (e.g., chrominance or luminance values) of the previous row or the left column, while PLANAR mode fills the current block in a gradational manner.
[0034] In luma mode, prediction is performed in order according to 0 to 66 kinds of directions in FIG. 1, and the prediction direction that best matches the current block (e.g., has the smallest difference or the smallest rate-distortion cost) is selected as the target prediction direction, and luma prediction values of each pixel unit of the current block are constructed. This is the basic principle of luma intra prediction. After obtaining the target prediction direction and the difference corresponding to 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 luma prediction value of each pixel unit in the corresponding current block, and adding the analyzed difference from the bitstream to obtain the luma reconstruction value of the corresponding pixel unit.
[0035] Given the above basic concepts, a video encoding system is provided. FIG. 2A is a structural diagram of a video encoding system according to an embodiment of the present application. As shown in FIG. 2A, the video encoding system 21 includes: The video reconstructing block includes a transform and quantization unit 211, an intra estimation unit 212, an intra prediction unit 213, a motion compensation unit 214, a motion estimation unit 215, an inverse transform 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 an input original video signal, a video reconstructing block can be obtained by dividing a coding tree unit (CTU). Then, for residual pixel information obtained after intra or inter prediction, the transform and quantization unit 211 transforms the video reconstructing block, which includes transforming residual information from pixel domain to transform domain and quantizing the obtained transform coefficients, thereby further reducing the bit rate. The intra estimation unit 212 and the intra prediction unit 213 are used to perform intra prediction on the video reconstructing block. Here, the intra estimation unit 212 and the intra prediction unit 213 are used to determine an optimal intra prediction direction (i.e., a target prediction direction) of the video reconstructing block. To provide temporal prediction information, the motion compensation unit 214 and the motion estimation unit 215 are used to perform inter-prediction coding of the received video reconstructed block for one or more blocks in one or more reference frames. The motion estimation performed by the motion estimation unit 215 is a process of generating a motion vector, which can estimate the motion of the video reconstructed block. Then, 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 coding unit 219. And the motion estimation unit 215 also sends the motion vector data determined by calculation to the coding unit 219. And the inverse transform and inverse quantization unit 216 is used to reconstruct the video reconstructed block, and reconstructs the residual block in the pixel domain.The reconstructed residual block is used to remove blocking artifacts through the filter control analysis unit 217 and the filtering unit 218, and then the reconstructed residual block is added to one prediction block in the frame of the decoded image buffer unit 210, thereby generating a reconstructed video reconstruction block. The encoding unit 219 is used to encode various encoding parameters and quantized transform coefficients. In the encoding algorithm based on CABAC, the context content may be based on neighboring reconstructed blocks, and may be used to encode 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, which is used as prediction reference. With the execution of video image encoding, new reconstructed video reconstruction blocks are generated one after another, and all of these reconstructed video reconstruction blocks are stored in the decoded image buffer unit 210.
[0036] An embodiment of the present application provides a video decoding system. FIG. 2B is a structural schematic diagram of a video decoding system according to an embodiment of the present application. As shown in FIG. 2B, the video decoding system 22 includes: The video encoding system 22 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, a bitstream of the video signal is output, and the bitstream is input to the video decoding system 22. First, the video signal passes through the decoding unit 221 to obtain decoded transform coefficients, and the inverse transform and inverse quantization unit 222 processes the transform coefficients to generate residual blocks in the pixel domain. The intra prediction unit 223 may be used to generate prediction data of a current video decoding block based on the determined intra prediction direction and data of a previously decoded block from the current frame or picture. The motion compensation unit 224 determines prediction information for a video decoding block by analyzing the motion vector and other related grammar elements, and uses the prediction information to generate a prediction block of the video decoding block being decoded. The residual block from the inverse transform and inverse quantization unit 222 is summed with the corresponding prediction block generated by the intra prediction unit 223 or the motion compensation unit 224 to form a decoded video block. The decoded video signal can be passed through a filtering unit 225 to remove blocking artifacts and improve video quality. Then, the decoded video block is stored in a decoded image buffer unit 226. The decoded image buffer unit 226 is used to store reference images for subsequent intra prediction or motion compensation, and also to output a video signal to obtain a restored original video signal.
[0037] The embodiments of the present application mainly affect the intra prediction unit 213 in the video encoding system 21 and the intra prediction unit 223 in the video decoding system 22, i.e., when a higher prediction effect is obtained by the intra prediction method of the embodiments of the present application in the video encoding system 21, the reconstruction quality of the video decoding on the decoding side can also be correspondingly improved.
[0038] Based on this, the technical solution of the present application will be described in more detail below by means of embodiments with reference to the drawings.
[0039] Note that the intra prediction device according to the embodiment of the present application may be an encoder or a decoder, and the embodiment of the present application is not limited thereto.
[0040] An embodiment of the present application provides an intra prediction method, the method comprising: An actual angle mode indicated by a relative angle number is set, and the relative angle number sequentially indicates a corresponding actual angle mode after sampling at a predetermined angle sampling point from a start angle within a predicted direction range corresponding to a predetermined width-height relationship, the start angle being determined by the width-height relationship of the processing block and the predicted direction range corresponding to the predetermined width-height relationship, and the actual angle may have a one-to-one correspondence with the actual angle mode.
[0041] In the intra prediction method according to an embodiment of the present disclosure, the present disclosure relates to a process of writing a prediction number of a prediction mode of a current block into a bitstream for encoding / decoding.
[0042] The wide angle mode will be described below with respect to 65 kinds of angular intra prediction modes. For the wide angle mode, the prediction direction of the 65 kinds of angular intra prediction modes shown in FIG. 1 is defined as 45 degrees (mode 66) to -135 degrees (mode 2) in the clockwise direction. When the QTBT coding block division structure is added to H.266 / VVC, some non-rectangular coding blocks may be generated. For non-rectangular coding blocks, some conventional angular intra prediction modes are replaced by the extended wide angle mode. The number of conventional angular modes that need to be replaced is related to the aspect ratio of the current coding block, and the larger the ratio, the more conventional angular modes that need to be replaced by the wide angle mode.
[0043] There are 85 angle directions modes in VTM2.0.1, as well as DC and Planar modes, of which 20 angle directions are beyond the range of -135 degrees to 45 degrees, i.e., wide angles. The angle directions within -135 degrees (mode 2) to 45 degrees (mode 66) in the clockwise direction are used for blocks and are designed to include all diagonal directions of square blocks (modes 2, 34 and 66). However, for non-square blocks, the diagonal directions cannot always be covered. Also, the angle directions of square blocks are from the lower left diagonal to the upper right diagonal, but the angle directions of non-square blocks are not.
[0044] As shown in FIG. 3, there are 93 angular direction modes as well as DC and Planar modes, of which 28 angular directions exceed the range of 45 degrees to -135 degrees, that is, are wide angles.
[0045] The latest H.266 / VVC reference software VTM3.0 adopts the unified wide-angle mode proposed in proposal L0279, which states: An improvement in which the angle mode of the current coding block is limited to be between the lower left diagonal and the upper right diagonal; -Improvement that the wide angle mode extended from the current coding block is always limited to include the bottom left and top right diagonal directions, and - Proposed an improvement where the reference ranges are unified, the reference range for top is 2*W+1 and the reference range for left is 2*H+1.
[0046] Here, W is the width of the block (either an encoded block or a decoded block) and H is the length of the block (either an encoded block or a decoded block).
[0047] In addition, the unified method proposed in the L0279 proposal modifies the number of conventional modes that need to be replaced by wide angle modes, so that the angle range after the wide angle is extended is just between the lower left diagonal direction and the upper right diagonal direction (e.g., between 2 and 66), as shown in Table 1. At the same time, the method further appropriately modifies the directions of the extended wide angle modes and conventional angle modes that need to be replaced to include the diagonal directions of the current coding block for various aspect ratios.
[0048] [Table 1]
[0049] Here, if the aspect ratio (or aspect ratio, hereinafter the same) is 2, 6 modes need to be replaced, if the aspect ratio is 4, 10 modes need to be replaced, if the aspect ratio is 8, 12 modes need to be replaced, and if 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 from −14 to 80, but the angle modes are represented by the substitution method of Table 1 using consecutive numbers from 2 to 66.
[0051] In an embodiment of the present application, when setting or marking an angle mode, the intra prediction device uses an actual angle mode indicated by a relative angle number, which sequentially indicates a corresponding actual angle mode after sampling at a predetermined angle sampling point from a start angle within a prediction direction range corresponding to a predetermined width-height relationship, and the start angle is determined by the width-height relationship of the processing block and the prediction direction range corresponding to the predetermined width-height relationship.
[0052] Specifically, the intra prediction device can determine a start angle of an angle mode of a reference block based on a width-height relationship of a processing block and a prediction direction range corresponding to a predetermined width-height relationship, determine an angle offset range of the reference block based on a predetermined angle sampling point, and determine an actual angle mode corresponding to a processing block indicated by a relative angle number based on the start angle and the angle offset range.
[0053] In the embodiment of the present application, the relationship between width and height and the prediction direction range determine the starting angle. The prediction direction range indicates what angle mode is selected from all angle modes for a certain number of angle sampling points. 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 angle modes in the range of 8 to 72.
[0054] In some embodiments of the present application, when the sampling of a predetermined angle sampling point is 65, the relative angle number is a consecutive number in the range of 2' to 66', the actual angle modes corresponding to the relative angle numbers are 65 consecutive actual angle modes in the range of -14 to 80, and the selection of the 65 actual angle modes is determined according to the relationship between the width and height, and the relative angle number and the actual angle mode correspond one-to-one in sequence.
[0055] In the embodiment of the present application, 2' to 66' indicate actual angle modes corresponding to the relative angles numbered 2 to 66. That is, the actual angle modes indicated by consecutive numbers within the range of 2' to 66' are 65 actual angle modes of the corresponding 65 actual angles within the angle range of [start value angle + lower limit value of angle offset range, start value angle + upper limit value of angle offset range].
[0056] In the embodiment of the present application, the angle offset range is [0 to the number of predetermined angle sampling points minus 1]. For example, if the number of predetermined angle sampling points is 65, the angle offset range is [0 to 64].
[0057] For example, in an embodiment of the present application, taking the case where the number of predetermined angle sampling points, i.e., angle directions, is 65 as an example, the relationship between a 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 seen, in this display method, referring to the actual angle mode display method in the L0279 proposal, the absolute numbers of all angle modes are displayed in the range of [-14, 80], and regardless of what aspect ratio the current coding block has, all of them include 65 consecutive angle modes, i.e., 65 angle numbers, but the selection range of these 65 angle numbers (i.e., prediction direction range) varies depending on the aspect ratio. In the display method of the embodiment of the present application, regardless of whether there is an extension of the wide angle mode, all of the modes from the lower left diagonal direction to the upper right diagonal direction are fixed to 2' to 66' (relative angle number). However, the meaning of the actual angle mode indicated by the starting angle number of the relative angle number varies depending on the different aspect ratios. Since the prediction direction range is different, the relative angle number range is in a different interval, but all of them 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', which actually indicates the start angle + the first value in the angle offset range, i.e., the actual angle mode of 8 + 0 (the angle number in Figure 3 indicates the actual angle), relative angle number 3' indicates the actual angle mode of 8 + 1 (the second value in the angle offset range) (i.e., indicates mode 9 in Figure 3), ..., relative angle number 66' indicates the actual angle mode of 8 + 64 (the 65th value in the angle offset range) (i.e., indicates mode 72 in Figure 3).
[0060] In the display method according to the embodiment of the present application, since the same angle mode number is used in the luminance prediction process, it is possible to avoid the deviation between the angle direction of the MPM list storage mode and the angle direction of the actual adjacent block, and at the same time, it is possible to 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.
[0061] Furthermore, in the display method using relative angle numbers according to the embodiment of the present application, during encoding, the relative angle numbers are transmitted in the form of grammar elements in the bitstream, i.e., the relative angle numbers are inserted into the bitstream, and during decoding, the decoder determines the meanings represented by the relative angle numbers of different aspect ratios, and therefore can analyze the actual angle mode corresponding to the relative angle number 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 number is a consecutive number within the range of 2' to 34', and the actual angle modes corresponding to the relative angle numbers are 33 consecutive actual angle modes within the range of -7 to 41, and the selection of the 33 actual angle modes is determined according to the relationship between the width and height, and the relative angle numbers and the actual angle modes correspond one-to-one in sequence.
[0063] For example, in the embodiment of the present application, taking the case where the number of predetermined angle sampling points, i.e., the number of angle directions, is 33 as an example, the relationship between a 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 3.
[0064] [Table 3]
[0065] In some embodiments of the present application, when the sampling of a predetermined angle sampling point is 129, the relative angle number is a consecutive number 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, and the selection of the 129 actual angle modes is determined according to the relationship between the width and height, and the relative angle numbers and the actual angle modes correspond one-to-one in sequence.
[0066] For example, in the embodiment of the present application, taking the case where the number of predetermined angle sampling points, i.e., angle directions, is 129 as an example, the relationship between a 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 4.
[0067] [Table 4]
[0068] In the embodiment of the present application, the number of predetermined angle sampling points is not limited.
[0069] An embodiment of the present application provides an intra prediction method, as shown in FIG. 4, the method includes: S101: obtaining a relationship between a width and a height of a reference block of a current block, a prediction direction range corresponding to a predetermined width and height relationship, and a predetermined angle sampling point; S102: determining an actual angle mode corresponding to a reference block indicated by a relative angle number based on a width-height relationship, a prediction direction range corresponding to the predetermined width-height relationship, and a predetermined angle sampling point, and making the actual angle correspond to the actual angle mode in one-to-one correspondence; S103: obtaining an angle prediction mode corresponding to the reference block according to an actual angle mode corresponding to the reference block; and performing intra prediction on the current block based on the angular prediction mode (S104).
[0070] In the embodiment 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 performing intra prediction, the intra prediction device includes at least one of luma intra prediction and chroma intra prediction. The luma intra prediction uses a neighboring block as a reference block, and when performing chroma intra prediction, the luma block at the center position of the previous chroma block can be used as a reference block. The chroma 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 a luma intra prediction direction and a chroma intra prediction direction.
[0073] As will be understood, when the prediction direction is a luma intra prediction direction, the prediction direction of the reference block is the luma direction, and for S104, when intra prediction is performed on the current block, intra prediction is actually performed on the luma of the current block; similarly, when the prediction direction is a chroma intra prediction direction, the prediction direction of the reference block is the chroma direction, and for S104, when intra prediction is performed on the current block, intra prediction is actually performed on the chroma of the current block.
[0074] In S101, regardless of whether the intra prediction device performs luma intra prediction or chroma intra prediction, in the process of obtaining the prediction mode of the current block, the intra prediction device can obtain a width-height relationship of the reference block of the current block, a prediction direction range corresponding to a predetermined width-height relationship, and a predetermined angle sampling point.
[0075] In the embodiment of the present application, the relationship between the width and height of the reference block may be an aspect ratio or a width-to-height ratio, and the embodiment of the present application is not limited thereto.
[0076] In an embodiment of the present application, the predicted direction range corresponding to a given width-height relationship is an actual angle range including a given number of consecutive angle sampling points from the lower left diagonal direction to the upper right diagonal direction obtained for different width-height relationships of one processing block.
[0077] In the present embodiment, the number of sampling points at a given angle is the number of sampling points from the lower left diagonal to the upper right diagonal.
[0078] In addition, the intra prediction device can obtain a prediction direction range corresponding to a width-height relationship of a reference block of a current block and a predetermined width-height relationship, determine a predetermined angle sampling point within each prediction direction range, and select a prediction direction and a relative angle number of a start angle.
[0079] For illustrative purposes, 65 types of angular intra prediction modes will be described as an example. The prediction directions of the 65 types of angular intra prediction modes are defined as −135 degrees (mode 2) to 45 degrees (mode 66) in the clockwise direction, where [2′, 66′] is a relative angle number.
[0080] In an embodiment of the present application, when the number of predetermined angle sampling points is constant, the length of the prediction direction range for all angle modes is the same, and regardless of the width and height relationship of the current block, all of them only include angles (i.e., relative angle numbers) of the predetermined number of consecutive angle sampling points therein, but the actual angle mode that selects this number of predetermined angle sampling points from the length of the prediction direction range differs depending on the width and height relationship.
[0081] In S102, the intra prediction device obtains the width-height relationship of the reference block of the current block, and a prediction direction range and predetermined angle sampling points corresponding to the predetermined width-height relationship. Then, the intra prediction device determines an actual angle mode corresponding to the reference block indicated by a relative angle number based on the width-height relationship, and the prediction direction range and predetermined angle sampling points corresponding to the predetermined width-height relationship, so as to make the actual angle and the actual angle mode correspond to each other one-to-one. Specifically, this is achieved by the following S1021 to S1023.
[0082] S1021, determining a start angle of an angle mode of a reference block based on a width-height relationship and a prediction direction range corresponding to a predetermined width-height relationship.
[0083] S1022, determining an angular offset range of a reference block based on a predetermined angular sampling point.
[0084] S1023, based on the start angle and the angle offset range, determine an actual angle mode corresponding to the reference block indicated by the relative angle number.
[0085] After obtaining the width-height relationship and the prediction direction range corresponding to the predetermined width-height relationship, the intra prediction device can determine a start angle of the angle mode of the reference block from the prediction direction range corresponding to the predetermined width-height relationship based on the width-height relationship. Also, the intra prediction device determines an angle offset range of the reference block based on a predetermined angle sampling point, and determines an actual angle mode corresponding to the reference block indicated by a relative angle number based on the start angle and the angle offset range. Then, the intra prediction device can select an actual angle mode within the angle offset range indicated by the relative angle number with the start angle as a start angle.
[0086] In some embodiments of the present application, the angle may be represented by a relative angle number, and the intra prediction device may determine a start number of the relative angle of the start angle of the angle mode of the reference block based on the width-height relationship and a prediction direction range corresponding to a predetermined width-height relationship, determine 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 determine an actual angle mode corresponding to the reference block indicated by consecutive numbers within the relative angle number range of [2' to 66'] based on the start number and the angle offset range.
[0087] For example, in an embodiment of the present application, taking the case where the number of predetermined angle sampling points is 65, i.e., the number of angle directions is 65, 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.
[0088] [Table 5]
[0089] As can be seen, in this display method, referring to the actual angle mode display method of FIG. 3 in the L0279 proposal, the absolute numbers of all angle modes are displayed in the range of [-14, 80], and regardless of what aspect ratio the currently coded block has, all of them include only 65 consecutive angle numbers therein, but the selection range of these 65 angle numbers varies depending on the aspect ratio. In this new display method, regardless of whether there is an extension of the wide angle mode, all of the modes from the lower left diagonal direction to the upper right diagonal direction are displayed with relative angle numbers 2' to 66'. However, since the starting angle numbers of the angle modes are different depending on the different aspect ratios, the number ranges of all angles are ultimately in different intervals, but all are within the range of [-14, 80]. For example, when W / H=2, the relative angle number of the lower left diagonal direction is 2', which actually indicates the start angle + the first value of the angle offset range, i.e., the actual angle mode of 8 + 0 (the angle number in FIG. 3 indicates the actual angle), the relative angle number 3' indicates the actual angle mode of 8 + 1 (the second value of the angle offset range) (i.e., 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) (i.e., mode 72 in FIG. 3). Since the display method of the embodiment of the present application is indicated by the same angle mode number in the luminance prediction process, it is possible to avoid the existence of a 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 is possible to 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] Furthermore, in the display method using relative angle numbers according to the embodiment of the present application, during encoding, the relative angle numbers are transmitted in the form of grammar elements in the bitstream, i.e., the relative angle numbers are inserted into the bitstream, and during decoding, the decoder determines the meanings represented by the relative angle numbers of different aspect ratios, and therefore can analyze the actual angle mode corresponding to the relative angle number according to the received relative angle number.
[0091] As can be seen, transmitting the relative angle number as a grammar element of the angle mode number in the bitstream simplifies the encoder / decoder's acquisition of the true predicted angle in the wide angle mode, and helps improve the encoding / decoding efficiency.
[0092] In some embodiments of the present application, when the sampling of a predetermined angle sampling point is 33, the relative angle number is a consecutive number within the range of 2' to 34', and the actual angle modes corresponding to the relative angle numbers are 33 consecutive actual angle modes within the range of -7 to 41, and the selection of the 33 actual angle modes is determined according to the relationship between the width and height, and the relative angle numbers and the actual angle modes correspond one-to-one in sequence.
[0093] For example, in the embodiment of the present application, taking the case where the number of predetermined angle sampling points, i.e., the number of angle directions, is 33 as an example, the relationship between a 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 3.
[0094] [Table 6]
[0095] In some embodiments of the present application, when the sampling of a predetermined angle sampling point is 129, the relative angle number is a consecutive number 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, and the selection of the 129 actual angle modes is determined according to the relationship between the width and height, and the relative angle numbers and the actual angle modes correspond one-to-one in sequence.
[0096] For example, in the embodiment of the present application, taking the case where the number of predetermined angle sampling points, i.e., angle directions, is 129 as an example, the relationship between a 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 4.
[0097] [Table 7]
[0098] In the embodiment of the present application, the number of predetermined angle sampling points is not limited.
[0099] In S103, the intra predictor obtains an angular prediction mode corresponding to the reference block according to an actual angular mode corresponding to the reference block.
[0100] After obtaining the actual angle mode corresponding to the reference block, the intra prediction device can indicate the angular prediction mode (eg, 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 has one-to-one correspondence with the actual angle mode.
[0102] In S104, the intra prediction device may perform intra prediction on the current block based on the angular prediction mode, where the intra prediction device needs to build a prediction mode list for the current block based on the angular prediction mode, and then use the prediction mode list to realize intra prediction on the current block.
[0103] In the present embodiment, in the case of luma 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 luma intra prediction, as shown in Fig. 5, a reference block is determined from all neighboring blocks above the current block and all neighboring blocks to the left of the current block, for example, the left (L), top (A), bottom left (BL), top right (AR) and top left (AL) neighboring blocks of the current block are taken as reference blocks in the reference block set. The derivation process of the MPM list considers the intra prediction modes (also called intra prediction directions) of the five neighboring blocks of the current block, i.e., the left (L) block, top (A) block, bottom left (BL) block, top right (AR) block and top left (AL) block.
[0106] The candidate prediction directions in the MPM list are divided into three groups, namely adjacent prediction modes, derived prediction modes, and default prediction modes. First, adjacent prediction modes are added to the MPM list. Each type of intra prediction mode can only be added once to the MPM list, i.e., the MPM list cannot contain duplicated prediction modes. After completing the addition of adjacent prediction modes, if the MPM list contains less than six prediction modes, the derived intra prediction modes are added to the MPM list. After completing the addition of derived prediction modes, if the MPM list still contains less than six prediction modes, the default prediction modes are added to the MPM list until an MPM list containing the six most possible 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, determine whether the intra prediction mode selected by the luminance block is in the MPM list, if it is in the MPM list, use a truncated binary code to binarize the index number of the prediction mode in the MPM, the smaller the index number, the smaller the generated truncated binary code, and then encode the truncated binary code by an arithmetic encoder, thereby saving bit overhead. If the intra prediction mode selected by the luminance block is one of the remaining 61 prediction modes that are not located in the MPM list, renumber the 61 prediction modes starting from 0, and select 16 prediction modes whose numbers are divisible by 4 as selected modes. If the intra prediction mode is located in the selected mode, bypass coding is performed with a fixed 4-bit length. If the intra prediction mode is located in the remaining 45 non-selected modes, renumber them again, binarize them with a truncated binary code, generate a bit string with a length of 5 or 6 bits according to the order of the numbers, and then bypass coding is performed.
[0108] Since the 6MPM list in JEM is relatively complicated, some people have proposed a solution using a simplified 3MPM list. However, since the 3MPM list contains relatively few prediction modes and the prediction effect obtained is not very accurate, some people have proposed using a simplified 6MPM list (which is also the method used in the current VTM3.0). For example, a new candidate prediction mode for the current block is constructed based on the prediction mode corresponding to the top (A) block and the prediction mode corresponding to the left (L) block in FIG. 5, and the structure of the MPM list is as follows: If the reference row 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 angle 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 6 modes, add 1 to adjacent modes, or subtract 1 from adjacent modes, If the prediction modes of block L and block A are the same and both are angle 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 angle 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 angle 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 angle mode, MPM={dirL, dirA, HOR, VER, HOR-4, HOR+4}, If the reference row index is 1 or 3, If the prediction modes dirL and dirA of blocks L and A are not angle modes, MPM={VER, HOR, 2, DIA, VDIA, 26}, If the prediction modes dirL and dirA of blocks L and A are both angle modes, MPM={dirL, dirA, min(dirL, dirA)-1, min(dirL, dirA)+1, max(dirL, dirA)-1, max(dirL, dirA)+1...}, If the prediction modes dirL and dirA of block L and block A have one angle mode (indicated by dir), then MPM={dir, dir-1, dir+1, dir-1, dir+2, dir-3}.
[0109] In the embodiment of the present application, as for the construction method of DM and VVC draft 3 chrominance intra prediction direction in chrominance intra prediction, the relevant description of the method is shown in Table 5.
[0110] [Table 8]
[0111] For example, Figure 6 is a schematic diagram of the distribution of luminance blocks and chrominance blocks corresponding to a current block in an embodiment of the present application. As shown in Figure 6, the gray area in the left half of the square on the right is the chrominance block 71 currently being processed, and the gray area in the left half of the square on the left is the luminance area corresponding to the chrominance block 71 currently being processed. When performing intra prediction of the current chrominance block 71, the prediction direction recorded at the center position of the luminance area, i.e., the prediction direction of the CR luminance block 701 in the square on the right side of Figure 6, is used.
[0112] According to Table 5 and the contents shown in FIG. 6, if the prediction direction obtained by DM is the same as one of the latter four prediction directions, the same mode in rows 3 to 6 is replaced with the prediction direction of index number 66.
[0113] Regarding MDMS for chrominance intra prediction, MDMS is a more complex method for constructing the chrominance intra prediction direction. As shown in Table 6, it reduces the code rate by 0.2% compared to DM. However, it is too complex and has not yet been applied to VVC.
[0114] [Table 9]
[0115] As shown in Figure 7, as shown in blocks 801 to 805 on the left side of Figure 7, the MDMS modes in Table 6 are intra prediction modes of corresponding luma blocks at five positions, namely the center CR, the upper left TL, the upper right TR, the lower left BL, and the lower right BR, of the current chroma block used, and as shown in blocks 806 to 810 on the right side of Figure 7, the chroma adjacent block modes in Table 6 are modes in which the used chroma block is spatially adjacent to the intra prediction direction of the left, upper left, lower left, upper and upper right blocks, i.e., the prediction direction to be written into the bitstream.
[0116] That is, in the present embodiment, the intra prediction unit can not only perform luma intra prediction, but also chroma intra prediction.
[0117] As can be understood, the angle modes of all rectangular blocks according to the present application use relative angle numbers to sequentially indicate the corresponding actual angle modes after sequentially adding the start angle and the angle offset range, and are unified to a certain range within [start value angle + lower limit of angle offset range, start value angle + upper limit of angle offset range]. In the display method of the embodiment of the present application, different start angles are set according to the width and height relationships of different reference blocks, and the old angle mode number is used to indicate the new angle mode, and the angle mode corresponds to the angle one-to-one. In this way, the angle mode numbers of rectangular blocks with various width and height relationships are unified, and the angle direction and the actual angle expressed in the luma MPM list and the chroma prediction DM are consistent, the angle conversion in the related wide angle mode is simplified, the meaning of the angle value represented by each mode is unified, deviations are eliminated, and it is helpful to improve the accuracy of intra prediction.
[0118] Furthermore, transmitting the angle offset number as a grammar element of the angle mode number in the bitstream simplifies the encoder / decoder's acquisition of the true prediction angle in the wide angle mode, which helps improve the encoding / decoding efficiency.
[0119] Based on the realization of the above embodiment, an embodiment of the present application provides an intra prediction device, comprising a setting unit configured to set an actual angle mode indicated by a relative angle number, the relative angle number sequentially indicating 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 predetermined width-height relationship, the start angle being determined by the width-height relationship of a processing block and a prediction direction range corresponding to the predetermined width-height relationship, and the actual angle having a one-to-one correspondence with 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 consecutive number in the range of 2' to 66', the actual angle modes corresponding to the relative angle numbers are 65 consecutive actual angle modes in the range of -14 to 80, and the selection of the 65 actual angle modes is determined according to the relationship between width and height, and the relative angle numbers and the actual angle modes correspond one-to-one in order.
[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 consecutive number within the range of 2' to 34', the actual angle modes corresponding to the relative angle numbers are 33 consecutive actual angle modes within the range of -7 to 41, and the selection of the 33 actual angle modes is determined according to the relationship between width and height, and the relative angle numbers and the actual angle modes correspond one-to-one in order.
[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 consecutive number within a range of 2' to 130', and the actual angle modes corresponding to the relative angle numbers are 129 consecutive actual angle modes within a range of -28 to 158, and the selection of the 129 actual angle modes is determined according to the relationship between width and height, and the relative angle numbers and the actual angle modes correspond one-to-one in order.
[0123] Based on the implementation of the above embodiment, as shown in FIG. 8 , the embodiment of the present application further provides an intra prediction device 1, an acquisition unit configured to acquire a width-height relationship of a reference block of a current block, a prediction direction range corresponding to the predetermined width-height relationship, and a predetermined angle sampling point; a determination unit 11 configured to determine an actual angle mode corresponding to a reference block indicated by a relative angle number based on the width-height relationship, a prediction direction range corresponding to the predetermined width-height relationship, and the predetermined angle sampling point, and to make an actual angle correspond to the actual angle mode in one-to-one correspondence; an intra prediction unit 12 configured to perform intra prediction on the current block based on the angular prediction mode; The obtaining unit 10 is further configured to obtain an angular prediction mode corresponding to the reference block based on an actual angular mode corresponding to the reference block.
[0124] In some embodiments of the present application, the determination unit 11 is specifically configured to determine a start angle of an angle mode of the reference block based on the width-height relationship and a prediction direction range corresponding to the specified width-height relationship, determine an angle offset range of the reference block based on the specified angle sampling points, and determine an actual angle mode corresponding to the reference block indicated by a 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 for the current block based on the angular prediction mode, and to realize intra prediction for the current block using the prediction mode list.
[0126] In some embodiments of the present application, the intra prediction includes at least one of luma intra prediction and chroma intra prediction.
[0127] As shown in FIG. 9 , an embodiment of the present application further provides an intra prediction device, The device comprises a processor 13, a memory 14 in which intra prediction instructions executable by the processor 13 are stored, and a communication bus 15 for connecting the processor 13 and the memory 14, and realizes the above-mentioned intra prediction method when the intra prediction instructions are executed.
[0128] In the 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. It can be understood that for different devices, the electronic devices for realizing the above processor functions may be other, and the embodiment of the present application is not specifically limited. The intra prediction device may further include a memory 14, which may be connected to the processor 13, and is used to store executable program code, which includes computer operation instructions, and 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 memory, and provides instructions and data to the processor 13.
[0129] In the present embodiment, a communication bus 15 is used to connect the processor 13 and the memory 14 and for communication between these devices.
[0130] In addition, each functional module of this embodiment may be integrated into one processing unit, each unit may exist physically independently, or two or more units may be integrated into one unit. The integrated unit may be realized in the form of hardware or in the form of a software functional module.
[0131] The integrated unit may be realized in the form of a software functional module and stored in one computer-readable storage medium when sold or used as an independent product. Based on this understanding, the essential or prior art part of the technical solution of this embodiment, or all or a part of the technical solution, may be embodied in the form of a software product, and the computer software product is stored in one storage medium containing some instructions for making a computer device (which may be a personal computer, a server, a network device, etc.) or a processor execute all or a part of the steps of the method of this embodiment. The storage medium includes various media that can store program codes, such as USB memory, portable hard disk, read only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0132] An embodiment of the present application provides a computer-readable storage medium having intra prediction instructions stored thereon, which, when executed by a processor, realizes the above intra prediction method.
[0133] Specifically, the intra prediction command corresponding to the intra prediction method of this embodiment may be stored in a storage medium such as an optical disc, a hard disk, a USB memory, etc., and when the intra prediction command corresponding to the intra prediction method in the storage medium is read or executed by an electronic device, the method includes the steps of: acquiring the width-height relationship of the reference block of the current block, the correspondence between a predetermined width-height relationship and a relative angle, and a predetermined absolute angle range; determining an actual angle mode corresponding to the reference block based on the width-height relationship, the correspondence between the predetermined width-height relationship and a relative angle, and the prediction absolute angle range, and making the actual angle and the actual angle mode correspond one-to-one; acquiring an 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.
[0134] As can be understood, the intra prediction device processes reference blocks having different width and height relationships in an intra prediction process in a unified actual angle mode manner, and can have one-to-one correspondence between actual angles and actual angle modes. In this way, when a certain angle is indicated in both the luma prediction process and the chroma prediction process, the angle mode of each shape block is specifically determined based on the aspect ratio. The angle conversion in the related wide angle mode is simplified, the meaning of the angle value represented by each mode is unified, deviations are eliminated, and the accuracy of intra prediction is effectively improved, while the encoding / decoding efficiency is improved.
[0135] As will be appreciated by those skilled in the art, the present application may be provided as a method, a system, or a computer program product. Thus, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware. And, the present application may take the form of a computer program product embodied in one or more computer usable storage mediums (including, but not limited to, magnetic disk memories, optical memories, etc.) that contain computer usable program code.
[0136] The present application has been described with reference to implementation flowcharts and / or block diagrams of the methods, apparatus (systems), and computer program products of the embodiments of the present application. It will be understood that each process and / or block in the flowcharts and / or block diagrams, and combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to generate a machine, whereby the instructions executed by the processor of the computer or other programmable data processing device generate an apparatus for implementing the functionality specified in a process or processes in the implementation flowcharts and / or a block or blocks in the block diagrams.
[0137] These computer program instructions may be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, thereby causing the instructions stored in the computer readable memory to produce an article of manufacture that includes an instruction device that implements the functions specified in a process or processes in the implementation flowcharts and / or in a block or blocks in the block diagrams.
[0138] These computer program instructions may then be installed on a computer or other programmable data processing apparatus to cause the computer or other programmable device to execute a series of operational steps to generate a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in a process or processes in the implementation flowcharts and / or in a block or blocks in the block diagrams.
[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 device, and a computer storage medium, and the intra prediction device processes reference blocks having different width and height relationships in an intra prediction process in a unified actual angle mode manner, and can have one-to-one correspondence between actual angles and actual angle modes. In this way, when a certain angle is indicated in both the luma prediction process and the chroma prediction process, the angle mode of each shape block is specifically determined based on the aspect ratio. The angle conversion in the related wide angle mode is simplified, the meaning of the angle value represented by each mode is unified, deviation is eliminated, and the accuracy of intra prediction is effectively improved, and the encoding / decoding efficiency is improved.
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 number corresponding to a second intra-prediction mode number of the current block to obtain a predicted block; 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, the left neighboring block includes a left block, a lower left block, and an upper left block of the current block, and the upper neighboring block includes an upper block and an upper right block of 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: If the width of the current block is greater than its height and the ratio of the width to the height is 2 or greater, 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 number corresponding to a second intra-prediction mode number of the current block to obtain a predicted block; 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, the left neighboring block includes a left block, a lower left block, and an upper left block of the current block, and the upper neighboring block includes an upper block and an upper right block of 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: If the width of the current block is greater than its height and the ratio of the width to the height is 2 or greater, 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 number corresponding to a second intra-prediction mode number of the current block to obtain a predicted block; The neighboring blocks of the current block include a left neighboring block and / or an upper neighboring block corresponding to the current block, the left neighboring block includes a left block, a lower left block, and an upper left block of the current block, and the upper neighboring block includes an upper block and an upper right block of 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, If the width of the current block is greater than its height and the ratio of the width to the height is 2 or greater, 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 number corresponding to a second intra-prediction mode number of the current block to obtain a predicted block; The neighboring blocks of the current block include a left neighboring block and / or an upper neighboring block corresponding to the current block, the left neighboring block includes a left block, a lower left block, and an upper left block of the current block, and the upper neighboring block includes an upper block and an upper right block of 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, If the width of the current block is greater than its height and the ratio of the width to the height is 2 or greater, 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
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
Method and apparatus for video coding
WO2019232023A1
Method and apparatus for video coding
WO2020010131A1