Intra prediction method, video codec method, device and system

The intra-prediction method addresses the challenge of inefficient video compression by deriving intra-prediction modes from reconstructed samples, enhancing coding efficiency for high-quality video content.

JP2026501366APending Publication Date: 2026-01-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025538030
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2026-01-14

Smart Images

  • Figure 2026501366000001_ABST
    Figure 2026501366000001_ABST
Patent Text Reader

Abstract

The present invention provides an intra prediction method, a video coding method, an apparatus, and a system. When performing intra prediction on a current block, an intra prediction mode corresponding to a reconstructed block is obtained, and an intra prediction mode for the current block is derived based on the intra prediction mode corresponding to the reconstructed block. The intra prediction mode corresponding to the reconstructed block is determined based on reconstructed samples of the reconstructed block.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] FIELD Embodiments of the present disclosure relate to, but are not limited to, video technology, and more particularly to intra-prediction methods, video codec methods, devices, and systems. [Background technology]

[0002] Digital video compression technology primarily compresses massive amounts of digital video data to facilitate transmission and storage. Current general-purpose video codec standards, such as H.266 / Versatile Video Coding (VVC), all use a block-based hybrid coding framework. Each frame of video is divided into square largest coding units (LCUs) of the same size (e.g., 128x128, 64x64, etc.). Each LCU can be divided into rectangular coding units (CUs) according to a set of rules. Coding units can also be divided into prediction units (PUs), transform units (TUs), etc. The hybrid coding framework includes modules such as prediction, transform, quantization, entropy coding, and in-loop filtering. The prediction module includes intra prediction and inter prediction for reducing or removing inherent redundancy in video, where inter prediction includes motion estimation and motion compensation. Because there is a strong correlation between adjacent pixels within a video, video codec technology uses intra prediction methods to remove spatial redundancy between adjacent pixels. Because there is a strong similarity between adjacent frames of video, video codec technology uses inter prediction methods to remove temporal redundancy between adjacent frames, thereby improving coding efficiency. In contrast to the prediction signal, residual information is coded into a codestream by block-wise transform, quantization, and entropy.

[0003] With the rapid growth of Internet video and the ever-increasing demand for video clarity, although existing digital video compression standards can significantly save video data, there is a need to pursue better digital video compression technologies to reduce the bandwidth and traffic pressure of digital video transmission. Summary of the Invention [Means for solving the problem]

[0004] The following is a summary of the subject matter described in detail herein. This summary does not limit the scope of the claims.

[0005] One embodiment of the present disclosure is obtaining an intra-prediction mode corresponding to a reconstructed block, the intra-prediction mode corresponding to the reconstructed block being determined based on reconstructed samples of the reconstructed block, the reconstructed block being a coded block or a decoded block; deriving an intra-prediction mode for a current block based on an intra-prediction mode corresponding to the reconstructed block; An intra prediction method is provided.

[0006] One embodiment of the present disclosure is determining that an intra prediction mode for the current block needs to be derived based on reconstructed samples; Obtaining an intra prediction mode corresponding to a reconstructed block according to an intra prediction method described in any embodiment of the present disclosure, and deriving an intra prediction mode of a current block based on the intra prediction mode corresponding to the reconstructed block; performing intra prediction on the current block based on the intra prediction mode used by the current block determined by deriving the intra prediction mode; A video decoding method is also provided.

[0007] One embodiment of the present disclosure is determining that an intra prediction mode for the current block needs to be derived based on reconstructed samples; Obtaining an intra prediction mode corresponding to a reconstructed block according to an intra prediction method described in any embodiment of the present disclosure, and deriving an intra prediction mode of a current block based on the intra prediction mode corresponding to the reconstructed block; A video encoding method is also provided.

[0008] One embodiment of the present disclosure is a processor and a memory storing a computer program, the processor executing the computer program being capable of realizing the intra prediction method according to any one of the embodiments of the present disclosure; An intra prediction device is further provided.

[0009] One embodiment of the present disclosure is a processor and a memory storing a computer program, the computer program being capable of implementing a video decoding method according to any one of the embodiments of the present disclosure when the processor executes the computer program; A video decoding device is also provided.

[0010] One embodiment of the present disclosure is a processor and a memory storing a computer program, the computer program being capable of implementing the video encoding method according to any one of the embodiments of the present disclosure when the processor executes the computer program; A video encoding device is also provided.

[0011] One embodiment of the present disclosure is A video encoding device according to any one of the embodiments of the present disclosure and a video decoding device according to any one of the embodiments of the present disclosure, A video codec system is further provided.

[0012] One embodiment of the present disclosure is A non-transitory computer-readable storage medium having a computer program stored thereon, The computer program, when executed by a processor, can realize an intra prediction method according to any one of the embodiments of the present disclosure, a video decoding method according to any one of the embodiments of the present disclosure, or a video encoding method according to any one of the embodiments of the present disclosure. A non-transitory computer-readable storage medium is also provided.

[0013] One embodiment of the present disclosure is A computer program product comprising a computer program, The computer program, when executed by a processor, can realize an intra prediction method according to any one of the embodiments of the present disclosure, a video decoding method according to any one of the embodiments of the present disclosure, or a video encoding method according to any one of the embodiments of the present disclosure. A computer program product is further provided.

[0014] Other aspects may be appreciated after reading and understanding the drawings and detailed description.

[0015] The drawings are intended to provide an understanding of the embodiments of the present disclosure, constitute a part of this specification, and are used in conjunction with the embodiments of the present disclosure to explain the invention according to the present disclosure, but are not intended to limit the invention according to the present disclosure. [Brief explanation of the drawings]

[0016] [Figure 1A] 1 is a schematic diagram of a codec system according to an embodiment of the present disclosure. [Figure 1B] FIG. 1 is a framework diagram of the encoding side according to an embodiment of the present disclosure. [Figure 1C] FIG. 10 is a framework diagram on the decoding side according to an embodiment of the present disclosure. [Figure 2A] 1 is a schematic diagram illustrating prediction for a current block using an intra prediction method; [Figure 2B]1 is a schematic diagram illustrating a multi-reference line intra-prediction method for predicting a current block; [Figure 3] FIG. 1 is a schematic diagram of a conventional intra mode used in a non-wide angle mode in VVC. [Figure 4] FIG. 1 is a schematic diagram of a conventional intra mode used in a wide-angle mode in VVC. [Figure 5] FIG. 1 is a schematic diagram of a conventional intra mode used in AVS3. [Figure 6] FIG. 1 is a schematic diagram of intra-mode derivation based on TIMD modes. [Figure 7] FIG. 1 is a schematic diagram of intra-mode derivation based on DIMD modes. [Figure 8] FIG. 1 is a schematic diagram of intra prediction based on IBC mode. [Figure 9] FIG. 1 is a schematic diagram of inter prediction based on template matching technology. [Figure 10] FIG. 1 is a schematic diagram of intra prediction based on the intraTMP mode. [Figure 11] This is a weighted graph of the 64 modes on a square block of GPM. [Figure 12] This is a weighted graph of the 56 modes on a square block of the AWP. [Figure 13] FIG. 10 is a schematic diagram of the coordinates of adjacent positions when creating an MPM list. [Figure 14] 1 is a flowchart of an intra prediction method according to an embodiment of the present disclosure. [Figure 15] 1 is a flowchart of a video decoding method according to an embodiment of the present disclosure. [Figure 16] 1 is a flowchart of a video encoding method according to an embodiment of the present disclosure. [Figure 17] FIG. 1 is a block diagram of an intra-prediction device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0017] While this disclosure describes various embodiments, it will be apparent to those skilled in the art that the following description is illustrative and not limiting, and that many more embodiments and implementations may exist within the scope of the embodiments described by this disclosure.

[0018] In describing the present disclosure, terms such as "exemplary" and "for example" are used to indicate an example, illustration, or description. Any embodiment described with "exemplary" or "for example" in the present disclosure should not be construed as preferred or advantageous over other embodiments. In this specification, "and / or" describes a relationship between related objects and means that a three-way relationship may exist. For example, A and / or B may mean that A exists alone, that A and B exist simultaneously, or that B exists alone. "Plurality" means two or more. Furthermore, to facilitate the description of the invention according to the embodiments of the present disclosure, terms such as "first," "second," and the like are used to distinguish between identical or similar items having substantially the same function and operation. Those skilled in the art will understand that terms such as "first," "second," and the like do not limit the number or execution order, and that terms such as "first," "second," and the like do not necessarily limit different items.

[0019] As used herein, "including any one or more of: Option 1, Option 2, ..." or "including any one or more of Option 1, Option 2, ..." means including any one of the listed options or including a combination of any two or more of the listed options. For example, "including any one or more of: A, B" or "including any one or more of A, B" means including only A, or only B, or A and B; "including any one or more of: A, B, C" or "including any one or more of A, B, C" means including only A, or only B, or only C, or including A and B, or including A and C, or including B and C, or including A, B, and C. The same applies when there are more options.

[0020] In describing representative illustrative embodiments, the specification may have presented a method and / or process as a particular sequence of steps. However, the method or process should not be limited to the particular order of steps described, unless the method or process relies on the particular order of steps described herein. As will be understood by one of ordinary skill in the art, other orders of steps are possible. Thus, the particular order of steps described herein should not be construed as limiting the scope of the claims. Additionally, method and / or process claims should not be limited to performing those steps in the order described; one of ordinary skill in the art will readily understand that these orders can be changed and remain within the scope of the embodiments of the present disclosure.

[0021] The intra prediction method and video codec method of the embodiments of the present disclosure can be applied to various video codec standards, such as H.264 / Advanced Video Coding (AVC), H.265 / High Efficiency Video Coding (HEVC), H.266 / Versatile Video Coding (VVC), AVS (Audio Video Coding Standard), and other standards developed by MPEG (Moving Picture Experts Group), AOM (Alliance for Open Media), JVET (Joint Video Experts Team), and extensions of these standards or any other customized standards.

[0022] FIG. 1A is a block diagram of a video codec system according to an embodiment of the present disclosure. As shown in the figure, the system is divided into an encoding side 1 and a decoding side 2. The encoding side 1 generates a codestream. The decoding side 2 can decode the codestream. The decoding side 2 can receive the codestream from the encoding side 1 via a link 3. The link 3 includes one or more media or devices capable of transferring the codestream from the encoding side 1 to the decoding side 2. In one example, the link 3 includes one or more communication media that enable the encoding side 1 to directly transmit the codestream to the decoding side 2. The encoding side 1 modulates the codestream according to a communication standard and transmits the modulated codestream to the decoding side 2. The one or more communication media may include wireless and / or wired communication media and may form part of a packet network. In another example, the codestream may be output from an output interface 15 to a storage device, and the decoding side 2 may read the stored data from the storage device by streaming or downloading.

[0023] As shown in the figure, the encoding side 1 includes a data source 11, a video encoding device 13, and an output interface 15. The data source 11 may include a video capture device such as a video camera, an archive containing previously captured data, a feed interface for receiving data from a content provider, a computer graphics system for generating data, or a combination of these sources. The video encoding device 13, also referred to as the video encoding side, encodes data from the data source 11 and outputs it to the output interface 15. The output interface 15 may include at least one of a regulator, a modem, and a transmitter. The decoding side 2 includes an input interface 21, a video decoding device 23, and a display device 25. The input interface 21 includes at least one of a receiver and a modem. The input interface 21 can receive a codestream via link 3 or from a storage device. The video decoding device 23, also referred to as the video decoding side, decodes the received codestream. The display device 25 displays the decoded data and may be integrated with other devices of the decoding side 2 or provided separately; the display device 25 is not essential for the decoding side. In other examples, the decryption side may include other devices or equipment that apply the decrypted data.

[0024] 1B is a block diagram of an exemplary video encoding device 10 according to an embodiment of the present disclosure. As shown in the figure, the video encoding device 10 includes a segmentation unit 101 and a prediction unit 100.

[0025] The division unit 101 is configured to divide the received video data into slices, coding tree units (CTUs), or other large units in cooperation with the prediction unit 100. The received video data may be a video sequence including video frames such as I-frames, P-frames, or B-frames.

[0026] The prediction unit 100 is configured to divide the CTU into coding units (CUs) and perform intra-prediction coding or inter-prediction coding on the CUs. When performing intra-prediction and inter-prediction on a CU, the CU can be divided into one or more prediction units (PUs).

[0027] The prediction unit 100 includes an inter prediction unit 121 and an intra prediction unit 126 .

[0028] The inter prediction unit 121 is configured to perform inter prediction on a PU to generate prediction data for the PU, including a prediction block of the PU, motion information of the PU, and various syntax elements. The inter prediction unit 121 may include a motion estimation (ME) unit and a motion compensation (MC) unit. The motion estimation unit performs motion estimation to generate a motion vector, and the motion compensation unit obtains or generates a prediction block from the motion vector.

[0029] The intra prediction unit 126 is configured to perform intra prediction on the PU and generate prediction data for the PU. The prediction data for the PU may include a prediction block for the PU and various syntax elements.

[0030] The residual generation unit 102 (indicated in the same figure by a circle with a plus sign after the division unit 101) subtracts the prediction block of the PU divided from the CU based on the original block of the CU, to generate a residual block of the CU.

[0031] The transform processing unit 104 is configured to divide a CU into one or more transform units (TUs), and the division between prediction units and transform units may be different. A TU-related residual block is a sub-block obtained by dividing the CU's residual block. A TU-related coefficient block is generated by applying one or more types of transform to the TU-related residual block.

[0032] The quantization unit 106 is configured to quantize the coefficients in the coefficient block based on a quantization parameter, and can change the degree of quantization of the coefficient block by adjusting the quantization parameter (QP: Quantizer Parameter).

[0033] The inverse quantization unit 108 and the inverse transform processing unit 110 are configured to apply inverse quantization and inverse transform, respectively, to the coefficient block to obtain a TU-related reconstructed residual block.

[0034] The reconstruction unit 112 (indicated in the figure by a circle with a plus sign after the inverse transform processing unit 110) adds the reconstructed residual block and the prediction block generated by the prediction unit 100 to generate a reconstructed image.

[0035] The filter unit 113 performs loop filtering on the reconstructed image.

[0036] The decoded image buffer 114 is configured to store a reconstructed image after loop filtering. The intra prediction unit 126 can extract reference images of blocks adjacent to a current block from the decoded image buffer 114 and perform intra prediction. The inter prediction unit 121 can perform inter prediction on a PU of a current frame image using a reference image of a previous frame cached in the decoded image buffer 114.

[0037] The entropy coding unit 115 is configured to perform an entropy coding operation on the received data (eg, syntax elements, quantized coefficient blocks, motion information, etc.) to generate a video codestream.

[0038] In other examples, video encoding device 10 may include more, fewer, or different functional components than in this example, and may omit, for example, transform processing unit 104, inverse transform processing unit 110, etc.

[0039] 1C is a block diagram of an exemplary video decoding device according to an embodiment of the present disclosure. As shown in the figure, the video decoding device 15 includes an entropy decoding unit 150, an inverse quantization unit 154, an inverse transform processing unit 156, a prediction unit 152, a reconstruction unit 158, a filter unit 159, and a decoded image buffer 160.

[0040] The entropy decoding unit 150 is configured to perform entropy decoding on the received encoded video codestream and extract syntax elements, quantized coefficient blocks, motion information of PUs, etc. The prediction unit 152, the inverse quantization unit 154, the inverse transform processing unit 155, the reconstruction unit 158, and the filter unit 159 can each perform their respective operations based on the syntax elements extracted from the codestream.

[0041] The inverse quantization unit 154 is configured to inverse quantize the quantized TU-related coefficient blocks.

[0042] The inverse transform processor 155 is configured to apply one or more inverse transforms to the dequantized coefficient blocks to generate reconstructed residual blocks of the TUs.

[0043] The prediction unit 152 includes an inter prediction unit 162 and an intra prediction unit 164. If the current block employs intra prediction coding, the intra prediction unit 164 determines an intra prediction mode of the PU based on syntax elements decoded from the codestream, and performs intra prediction in combination with reconstructed reference information adjacent to the current block obtained from the decoded image buffer 160. If the current block employs inter prediction coding, the inter prediction unit 162 determines a reference block of the current block based on the motion information of the current block and the corresponding syntax elements, and obtains the reference block from the decoded image buffer 160 to perform inter prediction.

[0044] The reconstruction unit 158 ​​(indicated in the same figure by a circle with a plus sign after the inverse transformation processing unit 155) is configured to obtain a reconstructed image based on a TU-related reconstructed residual block and a predicted block of the current block generated by intra-prediction or inter-prediction by the prediction unit 152.

[0045] The filter unit 159 is configured to perform loop filtering on the reconstructed image.

[0046] The decoded image buffer 160 is configured to store the loop-filtered reconstructed image and use it as a reference image for subsequent motion compensation, intra-prediction, inter-prediction, etc., or to output the filtered reconstructed image as decoded video data for display on a display device.

[0047] In other embodiments, video decoder device 15 may include more, fewer, or different functional components, for example, in some cases omitting inverse transform processor 155.

[0048] The above video encoding and decoding devices can perform the following basic codec flow: On the encoding side, a frame image is divided into blocks, intra prediction, inter prediction, or other algorithm is performed on a current block to generate a predicted block of the current block, the predicted block is subtracted from the original block of the current block to obtain a residual block, transform and quantize the residual block to obtain a quantized coefficient matrix, and entropy encode the quantized coefficient matrix to generate a code stream. On the decoding side, intra prediction or inter prediction is performed on the current block to generate a predicted block of the current block, while decoded the code stream to obtain a quantized coefficient matrix, perform inverse quantization and inverse transform on the quantized coefficient matrix to obtain a residual block, add the predicted block and the residual block to obtain a reconstructed block, which forms a reconstructed image, and perform loop filtering on the reconstructed image based on the image or block to obtain a decoded image. The encoding side also performs the same operations as the decoding side to obtain a decoded image, also called a loop-filtered reconstructed image. The loop-filtered reconstructed image can be used as a reference frame for inter prediction of a subsequent frame. The block division information, mode information such as prediction, transformation, quantization, entropy coding, loop filtering, and other information, and parameter information determined by the encoding side can be written into the code stream. The decoding side decodes the code stream or analyzes it based on existing information to determine the block division information, mode information such as prediction, transformation, quantization, entropy coding, loop filtering, and other information, and parameter information used by the encoding side, ensuring that the decoded image obtained by the encoding side is the same as the decoded image obtained by the decoding side.

[0049] Although the above is an example of a block-based hybrid coding framework, the embodiments of the present disclosure are not limited thereto, and one or more modules in the framework and one or more steps in the flow may be replaced or optimized as technology advances. The embodiments of the present disclosure relate to, but are not limited to, the above-mentioned intra prediction units and corresponding intra prediction methods on the encoding side and decoding side.

[0050] In this specification, the current block may be a block-level coding unit such as a current coding unit (CU), a current prediction unit (PU), a coding tree unit (CTU), or a sub-block obtained by dividing the current CU or the current PU in the current image.

[0051] In this specification, a reconstructed block refers to an encoded block or a decoded block, and the encoded block or the decoded code may be a CU, a PU, or a sub-block obtained by dividing a CU or a PU.

[0052] Due to the need for parallel processing, an image can be divided into slices or the like. Slices within the same image can be processed in parallel, i.e., there is no data dependency between them. On the other hand, the term "frame" is a commonly used expression, and a frame is generally understood to be one image. In this specification, a frame may represent an image, a slice, or the like.

[0053] Intra prediction Intra prediction uses coded / decoded reconstructed pixels around the current block as reference pixels to predict the current block. For example, as shown in FIG. 2A, a 4x4 block is the current block, and the pixels in the left column and upper row of the current block are the reference pixels of the current block. Intra prediction uses these reference pixels to predict the current block. All of these reference pixels may be available, i.e., they may all have been coded or decoded. However, some may be unavailable. For example, if the current block is at the leftmost end of the entire frame, the reference pixels to the left of the current block are unavailable. Or, when coding / decoding the current block, the lower left part of the current block has not yet been coded / decoded, and the lower left reference pixels are also unavailable. If reference pixels are unavailable, they may be filled with available reference pixels or with a specific value or method, but they may not be filled at all.

[0054] The multiple reference line (MRL) intra prediction method can use more reference pixels to improve coding efficiency. For example, FIG. 2B shows an example using four reference rows / columns.

[0055] Traditional intra prediction mode There are multiple prediction modes for intra prediction, and H.264 provides nine modes for intra prediction of 4x4 blocks. Here, mode 0 copies pixels of the current block vertically to the current block to use as a predicted value, mode 1 copies reference pixels on the left side horizontally to the current block to use as a predicted value, mode 2 (DC mode) uses the average value of eight points A to D and I to L as the predicted value for all points, and modes 3 to 8 each copy reference pixels at a certain angle to corresponding positions in the current block, but because some positions in the current block cannot exactly correspond to the reference pixels, it is also possible to use a weighted average value of the reference pixels or subpixels of interpolated reference pixels.

[0056] In addition to these, there are also average modes (i.e., DC mode), plane modes (e.g., planar mode, plane mode), and bilinear modes (i.e., bilinear mode). However, with technological developments and block size expansion, the number of angular prediction modes is increasing. HEVC uses 35 intra prediction modes, including planar, DC, and 33 angular modes. VVC uses 67 intra prediction modes, including planar, DC, and 65 angular modes, as shown in FIG. 3. In addition to the 67 modes, VVC also provides wide-angle modes for some rectangular blocks with large differences between length and width. For example, the modes indicated by dashed lines in FIG. 4, i.e., the two intervals from -14 to -1 and from 67 to 80, replace some of the conventional modes. AVS3 uses 66 prediction modes, including DC mode, plane mode, bilinear mode, pulse code modulation mode (i.e., PCM mode), and 62 angular modes, as shown in FIG. 5.

[0057] In this specification, the Planar mode, DC mode, and 65 angle mode used in the above VVC, as well as the DC mode, Plane mode, Bilinear mode, PCM mode, and 62 angle mode used in AVS3, are referred to as conventional intra prediction modes.

[0058] Intra-Prediction Filter (IPF) There are also techniques to improve intra-prediction, such as improving sub-pixel interpolation of reference pixels and filtering of predicted pixels. Techniques for filtering predicted pixels, such as the intra prediction filter (IPF) mode in AVS3, can generate predicted values ​​by filtering using reference pixels. The multiple intra prediction filter (MIPF) in AVS3 generates predicted values ​​using different filters for different block sizes. For pixels at different positions within the same block, pixels close to the reference pixel use one filter to generate predicted values, and pixels farther from the reference pixel use another filter to generate predicted values.

[0059] Matrix Weighted Intra Prediction (MIP) Matrix-based intra prediction (MIP) or matrix weighted intra prediction is also an intra prediction mode.

[0060] To predict a block with width W and height H, MIP requires H reconstructed pixels in the left column of the current block and W reconstructed pixels in the row above the current block as input. MIP generates a predicted block through three steps: reference pixel averaging, matrix multiplication, and interpolation. MIP can be considered a process of generating a predicted block from input pixels (reference pixels) using matrix multiplication. MIP provides multiple matrices, and different prediction methods are reflected in different matrices. Using different matrices for the same input pixels will produce different results. The reference pixel averaging and interpolation processes are designed to trade off performance and complexity. For large blocks, reference pixel averaging achieves an effect similar to downsampling, allowing the input to fit into a relatively small matrix, while interpolation achieves an upsampling effect. In this way, it is not necessary to provide a separate MIP matrix for each size of block; only one or more matrices of a specific size are required. As compression performance demands increase and hardware capabilities improve, more complex MIP may emerge in future standards.

[0061] MIP mode is somewhat similar to planar mode, but is clearly more complex and flexible than planar mode.

[0062] Template-based intra-mode derivation (TIMD) As shown in FIG. 6, the template-based intra mode derivation (TIMD) technique uses one region on the left side and one region above the current block as templates. Except for boundary cases, the left and upper regions of the current block can theoretically obtain reconstructed values ​​when encoding / decoding the current block, which is also the basis of the template adaptation method. In TIMD mode, the region filled with grid lines as shown in the figure is used as the template, and the region filled with diagonal lines in the figure is used as the template's reference pixels. The decoding side performs prediction using a certain intra prediction mode with the template and compares the predicted value with the reconstructed value to obtain the cost of the intra prediction mode on the template. Examples include the sum of absolute difference (SAD), the sum of absolute transformed difference after Hadamard transform (SATD), and the sum of squared error (SSE). Because the template and the current block are adjacent and correlated, the performance of a certain prediction mode on the template can be used to estimate the performance of the same prediction mode on the current block. In TIMD mode, several candidate intra-prediction modes are predicted on a template, their costs on the template are obtained, and the predicted values ​​of the one or two intra-prediction modes with the lowest costs are used as the intra-predicted values ​​for the current block.

[0063] Research has shown that, as long as the cost difference between two intra prediction modes on a template is not large, weighted averaging of the predicted values ​​of the two intra prediction modes can improve compression performance. The weights of the predicted values ​​of the two prediction modes are related to the costs, e.g., inversely proportional. Generally, the TIMD mode can select an intra prediction mode by utilizing the prediction effect of the intra prediction mode on a template and weight the two intra prediction modes according to the cost on the template. The advantage of the TIMD mode is that if the current block selects the TIMD mode, it is not necessary to indicate which intra prediction mode to use; the decoding side itself determines it using the above flow, thereby saving some overhead.

[0064] Decoder-side intra-mode derivation (DIMD) The Decoder-side Intra Mode Derivation (DIMD) technique derives the prediction mode using reconstructed pixels to the left and above the current block, but analyzes the gradient of the reconstructed pixels instead of making predictions on a template.

[0065] As shown in Figure 7, the DIMD mode derives an angle mode for intra prediction using reconstructed pixels in a template region adjacent to the current block (a partial region of the top three rows and left three columns of the current block depicted in the figure). In the DIMD mode, for horizontal and vertical filters (3x3 rectangular frames in the figure) that can be slid within the template region, the horizontal gradient Gx and vertical gradient Gy of the center pixel point of each filter (the square marked with cross lines in the figure) are calculated, and the corresponding angle is obtained using the arctangent function atan(Gy / Gx), and converted into one angle mode (for example, one of the 65 angle modes in VVC), which is called the angle mode matching the center pixel point. In one example, the horizontal and vertical filters described above employ 3x3 sober filters.

[0066] For each angle mode, the absolute values ​​of Gx and Gy of all center pixel points matched to that angle mode are multiplied to obtain the cumulative amplitude of that angle mode. For example, if there are three pixel points matched to an angle mode with index 5, and the horizontal and vertical gradients of the first pixel point are Gx1 and Gy1, the horizontal and vertical gradients of the second pixel point are Gx2 and Gy2, and the horizontal and vertical gradients of the third pixel point are Gx3 and Gy3, then the cumulative amplitude of the angle mode with index 5 is equal to |Gx1|+|Gy1|+|Gx2|+|Gy2|+|Gx3|+|Gy3|. Analyzing all center pixel points results in a histogram (this histogram is for ease of understanding only and can be realized in various simple forms), which gives the cumulative amplitude of each angle mode. DIMD selects the two angular modes with the highest cumulative width in the histogram, and then adds the planar mode, weighting the prediction values ​​of a total of three intra-prediction modes, with the weighting depending on the analysis results.

[0067] The DIMD mode selects the angular mode using gradient analysis of reconstructed pixels around the current block, and weights the predicted values ​​of the two angular modes and the planar mode to obtain the predicted value for the DIMD mode. When the current block selects the DIMD mode, the encoding side does not need to indicate which conventional intra prediction mode to use; the decoding side can derive it using the above flow, saving overhead.

[0068] Intra-Block Copy (IBC) Intra Block Copy (IBC) technology significantly improves the compression efficiency of screen content coding, and IBC mode is used for screen content coding from HEVC to VVC. Screen content is generated by a computer, unlike camera-captured content. Screen content has less noise, includes text and computer graphics, and has clear boundaries. In addition, screen content often contains a large amount of overlapping content, as shown in Figure 8.

[0069] In inter prediction, a reference block in a reference picture is used as a prediction block for the current block, but the reference picture is not the current picture. On the other hand, in IBC mode, the inter prediction method is applied to intra prediction, and in IBC mode, a block is found as a prediction block for the current block from the coded / decoded part (also called the reconstructed part) of the current picture. IBC mode is also called intra picture block compensation mode or current picture referencing (CPR) mode.

[0070] In IBC mode, a block vector (BV) is used to represent the difference in position between a current block and a reference block. This is similar to a motion vector (MV) in inter prediction. The encoding side determines the best matching block for the current block within a search range using a block matching method, and then encodes the BV. IBC may be considered a type of intra prediction method, or a type of prediction method independent of intra prediction and inter prediction.

[0071] Template Matching (TM) Template matching (TM) technology is first used for inter prediction, exploiting the correlation between neighboring pixels and using several regions surrounding the current block as templates. When encoding / decoding a current block, the regions to the left and above the current block have already been encoded / decoded according to the encoding order. In actual hardware implementations, the left and above regions are not necessarily decoded when decoding of the current block begins. For example, in HEVC, inter-coded blocks do not require neighboring reconstructed pixels to generate predicted blocks, so the prediction process for inter blocks can be performed in parallel. However, intra-coded blocks require reconstructed pixels to the left and above as reference pixels. Therefore, with appropriate adjustments to the hardware design, reconstructed pixels to the left and above the current block can be used. However, in the encoding order of current standards such as VVC, reconstructed pixels to the right and below the current block are unavailable.

[0072] As shown in FIG. 9, rectangular regions on the left and top of the current block are used as templates. The height of the left template portion is usually the same as the height of the current block, and the width of the top template portion is usually the same as the width of the current block, but may be different. The motion information or motion vector of the current block is determined by searching the best matching position of the template in a reference frame. This process can be roughly described as searching within a certain range from a starting position in a reference frame. Search rules such as the search range and search step size may be preset. Each time a position is moved to, the matching degree between the template corresponding to that position and templates surrounding the current block is calculated. The matching degree can be measured using distortion costs such as SAD, SATD, and mean-square error (MSE). The smaller the SAD, SATD, or MSE value, the higher the matching degree. The cost is calculated using the predicted block of the template corresponding to that position and the reconstructed block of the template surrounding the current block. In addition to searching all pixel positions, sub-pixel positions can also be searched, and the motion information of the current block is determined based on the position with the highest matching degree. By utilizing the correlation between neighboring pixels, the motion information suitable for the template may also be suitable for the current block.

[0073] Because template matching methods are not necessarily applicable to all blocks, the decision to use template matching for the current block is made by, for example, using a control switch to indicate whether template matching should be used for the current block. One popular template matching technique is called decoder-side motion vector derivation (DMVD). Both the encoding and decoding sides can perform searches using templates to derive motion information or find better motion information based on the original motion information. However, there is no need to transmit specific motion vectors or motion vector differentials. Instead, both the encoding and decoding sides perform searches according to the same rules, ensuring consistency between the encoded and decoded data. While template matching can improve compression performance, it also requires a search on the decoding side, which introduces some complexity to the decoding side.

[0074] Intra-template matching prediction (intraTMP) Intra template matching prediction (intraTMP) is a technique that combines IBC and TM. Using TM in interframes can reduce the overhead of MV coding, and similarly, using TM in IBC can also reduce the overhead of BV coding. In one example, the matching block found by TM is directly used as the intraTMP mode prediction block of the current block without requiring BV coding.

[0075] In one example of intraTMP, as shown in Figure 10, a search is performed within a search range, which is a reconstructed region, using an inverted L-shaped region in the upper left corner of the current block as a template. The search range shown includes a partial region R1 of the current CTU, a CTU region R2 in the upper left corner of the current block, a CTU region R3 above the current block, and a CTU region R4 to the left of the current block. This is merely an example, and the search range may differ in actual applications. In the example shown, the optimal matching block was found in R2.

[0076] Geometric Partitioning Mode (GPM) and Angle Weighted Prediction (AWP) The VVC video codec standard has an inter-prediction mode called GPM (geometric partitioning mode). The AVS3 video codec standard has an inter-prediction mode called AWP (angular weighted prediction). These two modes have different names and implementations, but they share the same principle.

[0077] While traditional unidirectional prediction requires only one reference block whose size is the same as the current block, traditional bidirectional prediction uses two reference blocks whose size is the same as the current block, and the pixel value of each point in the predicted block is the average of the corresponding positions in the two reference blocks, i.e., all points in each reference block account for 50%. Bidirectional weighted prediction allows the two reference blocks to have different percentages; for example, all points in the first reference block account for 75% and all points in the second reference block account for 25%. However, all points in the same reference block have the same percentage. Other optimization methods, such as decoder side motion vector refinement (DMVR) and bidirectional optical flow (BIO), may cause some changes to the reference pixels or predicted pixels, but are unrelated to the above principle. BIO may be abbreviated as BDOF.

[0078] GPM or AWP also uses two reference blocks of the same size as the current block, but some pixel positions use 100% of the pixel values ​​of corresponding positions in the first reference block, and some pixel positions use 100% of the pixel values ​​of corresponding positions in the second reference block. The pixel values ​​of corresponding positions in these two reference blocks are used in a certain proportion in the boundary or blending area. The weights of the boundary area also gradually transition. How these weights are assigned is determined by the GPM or AWP mode. The weight of each pixel position is determined according to the GPM or AWP mode. In some cases, for example, when the block size is very small, some GPM or AWP modes do not necessarily guarantee that some pixel positions use 100% of the pixel values ​​of corresponding positions in the first reference block and some pixel positions use 100% of the pixel values ​​of corresponding positions in the second reference block. GPM or AWP uses two reference blocks different in size from the current block, i.e., it considers each to take its necessary parts as reference blocks. In other words, it uses parts with weights other than 0 as reference blocks and excludes parts with weights of 0. The two reference blocks used in GPM or AWP may be prediction blocks of the current block obtained in two prediction modes.

[0079] Figure 11 shows a weighted graph of 64 modes on a square block of GPM in VVC. Black indicates that the weight value of the corresponding position in the first reference block is 0%, white indicates that the weight value of the corresponding position in the first reference block is 100%, and gray areas indicate that the weight value of the corresponding position in the first reference block is greater than 0% and less than 100% by the difference in color intensity. The weight value of the corresponding position in the second reference block is 100% minus the weight value of the corresponding position in the first reference block.

[0080] As shown in Figure 12, this is a weighted graph of 56 modes on a square block of AWP in AVS3. Black indicates that the weight value of the corresponding position of the first reference block is 0%, white indicates that the weight value of the corresponding position of the first reference block is 100%, and the gray area indicates that the weight value of the corresponding position of the first reference block is between 0% and 100% by the difference in color intensity. The weight value of the corresponding position of the second reference block is 100% minus the weight value of the corresponding position of the first reference block.

[0081] GPM and AWP use different weight derivation methods. GPM determines the angle and offset for each mode and then calculates the weight matrix for each mode. AWP first creates a one-dimensional weight line and then fills the entire matrix with the one-dimensional weight line using a method similar to intra-angle prediction.

[0082] Previous codec standards only offered rectangular partitioning methods, whether for CUs, PUs, or TUs. GPM and AWP, on the other hand, achieve the effect of non-rectangular partitioning of prediction without partitioning. GPM and AWP use a weight mask of two reference blocks, i.e., the weighted graph or weight matrix shown above. This mask determines the weights of the two reference blocks when generating a predicted block. Some positions of the predicted block originate from the first reference block, and other positions originate from the second reference block. It can be easily understood that the blending area weights the corresponding positions of the two reference blocks, making the transition smoother. Because GPM and AWP do not divide the current block into two CUs or PUs at a partition line, the current block is processed as a whole, even during the transformation, quantization, inverse transformation, and inverse quantization of the predicted residual.

[0083] Although GPM is an inter technique in VVC, it can also be applied to intra prediction. The two prediction modes of GPM may both be inter prediction modes, one may be inter prediction mode and the other may be intra prediction mode, or both may be intra prediction modes.

[0084] Most Probable Mode (MPM) Intra prediction can improve coding efficiency by using a most probable mode (MPM). The MPM constructs an MPM list using intra prediction modes of neighboring coded or decoded blocks, intra prediction modes derived based on the intra prediction modes of neighboring coded or decoded blocks (e.g., adjacent angle modes), and commonly used or relatively frequently used intra prediction modes, such as DC, planar, and bilinear modes. Intra prediction modes that reference neighboring coded or decoded blocks utilize spatial correlation because textures have a certain spatial continuity. The MPM can be used to derive the intra prediction mode. That is, the probability that the current block uses an intra prediction mode in the MPM list is considered higher than the probability that the current block does not use an intra prediction mode in the MPM list. This allows fewer codewords to be used during binarization, thereby saving overhead and improving coding efficiency.

[0085] When encoding / decoding the current block, the areas to the left and above the current block have already been encoded or decoded, so when creating an MPM list, blocks from the left and above areas are usually used. For example, if the coordinates of the top left corner of the current block are (x, y), the width of the current block is width, and the height of the current block is height, blocks whose coordinates correspond to the adjacent positions marked AL, BL, L, Ar, and A in Figure 13, such as (x-1, y-1), (x-1, y+height), (x-1, y+height-1), (x+width, y-1), and (x+width-1, y-1), are usually used.

[0086] When using the MPM mode, an MPM list is first created and filled with the six intra prediction modes most likely to be selected by the current block. Taking the creation of an MPM list in VVC as an example, VVC first determines whether the intra prediction mode of the current block is PLANAR using the intra_luma_not_planar_flag flag at the block level, and if not, creates one candModeList. The first element of the MPM list may be understood to be PLANAR, and the subsequent elements may be elements of the candModeList in order, or the MPM list may be understood to be the candModeList.

[0087] Within VVC, there are six prediction modes in the MPM list, regardless of whether multiple reference lines (MRL) and intra sub-partitions (ISP) are applied. MPM can be extended to MPM and a second MPM (Secondary MPM), which use lists of length 6 and length 16, respectively. Of the six modes in the MPM list, the planar mode is always filled in the first position in the MPM, and the filling of the remaining five positions is performed sequentially in the following three steps until all five positions are filled. The remaining modes go into the Secondary MPM.

[0088] Step 1: Sequentially embed intra prediction modes used by prediction blocks in five adjacent positions around the current block, which sequentially include the upper left (AL), upper (A), upper right (AR), left (L) and lower left (BL) positions of the current block, as shown in Figure 13 .

[0089] Step 2, the mode is derived using a gradient histogram based on the reconstructed pixels surrounding the current block.

[0090] Step 3: An angle mode close to the angle of the angle mode selected in step 1.

[0091] The Secondary MPM list may consist of some major angle modes other than the intra prediction modes in the MPM.

[0092] If the intra prediction mode selected for the current block is in the MPM list, only its index (which requires only 3 bits) needs to be coded. If the intra prediction mode selected for the current block is not in the MPM list but is included in the 61 non-MPM modes, the intra prediction mode is coded using a truncated binary code (TBC) in the entropy coding step.

[0093] Among the intra prediction modes, MIP mode is similar to PLANAR mode, but MIP texture is more prominent than PLANAR mode. Furthermore, unlike PLANAR mode, MIP has multiple selectable submodes. TIMD mode derives the conventional intra prediction mode actually used by the current block using template information and uses a TIMD mode flag instead of encoding the conventional intra prediction mode actually used. When the current block uses TIMD mode, one or two of multiple conventional intra prediction modes are selected using the TIMD mode template matching method. On the other hand, TIMD may use a combination of multiple intra prediction modes, i.e., it weights and averages the predicted values ​​of multiple intra prediction modes.

[0094] Similar to TIMD, DIMD mode derives the angular mode actually used by the current block using surrounding reconstructed information, such that the encoding of the angular mode actually used by the current block is replaced with a DIMD mode flag. When the current block uses DIMD mode, one or two angular modes are selected from multiple intra prediction modes using a method of analyzing the reconstructed pixel point gradients of DIMD. On the other hand, TIMD may use a combination of multiple intra prediction modes, i.e., a weighted average of the predicted values ​​of multiple intra prediction modes.

[0095] Similarly, the GPM mode for intra prediction does not need to encode the two specific intra prediction modes used during encoding, but instead uses a template to calculate a candidate combination list, where each combination includes a GPM weight derivation mode and two intra prediction modes. The GPM for intra prediction only needs to encode the index in the candidate combination list of the combination used for the current block. On the other hand, the intra GPM may use a combination of two conventional intra prediction modes.

[0096] Conventional intra prediction modes are not of the same dimension as other intra prediction modes (also referred to herein as non-conventional intra prediction modes or non-conventional modes), but are two different types of modes. For example, some non-conventional intra prediction modes, such as TIMD, DIMD, GPM, and AWP, still rely on one conventional intra prediction mode or a combination of multiple conventional intra prediction modes when calculating a prediction block of a current block. For example, some other non-conventional intra prediction modes, such as MIP and IntraTmp, use algorithms different from those of conventional intra prediction modes when calculating a prediction block of a current block.

[0097] For the current block, the intra prediction mode needs to be derived based on the reconstructed samples, which poses problems in the following respects.

[0098] First, when creating an MPM list for a current block, conventional intra prediction modes are usually entered into the list. If the neighboring blocks of the current block use non-conventional intra prediction modes, it is necessary to determine which intra prediction modes to enter into the MPM list.

[0099] Another problem is that there is not necessarily only one type of texture in a block, such as GPM. When determining which mode neighboring blocks use, considering each block as a whole may not be accurate. For example, if the intra prediction mode of a block adjacent to the upper left corner of the current block is added to the MPM list of the current block, the intra prediction mode used by the entire block may be different from the texture characteristics of the finer area immediately adjacent to the upper left corner of the current block.

[0100] Furthermore, when encoding a block, the predicted block is subtracted from the original block to obtain a residual block, which must be transformed, quantized, and encoded before being transmitted to the codestream. When decoding, the predicted block and the residual block are decoded and then added together to obtain a reconstructed block. In intra-coding, the residual is generally not quantized to all zeros; that is, the texture of the decoded block is affected not only by the prediction mode but also by the residual. Generally, the reconstructed block is closer to the original block than the predicted block.

[0101] Considering the above points, when deriving the intra prediction mode of the current block using the intra prediction mode of the reconstructed block, for example, when creating an MPM list for the current block, or when deriving the intra prediction mode of the chrominance block at the corresponding position from the intra prediction mode of the luminance block, it is necessary to optimize the method of deriving the intra prediction mode.

[0102] Therefore, one embodiment of the present disclosure provides an intra prediction method, as shown in FIG. 14, including the following steps.

[0103] In step S110, an intra-prediction mode corresponding to a reconstructed block is obtained, and the intra-prediction mode corresponding to the reconstructed block is determined based on the reconstructed samples of the reconstructed block.

[0104] In this specification, a reconstructed block is an encoded block or a decoded block, and the encoded block or the decoded block may be a CU or PU, or may be a block-level coding unit such as a sub-block obtained by dividing a CU or a PU. The reconstructed samples of a reconstructed block are also called reconstructed values ​​of pixels in the reconstructed block.

[0105] In step S120, deriving the intra prediction mode of the current block according to the intra prediction mode corresponding to the reconstructed block.

[0106] Generally, a reconstructed block is closer to the original block than a predicted block, but in this embodiment, the intra prediction mode corresponding to the reconstructed block is determined based on the reconstructed samples of the reconstructed block, and the intra prediction mode of the current block is derived based on the intra prediction mode corresponding to the reconstructed block, which can more accurately embody the texture characteristics of the reconstructed block, improve the consistency between the result of deriving the intra prediction mode of the current block and the texture characteristics of the current block, and thereby improve coding efficiency.

[0107] In an exemplary embodiment of the present disclosure, the step of determining an intra prediction mode corresponding to the reconstructed block based on reconstructed samples of the reconstructed block includes: determining an intra prediction mode corresponding to the reconstructed block as a whole based on reconstructed samples of the reconstructed block; or The method includes a step of dividing the reconstructed block into a plurality of sub-blocks, and determining one intra prediction mode corresponding to each of the plurality of sub-blocks based on reconstructed samples of the plurality of sub-blocks.

[0108] The calculation of determining one intra prediction mode corresponding to the reconstructed block as a whole is relatively simple, but by dividing the reconstructed block into multiple sub-blocks and determining one intra prediction mode corresponding to each of the multiple sub-blocks, the texture characteristics of local regions within the block can be more accurately embodied. These local regions are usually regions closer to the current block, and by using the intra prediction mode corresponding to the sub-block to derive the intra prediction mode of the current block, the derived intra prediction mode can be more suitable for the intra prediction or intra prediction mode of the current block, thereby improving coding efficiency.

[0109] As described above, the reconstructed block itself may be a sub-block obtained by dividing a CU or PU. When the reconstructed block itself is a sub-block obtained by dividing a CU or PU, the reconstructed block is divided into a plurality of sub-blocks, and the sub-blocks obtained by dividing the CU or PU are further divided into sub-blocks. In one example of this embodiment, the step of dividing the reconstructed block into a plurality of sub-blocks includes a step of dividing the reconstructed block into a plurality of sub-blocks, each having a size of 4x4, when the size of the reconstructed block is N (N≧2) times 4x4. For example, when an ISP mode is selected for intra prediction on a CU and the CU is divided into three 4x8 sub-blocks, after encoding or decoding of these three sub-blocks is completed, if it is necessary to determine an intra-prediction mode corresponding to the three sub-blocks (i.e., the reconstructed block), each 4x8 sub-block can be further divided into two 4x4 sub-blocks, and for each 4x4 sub-block obtained by the division, one intra-prediction mode corresponding to the 4x4 sub-block can be determined based on the reconstructed sample of the 4x4 sub-block.

[0110] In one exemplary embodiment of the present disclosure, the intra prediction mode corresponding to the reconstructed block is an angular mode.

[0111] In one example of this embodiment, the step of determining an intra prediction mode corresponding to the reconstructed block based on reconstructed samples of the reconstructed block includes: determining horizontal and vertical gradients of a plurality of pixel points within the reconstructed block based on the reconstructed samples of the reconstructed block; determining an angular mode matching each of the plurality of pixel points based on horizontal and vertical gradients of the plurality of pixel points; and determining an angle mode that has been matched the most or has the largest accumulated amplitude as one intra prediction mode corresponding to the reconstructed block; The cumulative amplitude of one angle mode is obtained by multiplying the absolute values ​​of the horizontal gradients and the vertical gradients of all pixel points matched to that angle mode in the reconstruction block.

[0112] In one example, when determining the horizontal gradients and vertical gradients of multiple pixel points within a reconstruction block, for example, horizontal and vertical filters may be provided, and the horizontal and vertical filters may be slid in a set step within the reconstruction block, and the horizontal and vertical gradients of the pixel point at which the central pixel point is located may be determined for each position to which the horizontal and vertical filters are slid, thereby obtaining the horizontal and vertical gradients of the multiple pixel points within the reconstruction block.

[0113] In one example, the horizontal and vertical gradients of each pixel point in the reconstruction block may be determined, or the horizontal and vertical gradients of multiple pixel points at a specific position in the reconstruction block may be determined. The horizontal and vertical gradients of a single pixel point can be determined, and the corresponding angle can be calculated using an arctangent function. Each angle can be converted to an angle mode, i.e., the angle mode matching the pixel point can be obtained. The cumulative amplitude of the angle mode can be calculated using the same method as in the DIMD mode.

[0114] In one example of this embodiment, the step of determining an intra prediction mode corresponding to the reconstructed block based on reconstructed samples of the reconstructed block includes: Dividing the reconstructed block into a plurality of sub-blocks, and determining an intra prediction mode corresponding to each of the plurality of sub-blocks according to the following method: determining horizontal and vertical gradients of pixel points within the sub-block based on the reconstructed samples of the sub-block; determining an angle mode matching the pixel point based on a horizontal gradient and a vertical gradient of the pixel point; An angle mode that has the most number of matches or the largest accumulated amplitude is determined as one intra prediction mode corresponding to the sub-block; The cumulative amplitude of the angular mode is obtained by multiplying the absolute value of the horizontal gradient and the absolute value of the vertical gradient of all pixel points matched to the angular mode within the sub-block.

[0115] In this example, the reconstruction block is divided into a plurality of sub-blocks, and the intra prediction mode corresponding to each sub-block is determined, and the horizontal gradient and vertical gradient of pixel points in the sub-block are determined, and the horizontal gradient and vertical gradient of each pixel point in the sub-block can be determined, or the horizontal gradient and vertical gradient of some pixel points (may be one or more) having a specific position in the sub-block can be determined.This specific position may be, for example, the position of the center pixel point determined by a sliding filter.The specific determination method may be the same as in the previous example, and the description here is omitted.

[0116] In an exemplary embodiment of the present disclosure, the step of obtaining an intra prediction mode corresponding to the reconstructed block includes: obtaining an intra-prediction mode corresponding to the reconstructed block from a created intra-prediction mode list, the intra-prediction mode list being configured to store an intra-prediction mode corresponding to the reconstructed block for each position of the reconstructed block; or The method includes determining an intra-prediction mode corresponding to the reconstructed block based on reconstructed samples of the reconstructed block.

[0117] In the first method, an intra prediction list, also referred to as an intra prediction mode field (IPMF), needs to be created and the intra prediction mode corresponding to the reconstructed block needs to be entered. After encoding or decoding of a block is completed (i.e., a reconstructed block is obtained), the intra prediction mode corresponding to the reconstructed block can be determined based on the reconstructed samples of the reconstructed block, and the determined intra prediction mode can be stored in the intra prediction mode list at a position corresponding to the reconstructed block. However, the present disclosure is not limited thereto. Before deriving the intra prediction mode for the current block, the intra prediction mode corresponding to the reconstructed block can also be determined based on the reconstructed samples of the reconstructed block. Here, the reconstructed block may be a reconstructed block adjacent to the current block, or, if the current block is a chrominance block, may be a luminance block at a corresponding position of the chrominance block. Typically, a chrominance block is coded following a luminance block. When coding a chrominance block, the luminance block at the corresponding position has already been coded or decoded. That is, at this time, the luminance block at the corresponding position of the chrominance block is the reconstructed block.

[0118] In one exemplary embodiment of the present disclosure, after deriving the intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block, the method further includes a step of performing intra prediction on the current block based on the intra prediction mode used for the current block determined in the derivation of the intra prediction mode.

[0119] There are several ways to derive the intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block, and in some cases, the intra prediction mode deriving method may be different. For example, when the current block uses the MPM mode, deriving the intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block may include creating an MPM list, that is, entering the intra prediction modes corresponding to neighboring blocks in the reconstructed area around the current block into the MPM list. In addition, when the current block is a chrominance block using the DM mode, the intra prediction mode of the current block may be derived based on the intra prediction mode corresponding to the reconstructed block, and the intra prediction mode of the chrominance block may be set as the intra prediction mode of the chrominance block at the corresponding position of the current block, or the intra prediction mode of the chrominance block may be derived based on the intra prediction mode corresponding to the luminance block at the corresponding position of the current block. In the present disclosure, the method for deriving the intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block is not limited to these two, and the method of the embodiments of the present disclosure can be used in any case where the intra prediction mode of the reconstructed block needs to be used in the encoding or decoding process of the current block.

[0120] An embodiment of the present disclosure further provides a video decoding method, as shown in FIG. 15, including the following steps:

[0121] Step S210: determining that the intra prediction mode of the current block needs to be derived based on the reconstructed samples;

[0122] For example, based on information obtained by decoding, such as the MPM usage flag of the current block, it is determined that the intra prediction mode of the current block needs to be derived based on reconstructed samples.

[0123] Step S220: obtain an intra prediction mode corresponding to the reconstructed block according to the intra prediction method described in any embodiment of the present disclosure, and derive an intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block.

[0124] In step S230, intra prediction is performed on the current block based on the intra prediction mode used by the current block determined by the intra prediction mode derivation.

[0125] In an embodiment of the present disclosure, an intra prediction mode for a current block is derived using an intra prediction mode corresponding to a reconstructed block determined based on reconstructed samples, and intra prediction is performed on the current block based on the intra prediction mode used by the current block determined by the intra prediction mode derivation, which can more accurately embody the texture characteristics of the reconstructed block, improve the consistency between the derived intra prediction mode and the texture characteristics of the current block, and further improve coding efficiency.

[0126] In one exemplary embodiment of the present disclosure, the step of determining that the intra prediction mode of the current block needs to be derived based on reconstructed samples includes a step of determining that the intra prediction mode of the current block needs to be derived based on reconstructed samples if it is determined that the current block uses a most probable mode MPM.

[0127] The step of obtaining an intra prediction mode corresponding to the reconstructed block and deriving an intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block includes the steps of obtaining, based on coordinates of adjacent positions of the current block, an intra prediction mode corresponding to the reconstructed block or a sub-block obtained by dividing the reconstructed block in which the coordinates of the adjacent positions are located; creating an MPM list based on the obtained intra prediction mode; and determining the intra prediction mode to be used by the current block based on the MPM index obtained by decoding and the MPM list.

[0128] The MPM in the embodiment of the present disclosure may be the original MPM list or a secondary MPM list.

[0129] In this embodiment, when determining one intra prediction mode corresponding to the reconstructed block as a whole, the intra prediction mode corresponding to the reconstructed block where the coordinates of the adjacent position are located is obtained, and an MPM list is created. However, when dividing the reconstructed block into multiple sub-blocks and determining one intra prediction mode corresponding to each of the multiple sub-blocks, the intra prediction mode corresponding to the sub-block obtained by dividing the reconstructed block where the coordinates of the adjacent position are located is obtained, and an MPM list is created. The MPM index is an index in the MPM list of the intra prediction mode used by the current block. For example, if the encoding side determines after rate-distortion optimization that the intra prediction mode used by the current block is the angle mode with index 5, which is the third intra prediction mode in the MPM list, the MPM index is 2. The decoding side can determine that the current block uses the angle mode with index 5 based on this MPM index and the MPM list created in the same way.

[0130] In one exemplary embodiment of the present disclosure, the step of determining that the intra prediction mode of the current block needs to be derived based on reconstructed samples includes a step of determining that the intra prediction mode of the current block needs to be derived based on reconstructed samples if it is determined that the current block is a chroma block using direct mode DM.

[0131] The step of obtaining an intra prediction mode corresponding to the reconstructed block and deriving an intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block includes a step of obtaining an intra prediction mode corresponding to a luminance block at a corresponding position of the current block or a sub-block obtained by dividing the luminance block, and determining the obtained intra prediction mode as the intra prediction mode to be used by the current block.

[0132] In this embodiment, when the positions of the chrominance block and the luminance block are the same, the luminance block at the corresponding position of the chrominance block is used, i.e., the luminance block at the same position as the current block. When the positions of the chrominance block and the luminance block are not exactly the same (for example, the chrominance block is part of the luminance block), the luminance block covering a designated pixel point in the chrominance block, which may be set to the central pixel point of the chrominance block or a pixel point at another position, can be used as the luminance block at the corresponding position of the chrominance block (or a sub-block obtained by dividing the luminance block). When determining one intra-prediction mode corresponding to the luminance block as a whole, this embodiment obtains the intra-prediction mode corresponding to the luminance block at the corresponding position of the current block. However, when the luminance block is divided into multiple sub-blocks and the intra-prediction mode for each sub-block is determined, this embodiment obtains the intra-prediction mode corresponding to the sub-block obtained by dividing the luminance block at the corresponding position of the current block.

[0133] In one exemplary embodiment of the present disclosure, the intra-prediction mode corresponding to a reconstructed block is determined based on the reconstructed samples of the reconstructed block, regardless of whether the intra-prediction mode used by the reconstructed block is a conventional intra-prediction mode or a non-conventional intra-prediction mode.

[0134] In another exemplary embodiment of the present disclosure, before the step of obtaining the intra prediction mode corresponding to the reconstructed block, the method further includes the steps of determining the intra prediction mode used by the reconstructed block, and, if the prediction mode used by the reconstructed block is one or more of inter prediction mode, MIP mode, IntraTmp mode, TIMD mode, DIMD mode, GPM mode, AWP mode, IBC mode, IPF mode, and MIPF mode, obtaining the intra prediction mode corresponding to the reconstructed block. That is, in this embodiment, if the prediction mode used by the reconstructed block is a specified prediction mode, the intra prediction mode corresponding to the reconstructed block is determined based on the reconstructed samples of the reconstructed block. If the prediction mode used by the reconstructed block is not a specified prediction mode, the intra prediction mode corresponding to the reconstructed block is not determined based on the reconstructed samples of the reconstructed block. If the reconstructed block uses an intra prediction mode, the intra prediction mode used by the reconstructed block can be directly used to derive the intra prediction mode of the current block, such as creating an MPM list.

[0135] In one example, the specified intra prediction mode includes an inter prediction mode. That is, when a reconstructed block uses an inter prediction mode, the method of the embodiment of the present disclosure can be used to obtain the intra prediction mode corresponding to the reconstructed block, enabling the derivation of the intra prediction mode of the current block using the intra prediction mode corresponding to the reconstructed block, which is advantageous in enriching the information available for the current block and improving coding efficiency. In another example, the specified intra prediction mode includes an MIP mode or an IntraTmp mode. In another example, the specified intra prediction mode includes an MIP mode, an IntraTmp mode, a TIMD mode, or a DIMD mode. In another example, the specified intra prediction mode includes an AWP mode, an IBC mode, an IPF mode, or an MIPF mode. In another example, the specified intra prediction mode includes an MIP mode, an IntraTmp mode, a TIMD mode, a DIMD mode, a GPM mode, an AWP mode, an IBC mode, an IPF mode, or an MIPF mode.

[0136] An embodiment of the present disclosure further provides a video encoding method, as shown in FIG. 16, including the following steps:

[0137] Step 310 determines that the intra prediction mode of the current block needs to be derived based on the reconstructed samples.

[0138] Step 320: obtain the intra prediction mode corresponding to the reconstructed block according to the intra prediction method described in any embodiment of the present disclosure, and derive the intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block.

[0139] In an embodiment of the present disclosure, the intra prediction mode of the current block is derived using the intra prediction mode corresponding to the reconstructed block determined based on the reconstructed sample, thereby more accurately embodying the texture features of the reconstructed block, improving the consistency between the intra prediction mode derivation result and the texture features of the current block, and further improving coding efficiency.

[0140] In one exemplary embodiment of the present disclosure, the step of determining that the intra prediction mode of the current block needs to be derived based on reconstructed samples includes a step of determining that the intra prediction mode of the current block needs to be derived based on reconstructed samples if it is determined that the current block uses a most probable mode MPM.

[0141] The step of obtaining an intra prediction mode corresponding to the reconstructed block and deriving an intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block includes the steps of obtaining, based on coordinates of adjacent positions of the current block, an intra prediction mode corresponding to the reconstructed block or a sub-block obtained by dividing the reconstructed block in which the coordinates of the adjacent positions are located; creating an MPM list based on the obtained intra prediction mode; and encoding syntax elements of the MPM mode of the current block based on the intra prediction mode used by the current block and the MPM list.

[0142] In this embodiment, the intra prediction mode used by the current block is an intra prediction module selected by the current block through rate-distortion optimization. As in the above example, when the current block can use an MPM list, the index of the selected intra prediction mode in the MPM list (i.e., the MPM index) can be coded without directly coding the intra prediction mode.

[0143] In one exemplary embodiment of the present disclosure, the step of determining that the intra prediction mode of the current block needs to be derived based on reconstructed samples includes a step of determining that the intra prediction mode of the current block needs to be derived based on reconstructed samples if the current block is a chroma block that can use a DM mode.

[0144] The step of obtaining an intra prediction mode corresponding to the reconstructed block and deriving an intra prediction mode for the current block based on the intra prediction mode corresponding to the reconstructed block includes the steps of obtaining an intra prediction mode corresponding to a luminance block or a sub-block obtained by dividing the luminance block at a corresponding position of the current block, performing intra prediction on the current block using the obtained intra prediction mode to obtain a predicted block when the current block uses DM mode, and performing rate-distortion optimization based on the obtained predicted block to determine the intra prediction mode to be used by the current block.

[0145] In this embodiment, when performing rate-distortion optimization based on the obtained prediction block, the rate-distortion costs of the DM mode and other modes are calculated based on the prediction block when the current block uses the DM mode and the prediction block when the current block uses other modes, and if the rate-distortion cost of the DM mode is the smallest, the DM mode is selected as the intra prediction module to be used by the current block.

[0146] In an exemplary embodiment of the present disclosure, before the step of obtaining an intra prediction mode corresponding to the reconstructed block, the method further includes: determining an intra prediction mode used by the reconstructed block; and, if the prediction mode used by the reconstructed block is one or more of an inter prediction mode, a MIP mode, an IntraTmp mode, a TIMD mode, a DIMD mode, a GPM mode, an AWP mode, an IBC mode, an IPF mode, and an MIPF mode, obtaining the intra prediction mode corresponding to the reconstructed block. Specific examples are as described above.

[0147] An embodiment of the present disclosure provides an intra prediction method for determining a corresponding intra prediction mode by analyzing information of reconstructed samples of a block after the encoding or decoding is completed, and the intra prediction mode of a current block for subsequent encoding or decoding can be derived based on the corresponding intra prediction mode.

[0148] In one embodiment, an intra prediction mode field (IPMF) is created. Each time a block is coded or decoded, information on the reconstructed sample of the block is analyzed to determine the intra prediction mode corresponding to the block, and the corresponding one or more intra prediction modes are stored in the IPMF. When a current block to be subsequently coded or decoded needs to use the intra prediction mode of a coded or decoded reconstructed block, the corresponding intra prediction mode can be found from the IPMF based on the position of the reconstructed block. This is similar to an inter-motion information field. The IPMF may also be understood as a list in the form of a matrix, where each element in the matrix is ​​the intra prediction mode corresponding to the reconstructed block at the corresponding position.

[0149] In another embodiment, when determining the intra prediction mode corresponding to a reconstructed block, instead of using IPMF, if the current block needs to use the intra prediction mode of a neighboring block, based on the coordinates of the neighboring position, a reconstructed block or a sub-block obtained by dividing the reconstructed block that covers the coordinates of the neighboring position can be found, and the corresponding intra prediction mode can be derived based on the reconstructed sample in the reconstructed block or the sub-block obtained by dividing the reconstructed block.

[0150] After obtaining the reconstructed samples of the reconstructed block, the intra prediction mode corresponding to the reconstructed block can be derived. This can be performed on a block-by-block basis or a sub-block-by-sub-block basis. For example, in a sub-block-by-sub-block basis method, the reconstructed block can be divided into a plurality of 4x4 sub-blocks, each sub-block can be analyzed, and the gradient value of one or more pixel points in the sub-block can be calculated. In general, horizontal and vertical gradients can be calculated and matched to an intra prediction mode based on the two gradient values. The occurrence frequency or cumulative amplitude of all the matched intra prediction modes can be integrated, and the intra prediction mode with the most occurrence frequency or the largest cumulative amplitude can be selected as the corresponding intra prediction mode, and the intra prediction mode can be stored in a corresponding position in the IPMF.

[0151] When the current block undergoes codec processing, the intra prediction mode of the reconstructed block at the corresponding position on the IPMF can be found based on the coordinates of the required neighboring position, such as (x-1, y-1), (x-1, y+height), (x-1, y+height-1), (x+width, y-1), or (x+width-1, y-1), and an MPM list can be created as the intra prediction mode of the neighboring block; that is, after being selected, it is entered into the MPM list. While conventional methods use the intra prediction mode used by a neighboring block when performing intra prediction as the intra prediction mode of the neighboring block, this embodiment uses the intra prediction mode corresponding to the reconstructed block, which is determined based on the reconstructed sample of the reconstructed block. When determining the intra prediction mode corresponding to the reconstructed block, if the reconstructed block is divided into sub-blocks, one reconstructed block can support multiple different intra prediction modes, and the intra prediction mode corresponding to each sub-block better matches the local texture.

[0152] In VVC, only if the corresponding neighboring block is not MIP mode but intra-coded, can the MPM be determined using its intra prediction mode.Using the method of the embodiment of the present disclosure, regardless of whether the neighboring block uses intra prediction mode (i.e., intra coding) or inter prediction mode (i.e., inter coding) when making prediction, the corresponding conventional intra prediction mode can be obtained using a mode such as MIP mode, TIMD mode, DIMD mode, GPM mode, AWP mode, IBC mode, IPF mode, MIPF mode, or IntraTmp.In this way, the current block can obtain more effective information.

[0153] The same applies to the derivation of intra prediction modes between components. For example, if a chrominance block uses the DM mode, the intra prediction mode of the corresponding luminance block must be found. In this case, the intra prediction mode corresponding to the luminance block can be determined based on the reconstructed samples of the luminance block, and intra prediction can be performed on the chrominance block using the intra prediction mode corresponding to the luminance block.

[0154] In this embodiment, the intra prediction mode is determined by analyzing the reconstructed block, and the determined intra prediction mode is more accurate than the intra prediction mode used to predict the reconstructed block, which can improve the accuracy of its use and improve compression efficiency.

[0155] As shown in FIG. 17, one embodiment of the present disclosure further provides an intra-prediction-based device that includes a processor 71 and a memory 73 storing a computer program, and that can realize the intra-prediction method described in any of the embodiments of the present disclosure when the processor 71 executes the computer program.

[0156] An embodiment of the present disclosure further provides a video decoding device, including a processor and a memory storing a computer program, with reference to Figure 17. When the processor executes the computer program, the video decoding method described in any embodiment of the present disclosure can be realized.

[0157] An embodiment of the present disclosure further provides a video encoding device, including a processor and a memory storing a computer program, with reference to Figure 17. When the processor executes the computer program, the video encoding method described in any embodiment of the present disclosure can be realized.

[0158] The processor in the above embodiments of the present disclosure may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a microprocessor, or other conventional processor. The processor may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a distributed logic circuit or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or an equivalent integrated or distributed logic circuit, or a combination of the above devices. That is, the processor in the above embodiments is any processor device or combination of devices that implements the methods, steps, and logical block diagrams disclosed in the embodiments of the present disclosure. When the embodiments of the present disclosure are implemented in part by software, the method of the embodiments of the present disclosure can be realized by storing software instructions in a suitable non-volatile computer-readable storage medium and executing the instructions on hardware by one or more processors. As used herein, the term "processor" refers to the above-mentioned structure or any other structure suitable for implementing the techniques described herein.

[0159] An embodiment of the present disclosure further provides a video codec system including the video encoding device and the video decoding device according to any of the embodiments of the present disclosure.

[0160] An embodiment of the present disclosure further provides a non-transitory computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, can realize the intra prediction method described in any of the embodiments of the present disclosure, or the video decoding method described in any of the embodiments of the present disclosure, or the video encoding method described in any of the embodiments of the present disclosure.

[0161] An embodiment of the present disclosure further provides a computer program product, including a computer program, which, when executed by a processor, can implement the intra prediction method described in any embodiment of the present disclosure, or the video decoding method described in any embodiment of the present disclosure, or the video encoding method described in any embodiment of the present disclosure.

[0162] In one or more exemplary embodiments above, the functions described may be implemented by hardware, software, firmware, or any combination thereof. If implemented by software, the functions are stored on or transmitted via a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit. Computer-readable media include computer-readable storage media corresponding to tangible media, such as data storage media, or communication media facilitating computer programs, such as any medium transmitting from one place to another according to a communication protocol. In this manner, computer-readable media typically correspond to non-transitory tangible computer-readable storage media or communication media, such as signals or carrier waves. Data storage media are any available media accessible by one or more computers or one or more processors to retrieve instructions, code, and / or data structures to implement the techniques described in this disclosure. A computer program product includes a computer-readable medium.

[0163] For example, such computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that stores desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, when instructions are transmitted from a website, server, or other remote source via coaxial cable, fiber optic cable, bipolar line, digital subscriber line (DSL), or wireless technologies such as infrared, radio, or microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, or microwave are included in the definition of media. However, computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media; only non-transitory tangible storage media are covered. As used herein, "magnetic disk" and "optical disk" include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs. Magnetic discs typically reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0164] In some aspects, the functionality described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec device, or the techniques may be implemented entirely within one or more circuits or logic elements.

[0165] The technical means of the embodiments of the present disclosure can be implemented in a wide variety of devices or equipment, including a wireless mobile phone, an integrated circuit (IC), or a set of ICs (e.g., a chipset). The various components, modules, or units described in the embodiments of the present disclosure are described to emphasize functional aspects of devices configured to perform the described techniques, but are not necessarily realized by different hardware units. Rather, as described above, each unit may be combined into a hardware unit of a codec device, or provided in combination with appropriate software and / or firmware in a collection of interoperable hardware units (including one or more processors as described above). In paragraph 1, the present application provides an intra prediction method, the method comprising: obtaining an intra-prediction mode corresponding to a reconstructed block, the intra-prediction mode corresponding to the reconstructed block being determined based on reconstructed samples of the reconstructed block, the reconstructed block being a coded block or a decoded block; deriving an intra-prediction mode for the current block based on the intra-prediction mode corresponding to the reconstructed block. In the second term, the step of determining an intra prediction mode corresponding to the reconstructed block based on the first term, based on the reconstructed samples of the reconstructed block, comprises: determining an intra prediction mode corresponding to the reconstructed block as a whole based on reconstructed samples of the reconstructed block; or The method includes a step of dividing the reconstructed block into a plurality of sub-blocks, and determining one intra prediction mode corresponding to each of the plurality of sub-blocks based on reconstructed samples of the plurality of sub-blocks. In the third clause, based on the second clause, the step of dividing the reconstructed block into a plurality of sub-blocks includes a step of dividing the reconstructed block into a plurality of sub-blocks each having a size of 4x4 when the size of the reconstructed block is N times 4x4 (N≧2). In the fourth term, based on the first term, the intra prediction mode corresponding to the reconstructed block is an angular mode. In paragraph 5, the step of determining an intra prediction mode corresponding to the reconstructed block based on the reconstructed samples of the reconstructed block based on the step of paragraph 4 is: determining horizontal and vertical gradients of a plurality of pixel points within the reconstructed block based on the reconstructed samples of the reconstructed block; determining an angle mode matching each of the plurality of pixel points based on horizontal and vertical gradients of the plurality of pixel points; and determining an angle mode having the most number of matches or the largest accumulated amplitude as one intra prediction mode corresponding to the reconstructed block; The cumulative amplitude of one angular mode is obtained by accumulating the absolute values ​​of the horizontal gradients and the vertical gradients of all pixel points matched to the angular mode in the reconstruction block. In paragraph 6, the step of determining an intra prediction mode corresponding to the reconstructed block based on the reconstructed samples of the reconstructed block based on the step of paragraph 4 is Dividing the reconstructed block into a plurality of sub-blocks, and determining an intra prediction mode corresponding to each of the plurality of sub-blocks as follows: determining horizontal and vertical gradients of pixel points within the sub-block based on the reconstructed samples of the sub-block; Determine an angle mode that matches the pixel point according to the horizontal gradient and vertical gradient of the pixel point; An angle mode having the most number of matchings or the largest accumulated amplitude is determined as one intra prediction mode corresponding to the sub-block; The cumulative amplitude of one angle mode is obtained by multiplying the absolute value of the horizontal gradient and the absolute value of the vertical gradient of all pixel points matched to the angle mode in the sub-block. In clause 7, the step of obtaining an intra prediction mode corresponding to the reconstructed block based on clause 1 includes: obtaining an intra-prediction mode corresponding to the reconstructed block from a created intra-prediction mode list, the intra-prediction mode list being configured to store an intra-prediction mode corresponding to the reconstructed block for each position of the reconstructed block; or determining an intra prediction mode corresponding to the reconstructed block based on reconstructed samples of the reconstructed block. In clause 8, after the step of deriving an intra prediction mode of a current block based on an intra prediction mode corresponding to the reconstructed block based on clause 1, the method further comprises: The method further includes performing intra prediction on the current block based on the intra prediction mode used by the current block determined by deriving the intra prediction mode. In section 9, the present application provides a video decoding method, the method comprising: determining that an intra prediction mode for the current block needs to be derived based on reconstructed samples; obtaining an intra-prediction mode corresponding to a reconstructed block according to the method of any one of paragraphs 1 to 7, and deriving an intra-prediction mode of a current block based on the intra-prediction mode corresponding to the reconstructed block; and performing intra prediction on the current block based on the intra prediction mode used by the current block determined by the intra prediction mode derivation. In clause 10, based on clause 9, determining that an intra prediction mode of the current block needs to be derived based on reconstructed samples includes determining that an intra prediction mode of the current block needs to be derived based on reconstructed samples if it is determined that the current block uses a most probable mode MPM; The step of obtaining an intra prediction mode corresponding to a reconstructed block and deriving an intra prediction mode of a current block based on the intra prediction mode corresponding to the reconstructed block includes the steps of obtaining, based on coordinates of adjacent positions of the current block, an intra prediction mode corresponding to the reconstructed block or a sub-block obtained by dividing the reconstructed block in which the coordinates of the adjacent positions are located; creating an MPM list based on the obtained intra prediction mode; and determining the intra prediction mode to be used by the current block based on the MPM index obtained by decoding and the MPM list. In clause 11, based on clause 9, the step of determining that an intra prediction mode of the current block needs to be derived based on reconstructed samples includes the step of determining that an intra prediction mode of the current block needs to be derived based on reconstructed samples if it is determined that the current block is a chroma block using direct mode DM; The step of obtaining an intra prediction mode corresponding to the reconstructed block and deriving the intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block includes the step of obtaining an intra prediction mode corresponding to a luminance block at a corresponding position of the current block or a sub-block obtained by dividing the luminance block, and determining the obtained intra prediction mode as the intra prediction mode to be used by the current block. In paragraph 12, before the step of obtaining an intra prediction mode corresponding to the reconstructed block based on paragraph 9, the method further comprises: The method further includes a step of determining an intra prediction mode used by the reconstructed block, and a step of obtaining the intra prediction mode corresponding to the reconstructed block if the prediction mode used by the reconstructed block is one or more of inter prediction mode, MIP mode, IntraTmp mode, TIMD mode, DIMD mode, GPM mode, AWP mode, IBC mode, IPF mode, and MIPF mode. In paragraph 13, the present application provides a video encoding method, the method comprising: determining that the coding of an intra prediction mode of the current block needs to be derived based on reconstructed samples; The method includes a step of obtaining an intra prediction mode corresponding to a reconstructed block according to a method described in any one of clauses 1 to 7, and deriving an intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block. In clause 14, based on clause 13, determining that the coding of the intra prediction mode of the current block needs to be derived based on the reconstructed samples includes determining that the coding of the intra prediction mode of the current block needs to be derived based on the reconstructed samples if it is determined that the current block uses a most probable mode MPM; The step of obtaining an intra prediction mode corresponding to a reconstructed block and deriving an intra prediction mode of a current block based on the intra prediction mode corresponding to the reconstructed block includes the steps of obtaining, based on coordinates of adjacent positions of the current block, an intra prediction mode corresponding to the reconstructed block or a sub-block obtained by dividing the reconstructed block in which the coordinates of the adjacent positions are located; creating an MPM list based on the obtained intra prediction mode; and encoding syntax elements of the MPM mode of the current block based on the intra prediction mode used by the current block and the MPM list. In clause 15, based on clause 13, determining that coding of an intra prediction mode of the current block needs to be derived based on reconstructed samples includes determining that, if the current block is a chrominance block capable of using a DM mode, the intra prediction mode of the current block needs to be derived based on reconstructed samples; The step of obtaining an intra prediction mode corresponding to a reconstructed block and deriving an intra prediction mode for a current block based on the intra prediction mode corresponding to the reconstructed block includes the steps of obtaining an intra prediction mode corresponding to a luminance block or a sub-block obtained by dividing the luminance block at a corresponding position of the current block, performing intra prediction on the current block using the obtained intra prediction mode to obtain a predicted block when the current block uses DM mode, and performing rate-distortion optimization based on the obtained predicted block to determine the intra prediction mode to be used by the current block. In paragraph 16, before the step of obtaining an intra prediction mode corresponding to the reconstructed block based on paragraph 13, the method further comprises: The method further includes a step of determining an intra prediction mode used by the reconstructed block, and a step of obtaining the intra prediction mode corresponding to the reconstructed block if the prediction mode used by the reconstructed block is one or more of inter prediction mode, MIP mode, IntraTmp mode, TIMD mode, DIMD mode, GPM mode, AWP mode, IBC mode, IPF mode, and MIPF mode. In paragraph 17, the present application provides an intra prediction device, the device comprising: The intra prediction method according to any one of paragraphs 1 to 8 can be realized by including a processor and a memory in which a computer program is stored, when the processor executes the computer program. In paragraph 18, the present application provides a video decoding device, the device comprising: The video decoding method according to any one of clauses 9 to 12 can be realized by including a processor and a memory storing a computer program, when the processor executes the computer program. In paragraph 19, the present application provides a video encoding device, the device comprising: The video encoding method according to any one of clauses 13 to 16 can be realized by including a processor and a memory in which a computer program is stored, when the processor executes the computer program. In paragraph 20, the present application provides a video codec system, the video codec system comprising: The video encoding device according to clause 18 and the video decoding device according to clause 18. In paragraph 21, the present application provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium comprising: A non-transitory computer-readable storage medium having a computer program stored thereon, When the computer program is executed by a processor, an intra prediction method according to any one of clauses 1 to 8, a video decoding method according to any one of clauses 9 to 12, or a video encoding method according to any one of clauses 13 to 16 can be realized. In paragraph 22, the present application provides a computer program product including a computer program, said computer program product comprising: When the computer program is executed by a processor, an intra prediction method according to any one of clauses 1 to 8, a video decoding method according to any one of clauses 9 to 12, or a video encoding method according to any one of clauses 13 to 16 can be realized.

Claims

1. obtaining an intra-prediction mode corresponding to a reconstructed block, the intra-prediction mode corresponding to the reconstructed block being determined based on reconstructed samples of the reconstructed block, the reconstructed block being a coded block or a decoded block; deriving an intra-prediction mode for a current block based on an intra-prediction mode corresponding to the reconstructed block; Intra prediction method.

2. The step of determining an intra prediction mode corresponding to the reconstructed block based on reconstructed samples of the reconstructed block includes: determining an intra prediction mode corresponding to the reconstructed block as a whole based on reconstructed samples of the reconstructed block; or dividing the reconstructed block into a plurality of sub-blocks, and determining one type of intra prediction mode corresponding to each of the plurality of sub-blocks based on reconstructed samples of the plurality of sub-blocks; 2. The method of claim 1 .

3. the step of dividing the reconstructed block into a plurality of sub-blocks includes, when the size of the reconstructed block is N times 4×4 (N≧2), dividing the reconstructed block into a plurality of sub-blocks each having a size of 4×4.

3. The method of claim 2.

4. the intra prediction mode corresponding to the reconstructed block is an angular mode; 2. The method of claim 1 .

5. The step of determining an intra prediction mode corresponding to the reconstructed block based on reconstructed samples of the reconstructed block includes: determining horizontal and vertical gradients of a plurality of pixel points within the reconstructed block based on the reconstructed samples of the reconstructed block; determining an angle mode matching each of the plurality of pixel points based on horizontal and vertical gradients of the plurality of pixel points; and determining an angle mode having the most number of matches or the largest accumulated amplitude as one intra prediction mode corresponding to the reconstructed block; The cumulative amplitude of one angular mode is obtained by integrating the absolute value of the horizontal gradient and the absolute value of the vertical gradient of all pixel points matched to the angular mode in the reconstruction block.

5. The method of claim 4.

6. The step of determining an intra prediction mode corresponding to the reconstructed block based on reconstructed samples of the reconstructed block includes: Dividing the reconstructed block into a plurality of sub-blocks, and determining an intra prediction mode corresponding to each of the plurality of sub-blocks as follows: determining horizontal and vertical gradients of pixel points within the sub-block based on the reconstructed samples of the sub-block; determining an angle mode matching the pixel point according to the horizontal gradient and vertical gradient of the pixel point; An angle mode having the most number of matchings or the largest accumulated amplitude is determined as one intra prediction mode corresponding to the sub-block; The cumulative amplitude of one angular mode is obtained by multiplying the absolute value of the horizontal gradient and the absolute value of the vertical gradient of all pixel points matched to the angular mode in the sub-block; 5. The method of claim 4.

7. The step of obtaining an intra prediction mode corresponding to the reconstructed block includes: obtaining an intra-prediction mode corresponding to the reconstructed block from a created intra-prediction mode list, the intra-prediction mode list being configured to store an intra-prediction mode corresponding to the reconstructed block for each position of the reconstructed block; or determining an intra prediction mode corresponding to the reconstructed block based on reconstructed samples of the reconstructed block; 2. The method of claim 1 .

8. After the step of deriving an intra prediction mode of a current block based on an intra prediction mode corresponding to the reconstructed block, the method further comprises: and further comprising performing intra prediction on the current block based on the intra prediction mode used by the current block determined by the intra prediction mode derivation.

2. The method of claim 1 .

9. determining that an intra prediction mode for the current block needs to be derived based on reconstructed samples; obtaining an intra-prediction mode corresponding to a reconstructed block according to the method of any one of claims 1 to 7, and deriving an intra-prediction mode for a current block based on the intra-prediction mode corresponding to the reconstructed block; performing intra prediction on the current block based on the intra prediction mode used by the current block determined by deriving the intra prediction mode; Video decoding methods.

10. The step of determining that an intra prediction mode of the current block needs to be derived based on reconstructed samples includes the step of determining that an intra prediction mode of the current block needs to be derived based on reconstructed samples if it is determined that the current block uses a most probable mode MPM; The step of obtaining an intra prediction mode corresponding to the reconstructed block and deriving an intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block includes the steps of obtaining, based on coordinates of adjacent positions of the current block, an intra prediction mode corresponding to the reconstructed block or a sub-block obtained by dividing the reconstructed block in which the coordinates of the adjacent positions are located; creating an MPM list based on the obtained intra prediction mode; and determining the intra prediction mode used by the current block based on the MPM index obtained by decoding and the MPM list.

10. The method of claim 9.

11. The step of determining that an intra prediction mode of the current block needs to be derived based on the reconstructed samples includes the step of determining that an intra prediction mode of the current block needs to be derived based on the reconstructed samples when determining that the current block is a chrominance block using a direct mode DM; The step of obtaining an intra prediction mode corresponding to the reconstructed block and deriving an intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block includes a step of obtaining an intra prediction mode corresponding to a luminance block or a sub-block obtained by dividing the luminance block at a corresponding position of the current block, and determining the obtained intra prediction mode as the intra prediction mode used by the current block.

10. The method of claim 9.

12. Before the step of obtaining an intra prediction mode corresponding to the reconstructed block, the method includes: The method further includes determining an intra prediction mode used by the reconstructed block, and, when the prediction mode used by the reconstructed block is one or more of an inter prediction mode, an MIP mode, an IntraTmp mode, a TIMD mode, a DIMD mode, a GPM mode, an AWP mode, an IBC mode, an IPF mode, and a MIPF mode, obtaining an intra prediction mode corresponding to the reconstructed block.

10. The method of claim 9.

13. determining that the coding of an intra prediction mode of the current block needs to be derived based on reconstructed samples; and obtaining an intra-prediction mode corresponding to the reconstructed block according to the method of any one of claims 1 to 7, and deriving an intra-prediction mode of the current block based on the intra-prediction mode corresponding to the reconstructed block. Video coding methods.

14. The step of determining that the coding of the intra prediction mode of the current block needs to be derived based on the reconstructed samples includes the step of determining that the coding of the intra prediction mode of the current block needs to be derived based on the reconstructed samples if it is determined that the current block uses a most probable mode MPM; The step of obtaining an intra prediction mode corresponding to the reconstructed block and deriving an intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block includes the steps of obtaining, based on coordinates of adjacent positions of the current block, an intra prediction mode corresponding to the reconstructed block or a sub-block obtained by dividing the reconstructed block in which the coordinates of the adjacent positions are located; creating an MPM list based on the obtained intra prediction mode; and encoding a syntax element of the MPM mode of the current block based on the intra prediction mode used by the current block and the MPM list.

14. The method of claim 13.

15. The step of determining that coding of an intra prediction mode of the current block needs to be derived based on reconstructed samples includes, if the current block is a chrominance block capable of using a DM mode, determining that coding of the intra prediction mode of the current block needs to be derived based on reconstructed samples; The step of obtaining an intra prediction mode corresponding to the reconstructed block and deriving an intra prediction mode of the current block based on the intra prediction mode corresponding to the reconstructed block includes the steps of obtaining an intra prediction mode corresponding to a luminance block or a sub-block obtained by dividing the luminance block at a corresponding position of the current block, performing intra prediction on the current block using the obtained intra prediction mode to obtain a predicted block when the current block uses a DM mode, and performing rate-distortion optimization based on the obtained predicted block to determine the intra prediction mode used by the current block.

14. The method of claim 13.

16. Before the step of obtaining an intra prediction mode corresponding to the reconstructed block, the method includes: The method further includes: determining an intra prediction mode used by the reconstructed block; and, when the prediction mode used by the reconstructed block is one or more of an inter prediction mode, a MIP mode, an IntraTmp mode, a TIMD mode, a DIMD mode, a GPM mode, an AWP mode, an IBC mode, an IPF mode, and a MIPF mode, obtaining an intra prediction mode corresponding to the reconstructed block.

14. The method of claim 13.

17. a processor and a memory in which a computer program is stored, the processor executing the computer program being capable of realizing the intra prediction method according to any one of claims 1 to 8; Intra prediction device.

18. a processor and a memory in which a computer program is stored, the processor being capable of implementing the video decoding method according to any one of claims 9 to 12 when the processor executes the computer program; Video decoder.

19. a processor and a memory in which a computer program is stored, the computer program being capable of implementing the video encoding method according to any one of claims 13 to 16 when the processor executes the computer program; Video coding device.

20. 19. A video encoding device according to claim 18, and a video decoding device according to claim 18. Video codec system.

21. A non-transitory computer-readable storage medium having a computer program stored thereon, The computer program, when executed by a processor, is capable of realizing the intra prediction method according to any one of claims 1 to 8, or the video decoding method according to any one of claims 9 to 12, or the video encoding method according to any one of claims 13 to 16. A non-transitory computer-readable storage medium.

22. A computer program product comprising a computer program, The computer program, when executed by a processor, is capable of realizing the intra prediction method according to any one of claims 1 to 8, or the video decoding method according to any one of claims 9 to 12, or the video encoding method according to any one of claims 13 to 16. Computer program products.