Multi-reference line intra-frame prediction method and apparatus, and electronic device and readable storage medium

By obtaining intra prediction mode information on the decoding end and determining the target reference row and column, the problem of low intra prediction accuracy under uneven texture distribution is solved, and the accuracy and encoding efficiency of intra prediction are improved.

WO2024240057A1PCT designated stage expired Publication Date: 2024-11-28VIVO MOBILE COMM CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/093786
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-24
Filing Date
2024-05-17
Publication Date
2024-11-28

AI Technical Summary

Technical Problem

The existing multi-reference row intra prediction method has low prediction accuracy when the texture distribution is uneven, and it is impossible to effectively deal with the asymmetric and uneven texture distribution in video images.

Method used

The intra prediction mode information is obtained by the decoding end, the target intra prediction mode, the target reference row and the target reference column are determined, and the predicted value is calculated based on this information to ensure the accuracy of the predicted value, even if the texture distribution is uneven. It can effectively improve the accuracy of intra prediction.

Benefits of technology

The accuracy and encoding efficiency of intra prediction are improved, and the texture distribution asymmetric and uneven in video images can be effectively handled.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024093786_28112024_PF_FP_ABST
    Figure CN2024093786_28112024_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of video coding and decoding. Disclosed are a multi-reference line intra-frame prediction method and apparatus, and an electronic device and a readable storage medium. The multi-reference line intra-frame prediction method in the embodiments of the present application comprises: a decoding end acquiring intra-frame prediction mode information of the current coding unit from a bitstream, wherein the intra-frame prediction mode information is used for indicating a target intra-frame prediction mode, a target reference line and a target reference column, and the distance between the target reference line and the current coding unit is different from the distance between the target reference column and the current coding unit; the decoding end determining, according to the intra-frame prediction mode information, the target intra-frame prediction mode, the target reference line and the target reference column, which are used by the current coding unit; and the decoding end determining a prediction value of the current coding unit according to the target intra-frame prediction mode, the target reference line and the target reference column.
Need to check novelty before this filing date? Find Prior Art

Description

Multi-reference row intra-frame prediction method, device, electronic device and readable storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese Patent Application No. 202310593214.3 filed in China on May 24, 2023, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present application belongs to the field of video coding and decoding technology, and specifically relates to a multi-reference row intra-frame prediction method, device, electronic device and readable storage medium. Background Art

[0004] Currently, there are two methods for using multiple reference line intra prediction: one directly encodes the index values ​​of multiple reference lines, and the other uses a template-based multiple reference line (TMRL) intra prediction mode, encoding the index values ​​of the combination of the intra prediction mode and the multiple reference lines. These methods are based on the premise that the texture distribution above and to the left of the current coding unit is uniform. However, due to the diversity of texture distribution, if the texture distribution above and to the left of the current coding unit is different or uneven, the prediction value obtained by encoding using these methods will be inaccurate, and the prediction accuracy for the current coding unit will also be low.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a multi-reference row intra-frame prediction method, device, electronic device and readable storage medium, which can solve the problem of low prediction accuracy of the current coding unit in the related art.

[0007] In a first aspect, a multi-reference line intra prediction method is provided, which is performed by a decoding end, and includes:

[0008] A decoding end obtains, from a bitstream, intra-frame prediction mode information of a current coding unit, the intra-frame prediction mode information being used to indicate a target intra-frame prediction mode, a target reference row, and a target reference column, wherein a distance between the target reference row and the current coding unit is different from a distance between the target reference column and the current coding unit;

[0009] The decoding end determines, according to the intra-frame prediction mode information, a target intra-frame prediction mode, a target reference row, and a target reference column used by the current coding unit;

[0010] The decoding end determines a prediction value of the current coding unit according to the target intra prediction mode, the target reference row, and the target reference column.

[0011] In a second aspect, a multi-reference row intra prediction method is provided, which is performed by an encoder. The method includes:

[0012] The encoder sends a code stream to the decoder, where the code stream includes intra-frame prediction mode information of the current coding unit;

[0013] The intra-frame prediction mode information is used to indicate a target intra-frame prediction mode, a target reference row and a target reference column, and a distance between the target reference row and the current coding unit is different from a distance between the target reference column and the current coding unit.

[0014] According to a third aspect, a multi-reference row intra prediction apparatus is provided, comprising:

[0015] an acquisition module, configured to acquire intra-frame prediction mode information of a current coding unit from a bitstream, the intra-frame prediction mode information being used to indicate a target intra-frame prediction mode, a target reference row, and a target reference column, wherein a distance between the target reference row and the current coding unit is different from a distance between the target reference column and the current coding unit;

[0016] A first determining module is configured to determine a target intra-frame prediction mode, a target reference row, and a target reference column used by the current coding unit according to the intra-frame prediction mode information;

[0017] The second determining module is configured to determine a prediction value of the current coding unit according to the target intra prediction mode, the target reference row, and the target reference column.

[0018] In a fourth aspect, a multi-reference row intra prediction apparatus is provided, comprising:

[0019] A sending module, configured to send a code stream to a decoding end, wherein the code stream includes intra-frame prediction mode information of a current coding unit;

[0020] The intra-frame prediction mode information is used to indicate a target intra-frame prediction mode, a target reference row and a target reference column, and a distance between the target reference row and the current coding unit is different from a distance between the target reference column and the current coding unit.

[0021] In a fifth aspect, an electronic device is provided, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the multi-reference row intra-frame prediction method as described in the first aspect or the second aspect are implemented.

[0022] In a sixth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the multi-reference row intra-frame prediction method as described in the first aspect or the second aspect are implemented.

[0023] In the seventh aspect, a chip is provided, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the multi-reference row intra-frame prediction method as described in the first aspect or the second aspect.

[0024] In an eighth aspect, a computer program / program product is provided, which is stored in a storage medium and executed by at least one processor to implement the steps of the multi-reference row intra-frame prediction method as described in the first aspect or the second aspect.

[0025] In an embodiment of the present application, the decoding end determines the target intra-frame prediction mode, target reference row and target reference column of the current coding unit based on the intra-frame prediction mode information of the current coding unit obtained from the code stream, and then determines the prediction value of the current coding unit based on the target intra-frame prediction mode, target reference row and target reference column. The intra-frame prediction mode information is used to indicate the intra-frame prediction mode, target reference row and target reference column of the current coding unit, and the distance between the target reference row and the current coding unit is different from the distance between the target reference column and the current coding unit. Therefore, even for the case of uneven texture distribution in the video image, the decoding end can perform intra-frame prediction based on target reference rows and target reference columns that are at different distances from the current coding unit, which takes into account the asymmetric and uneven texture distribution in the video image, effectively improving the accuracy of intra-frame prediction and improving coding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] FIG1a is a diagram showing the order of angular prediction modes included in the VVC standard;

[0027] FIG1b is a schematic diagram of optional reference rows and reference columns of the current coding unit;

[0028] FIG1c is a schematic diagram of determining reference rows and reference columns in a partial angle prediction mode;

[0029] FIG1d is a schematic diagram of optional neighboring prediction units of the current coding unit;

[0030] FIG2 is a flowchart of a multi-reference row intra prediction method provided by an embodiment of the present application;

[0031] FIG3 is a schematic diagram of determining reference rows and reference columns for different pixels in the current coding unit;

[0032] FIG4 is a structural diagram of a multi-reference row intra prediction apparatus provided by an embodiment of the present application;

[0033] FIG5 is a flowchart of another multi-reference row intra prediction method provided by an embodiment of the present application;

[0034] FIG6 is a structural diagram of another multi-reference row intra prediction apparatus provided by an embodiment of the present application;

[0035] FIG7 is a structural diagram of an electronic device provided in an embodiment of the present application;

[0036] FIG8 is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The following will be combined with the accompanying drawings in the embodiments of this application to clearly describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0038] The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same type, and do not limit the number of objects, for example, the first object can be one or more. In addition, "or" in this application represents at least one of the connected objects. For example, "A or B" covers three options, namely, Option 1: including A but not including B; Option 2: including B but not including A; Option 3: including both A and B. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0039] For better understanding, the relevant concepts and principles that may be involved in the embodiments of this application are explained below.

[0040] The video encoder uses a block-based hybrid coding framework. The coding process includes block partitioning, intra-frame prediction, inter-frame prediction, transform, quantization, loop filtering, and entropy coding. The encoder first divides the image into non-overlapping coding tree units (CTUs), which are then divided into different coding units (CUs) using a quadtree. The encoder then traverses multiple types of trees for partitioning, with the final partitioning result determined by the rate-distortion cost. The encoder uses intra-frame prediction technology based on image texture correlation, using the reconstructed samples in the upper row and left column of the current coding unit as references. By traversing the direct current (DC) mode, planar mode, and angular prediction mode, the encoder selects the optimal intra-frame prediction mode using the rate-distortion cost to remove spatial redundancy in the block.

[0041] The latest video compression standard, Versatile Video Coding (VVC), uses intra-frame prediction with 65 angular prediction modes (predModeIntra), as shown in Figure 1a. VVC supports multiple reference rows. In addition to the immediately preceding row and column of reconstructed samples, six reference rows with index values ​​{1, 3, 5, 7, 12} are included, as shown in Figure 1b. The index value indicates the distance between the reference row and the current coding unit (CU). When the angular prediction mode is between 18 and 50, for certain sample points in the current coding unit, the prediction value requires flipping the left or upper reference sample column (as shown in Figure 1c). This means that within the same angular prediction direction, the prediction value for some positions uses the reconstructed value of the sample in the upper reference row, while the prediction value for some positions uses the reconstructed value of the sample in the left reference column.

[0042] The encoding steps of the template-based multiple reference line intra prediction mode (TMRL) are as follows:

[0043] 1. Create a candidate list of intra prediction modes. The list includes: available intra prediction modes of the five neighboring prediction units of the current coding unit (as shown in FIG1d ), the DC mode, the decoder-side intra mode derivation (DIMD) mode, and the angular prediction modes with offsets from ±1 to ±4 of the angular prediction modes already in the list, until 10 candidate modes are filled.

[0044] 2. Combine the 10 intra prediction modes and the 5 reference lines {1, 3, 5, 7, 12} to obtain a maximum of 50 combinations;

[0045] 3. Use the upper row and left column of the current coding unit as templates, use 50 combinations to obtain the predicted value of the template, and calculate the sum of absolute differences (SAD) between the predicted value and the reconstructed value;

[0046] 4. Sort the 50 combinations in ascending order of SAD values ​​to obtain the top 20 combinations;

[0047] 5. Compare the obtained 20 combinations with other prediction modes in terms of Sum of Absolute Transformed Difference (SATD) and / or rate-distortion cost. If the optimal prediction mode of the current coding unit is one of the 20 combinations, encode the TMRL flag (value 1) and encode the index value of the selected combination (i.e., the optimal prediction mode) to the decoding end.

[0048] After determining that the current coding unit to be decoded is in TMRL mode, the decoder parses the index value of the combination. A candidate list of intra-frame prediction modes is established in the same manner as the encoder, and then combined with the five multi-reference lines to form 50 combinations. Using a template-based method, the 50 combinations are sorted in ascending order of SAD values ​​to obtain the top 20 combinations. Based on the parsed index value, the combination for the current coding unit is derived and used to obtain the predicted value for the current coding unit. The residual information of the current coding unit is parsed to obtain a residual value, which is added to the predicted value to obtain the reconstructed value for the current coding unit.

[0049] Currently used multi-reference row intra-frame prediction methods are based on the premise that the texture distribution above and to the left of the current coding unit is symmetrical and uniform. For all sample points in the current coding unit, the reference row above and the reference column to the left are the same distance from the current coding unit. However, due to the diversity of texture distribution, the prediction value accuracy obtained by the target-based intra-frame prediction method is relatively low. Based on this, the embodiments of the present application propose a multi-reference row intra-frame prediction method.

[0050] The following describes in detail the multi-reference row intra prediction method, apparatus and other related devices provided by the embodiments of the present application through some embodiments and their application scenarios in conjunction with the accompanying drawings.

[0051] Please refer to Figure 2, which is a flowchart of a multi-reference line intra-frame prediction method provided by an embodiment of the present application, and the method is applied to the decoding end. As shown in Figure 2, the method includes the following steps:

[0052] Step 201: The decoding end obtains intra-frame prediction mode information of the current coding unit from the bitstream.

[0053] The intra-frame prediction mode information is used to indicate a target intra-frame prediction mode, a target reference row and a target reference column, and a distance between the target reference row and the current coding unit is different from a distance between the target reference column and the current coding unit.

[0054] Optionally, the intra-frame prediction mode information includes at least one of the following:

[0055] A first index value, where the first index value is a combination index value corresponding to a target combination, where the target combination includes reference row information, reference column information, and an intra prediction mode of the current coding unit;

[0056] first information, the first information including an intra prediction mode of the current coding unit and reference row information of the current coding unit;

[0057] Reference column information of the current coding unit;

[0058] The distance between the reference row corresponding to the reference row information and the current coding unit is a first distance, and the distance between the reference column corresponding to the reference column information and the current coding unit is a second distance, and the first distance is different from the second distance.

[0059] In an embodiment of the present application, the intra-frame prediction mode information includes at least one of a first index value, first information, and reference column information of the current coding unit.

[0060] For example, the intra-frame prediction mode information includes a first index value, that is, a combination index value corresponding to a target combination, and the target combination includes the reference row information, reference column information, and intra-frame prediction mode of the current coding unit. Exemplarily, the reference row information can be a reference row index value, and the reference column information can be a reference column index value. For example, a target combination can include a reference row index value above the current coding unit, a reference column index value to the left, and an intra-frame prediction mode. It can be understood that there are multiple reference rows above the current coding unit, multiple reference columns to the left of the current coding unit, and multiple intra-frame prediction modes. For example, the intra-frame prediction mode can be any of the 65 angular prediction modes in VVC. Based on the combination of these reference row index values, reference column index values, and intra-frame prediction modes, there are multiple possible target combinations. It should be noted that the distance between the reference row corresponding to the reference row index value included in the target combination and the current coding unit is different from the distance between the reference column corresponding to the reference column index value and the current coding unit. For example, the reference row index value in the target combination is 3, which means that the reference row is the third row above the current coding unit. The reference column index value can be 1, 2, or 4, etc., which means that the reference column can be the first, second, or fourth column to the left of the current coding unit, etc., and the reference column does not need to be the third column to the left of the current coding unit. Of course, the reference row and reference column in the target combination can also be other possible cases, which are not listed in detail here.

[0061] Alternatively, the intra-frame prediction mode information may include first information, that is, the intra-frame prediction mode of the current coding unit and the reference row information of the current coding unit. For example, the reference row information may be a reference row index value, and the row number above the current coding unit can be determined based on the reference row index value. In this embodiment, the decoding end may determine the reference column information of the current coding unit based on the reference row information of the current coding unit included in the first information. For example, if the reference row information is a reference row index value, and the reference row index value is 3, that is, the third row above the current coding unit, then any column except the third column from the left of the current coding unit may be used as the reference column of the current coding unit, thereby determining the reference column information of the current coding unit.

[0062] Alternatively, the intra-frame prediction mode information may also include the first information and reference column information of the current coding unit, that is, include the intra-frame prediction mode of the current coding unit, the reference row information of the current coding unit, and the reference column information of the current coding unit.

[0063] Step 202: The decoding end determines a target intra-frame prediction mode, a target reference row, and a target reference column used by the current coding unit according to the intra-frame prediction mode information.

[0064] For example, the intra-frame prediction mode information includes a first index value, and the first index value is a combination index value corresponding to a target combination. The decoding end determines the target combination based on the first index value, uses the intra-frame prediction mode included in the target combination as the target intra-frame prediction mode of the current coding unit, uses the reference row corresponding to the reference row information included in the target combination as the target reference row of the current coding unit, and uses the reference column corresponding to the reference column information included in the target combination as the target reference column of the current coding unit. The first distance between the reference row corresponding to the reference row information in the target combination and the current coding unit is different from the second distance between the reference column corresponding to the reference column information in the target combination and the current coding unit, and thus the distance between the target reference row and the current coding unit is different from the distance between the target reference column and the current coding unit.

[0065] Alternatively, if the intra-frame prediction mode information includes first information, the decoding end uses the intra-frame prediction mode of the current coding unit included in the first information as the target intra-frame prediction mode, uses the reference row corresponding to the reference row information included in the first information as the target reference row of the current coding unit, and determines the reference column based on the reference row information in the first information. For example, if the target reference row determined based on the reference row information in the first information is the third row above the current coding unit, then the columns other than the third column to the left of the current coding unit can be used as the target reference columns. For example, the column closest to the current coding unit, such as the second column from the left, can be used as the target reference column. In this way, the decoding end can determine the target reference row and target reference column of the current coding unit based on the reference row information in the first information, and the distance between the target reference row and the current coding unit is different from the distance between the target reference column and the current coding unit.

[0066] Alternatively, the intra-frame prediction mode information includes first information and reference column information of the current coding unit, then the decoding end uses the intra-frame prediction mode of the current coding unit included in the first information as the target intra-frame prediction mode, uses the reference row corresponding to the reference row information included in the first information as the target reference row of the current coding unit, and uses the reference column corresponding to the reference column information included in the intra-frame prediction mode information as the target reference column of the current coding unit, and the distance between the target reference row and the current coding unit is different from the distance between the target reference column and the current coding unit.

[0067] Step 203: The decoding end determines a prediction value of the current coding unit according to the target intra prediction mode, the target reference row, and the target reference column.

[0068] It is understandable that after the decoder determines the target intra-frame prediction mode, target reference row, and target reference column used by the current coding unit, it calculates the prediction value of the current coding unit based on the target intra-frame prediction mode, target reference row, and target reference column. It should be noted that the specific calculation method for the decoder to calculate the prediction value of the current coding unit based on the intra-frame prediction mode, reference row, and reference column can be referred to in related technologies and will not be described in detail in this embodiment of the application.

[0069] Furthermore, the decoding end parses the residual value of the current coding unit, and obtains a reconstructed value of the current coding unit based on the predicted value and the residual value. For example, the reconstructed value may be the sum of the predicted value and the residual value.

[0070] In an embodiment of the present application, the decoding end determines the target intra-frame prediction mode, target reference row and target reference column of the current coding unit based on the intra-frame prediction mode information of the current coding unit obtained from the code stream, and then determines the prediction value of the current coding unit based on the target intra-frame prediction mode, target reference row and target reference column. The intra-frame prediction mode information is used to indicate the intra-frame prediction mode, target reference row and target reference column of the current coding unit, and the distance between the target reference row and the current coding unit is different from the distance between the target reference column and the current coding unit. Therefore, even in the case of uneven texture distribution in the video image, the decoding end can perform intra-frame prediction based on target reference rows and target reference columns at different distances from the current coding unit, which takes into account the asymmetric and uneven texture distribution in the video image, effectively improving the accuracy of intra-frame prediction and improving coding efficiency.

[0071] Optionally, the intra prediction mode information may include the first information and reference column information of the current coding unit, and step 202 may include:

[0072] The decoding end determines the intra-frame prediction mode of the current coding unit included in the first information as a target intra-frame prediction mode;

[0073] In the case that the intra-frame prediction mode of the current coding unit is a target angle prediction mode, the decoding end determines the target reference row based on the reference row information of the current coding unit included in the first information, and determines the target reference column based on the reference column information of the current coding unit included in the intra-frame prediction mode information.

[0074] It can be understood that the first information includes the intra-frame prediction mode of the current coding unit and the reference row information of the current coding unit. The decoding end determines the intra-frame prediction mode of the current coding unit included in the first information as the target intra-frame prediction mode based on the first information.

[0075] Furthermore, if the intra-frame prediction mode of the current coding unit is a target angle prediction mode, the decoding end determines the target reference row from the reference row corresponding to the reference row information of the current coding unit included in the first information, and determines the target reference column from the reference column corresponding to the reference column information of the current coding unit included in the intra-frame prediction mode information. The distance between the target reference row and the current coding unit is different from the distance between the target reference column and the current coding unit. Thus, the decoding end can perform intra-frame prediction based on the target reference row and target reference column that are at different distances from the current coding unit, taking into account the asymmetric and uneven distribution of texture in the video image, and effectively improving the accuracy of intra-frame prediction.

[0076] Optionally, the target angle prediction mode may refer to an angle prediction mode whose sequence number is greater than 18 and less than 50 among the 65 angle prediction modes of VVC for the intra-frame prediction mode. It should be noted that if the intra-frame prediction mode of the current coding unit is not the target angle prediction mode, for example, the intra-frame prediction mode of the current coding unit is an angle prediction mode whose sequence number is less than or equal to 18 among the 65 angle prediction modes of VVC, or an angle prediction mode greater than or equal to 50, then the decoding end may determine the target reference row based on the reference row corresponding to the reference row information of the current coding unit included in the first information, obtain the first distance between the target reference row and the current coding unit, and use the reference column in the left reference column of the current coding unit whose distance from the current coding unit is equal to the first distance as the target reference column. For example, if the target reference row is the third row above the current coding unit, then the third column from the left of the current coding unit may be used as the target reference column.

[0077] It should be noted that the decoding end can determine the intra-frame prediction mode of the current coding unit based on the first information. It is understandable that the first information includes the intra-frame prediction mode of the current coding unit, and then the decoding end can determine whether the intra-frame prediction mode of the current coding unit is the target angle prediction mode based on the first information.

[0078] Optionally, the decoding end may implement the above embodiment when determining that the intra prediction mode of the current coding unit is a non-TMRL intra prediction mode.

[0079] Optionally, the intra prediction mode information includes the first index value. Before step 202, the method may further include:

[0080] The decoding end constructs an intra-frame prediction mode list and obtains at least one reference row and at least one reference column of the current coding unit, wherein the intra-frame prediction mode list includes at least one intra-frame prediction mode;

[0081] The decoding end combines the intra prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain a first combination list, where the first combination list includes at least one first combination, and each first combination includes one intra prediction mode, one reference row information of the current coding unit, and one reference column information of the current coding unit;

[0082] The decoding end uses the reconstructed samples in the upper X rows and left Y columns of the current coding unit as templates, and calculates the first template residual value corresponding to each first combination in the first combination list, where X, Y, and M are all positive integers;

[0083] The decoding end determines N first combinations from the first combination list according to the magnitude of the first template residual value corresponding to each first combination in the first combination list, where N is a positive integer;

[0084] The first index value is a combination index value corresponding to any combination of the N first combinations.

[0085] Exemplarily, assuming that the decoding end determines that the intra-frame prediction mode of the current coding unit is the TMRL intra-frame prediction mode, the decoding end constructs an intra-frame prediction mode list, which includes at least one intra-frame prediction mode. For example, as shown in Figure 1d, the available intra-frame prediction modes of the adjacent prediction units at specific 5 positions of the current coding unit, the DC mode, the DIMD mode, the angle prediction modes offset from ±1 to ±4 in the angle prediction mode list, etc., are used to construct an intra-frame prediction mode list including 10 intra-frame prediction modes. In addition, the decoding end obtains at least one reference row and at least one reference column of the current coding unit, for example, the upper 5 rows and left 5 columns of the current coding unit. Optionally, the at least one reference row does not include the nearest upper row adjacent to the current coding unit, and the at least one reference column does not include the nearest left column adjacent to the current coding unit.

[0086] Furthermore, the decoding end combines the intra-frame prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain multiple first combinations, and these multiple first combinations constitute a first combination list, and each first combination in the first combination list includes a corresponding combination index value. Among them, a first combination includes an intra-frame prediction mode, a reference row information of the current coding unit, and a reference column information of the current coding unit. For example, assuming that the constructed intra-frame prediction mode list includes 10 intra-frame prediction modes, the at least one reference row obtained by the decoding end is 5, and the at least one reference column is 5, then based on the combination of these 10 intra-frame prediction modes, 5 reference rows, and 5 reference columns, 250 first combinations can be obtained. These 250 first combinations constitute a first combination list, and each first combination includes an intra-frame prediction mode, a reference row information (such as a reference row index value), and a reference column information (such as a reference column index value).

[0087] The decoding end uses the reconstructed samples of the X rows above and Y columns to the left of the current coding unit as a template. For example, the reconstructed samples of the nearest upper row and nearest left column adjacent to the current coding unit can be used as the template. Then, the first template residual value corresponding to each first combination in the first combination list is calculated. For example, taking a first combination in the first combination list as an example, the prediction value of the current coding unit template is calculated based on the intra-frame prediction mode, reference row information, and reference column information included in the first combination. Then, the residual value corresponding to the first combination is determined based on the reconstructed value of the template and the predicted value. For example, the residual value can be the difference between the reconstructed value and the predicted value. Based on this method, the first template residual value corresponding to each first combination can be calculated.

[0088] Furthermore, the decoding end selects N first combinations from the first combination list according to the size of the first template residual value corresponding to each combination.

[0089] Optionally, the N combinations are the first N combinations in the first combination list whose corresponding first template residual values ​​are the smallest. Exemplarily, after obtaining the first template residual value of each first combination in the first combination list, the decoding end may sort these first template residual values ​​in ascending order and obtain the first N first combinations therefrom.

[0090] In this embodiment, the first index value is also the combination index value corresponding to any one of the N first combinations. It should be noted that, in order to ensure synchronization between the codec and encoder, the encoder can determine the N first combinations based on the same method, and select the intra-frame prediction mode, reference row information, and reference column information included in one of the first combinations to perform intra-frame prediction on the current coding unit. The encoder transmits the combination index value (i.e., the first index value) corresponding to the selected first combination to the decoder through the code stream. The decoder can then determine which first combination the encoder uses based on the first index value, and then determine the intra-frame prediction mode included in the first combination as the target intra-frame prediction mode, the reference row corresponding to the reference row information included in the first combination as the target reference row, and the reference column corresponding to the reference column information included in the first combination as the target reference column. The decoder then performs intra-frame prediction on the current coding unit based on the target intra-frame prediction mode, the target reference row, and the target reference column, thereby obtaining the same prediction value as the encoder.

[0091] Optionally, in this implementation, calculating the first template residual value corresponding to each combination in the first combination list includes:

[0092] The decoding end calculates, according to the intra prediction mode and reference row information included in each first combination in the first combination list, a first template sub-residual value corresponding to each first combination in the first combination list;

[0093] The decoding end calculates, according to the intra prediction mode and reference column information included in each first combination in the first combination list, a second template sub-residual value corresponding to each first combination in the first combination list;

[0094] The decoding end determines the first template residual value corresponding to each first combination in the first combination list according to the first template sub-residual value and the second template sub-residual value.

[0095] Exemplarily, if the intra-frame prediction mode of the current coding unit is a target angle prediction mode, for example, the intra-frame prediction mode is one of the angle prediction modes with a sequence number greater than 18 and less than 50 among the 65 angle prediction modes of VVC, the decoding end traverses the intra-frame prediction mode information and reference row information included in each first combination in the first combination list, takes the reconstructed sample of the upper row closest to the current coding unit as a template, calculates the first prediction value of each first combination based on the intra-frame prediction mode information and reference row information included in each first combination, and calculates the first template sub-residual value corresponding to each first combination based on the first prediction value and the reconstructed value of the template. For example, the first template sub-residual value can be the sum of the absolute values ​​of the differences between the reconstructed value and the first prediction value.

[0096] Based on a similar method, the decoding end traverses the intra-frame prediction mode information and reference column information included in each first combination in the first combination list, takes the reconstructed sample of the left column closest to the current coding unit as a template, calculates the second prediction value of each first combination based on the intra-frame prediction mode information and reference column information included in each first combination, and calculates the second template sub-residual value corresponding to each first combination based on the second prediction value and the reconstructed value of the template. For example, the second template sub-residual value can be the sum of the absolute values ​​of the differences between the reconstructed value and the second prediction value.

[0097] Optionally, the first template residual value corresponding to each first combination may be an average of the sum of the absolute values ​​of the first template sub-residual values ​​and the sum of the absolute values ​​of the second template sub-residual values ​​of the first combination. In this way, when the intra-frame prediction mode of the current coding unit is the target angle prediction mode, the first template residual value of each first combination in the first combination list can be calculated based on the above method.

[0098] In an embodiment of the present application, the distance between the reference row corresponding to the reference row information in the first combination and the current coding unit is a first distance, and the distance between the reference column corresponding to the reference column information in the first combination and the current coding unit is a second distance. The first distance is different from the second distance. The template residual value is calculated based on such reference rows and reference columns, and thus, for the case of uneven and asymmetric texture distribution in the video image, the accuracy of intra-frame prediction can be effectively improved.

[0099] It should be noted that if the intra-frame prediction mode of the current coding unit is not the target angle prediction mode, for example, the intra-frame prediction mode of the current coding unit is an angle prediction mode with a sequence number less than or equal to 18 among the 65 angle prediction modes of VVC, or an angle prediction mode greater than or equal to 50, the decoding end can only calculate the sum of the template residual values ​​of the upper reference row and the left reference column with the same distance from the current coding unit. The calculation method can be based on the relevant technology, which will not be repeated in this embodiment.

[0100] Optionally, the intra-frame prediction mode information includes the first index value, and before step 202, the following steps may also be included:

[0101] The decoding end constructs an intra-frame prediction mode list and obtains at least one reference row and at least one reference column of the current coding unit, wherein the intra-frame prediction mode list includes at least one intra-frame prediction mode;

[0102] The decoding end combines the intra prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain a second combination list and a third combination list, wherein the second combination list includes at least one second combination, each of the second combinations includes one intra prediction mode, one reference row information of the current coding unit, and one reference column information of the current coding unit, and the third combination list includes at least one third combination, each of the third combinations includes one intra prediction mode and one reference row information of the current coding unit;

[0103] The decoding end uses the reconstructed samples of the upper P rows and the left Q columns of the current coding unit as templates, calculates the second template residual value corresponding to each second combination in the second combination list, and calculates the third template residual value corresponding to each third combination in the third combination list, where P and Q are both positive integers;

[0104] The decoding end obtains K second combinations in the second combination list according to the magnitude of the second template residual value, and obtains L third combinations in the third combination list according to the magnitude of the third template residual value, where K and L are both positive integers;

[0105] The code stream also includes an index of the second combination list or an index of the third combination list, and the first index value is a combination index value of any second combination in the K second combinations, or a combination index value of any third combination in the L third combinations.

[0106] Exemplarily, assuming that the decoding end determines that the intra-frame prediction mode of the current coding unit is the TMRL intra-frame prediction mode, the decoding end constructs an intra-frame prediction mode list, which includes at least one intra-frame prediction mode. For example, an intra-frame prediction mode list including 10 intra-frame prediction modes may be constructed. In addition, the decoding end obtains at least one reference row and at least one reference column of the current coding unit, for example, the top 5 rows and left 5 columns of the current coding unit. Optionally, the at least one reference row does not include the nearest top row adjacent to the current coding unit, and the at least one reference column does not include the nearest left column adjacent to the current coding unit.

[0107] Furthermore, the decoder combines the intra-frame prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain multiple second combinations and multiple third combinations. The multiple second combinations constitute a second combination list, and the multiple third combinations constitute a third combination list. Each second combination includes an intra-frame prediction mode, reference row information for the current coding unit, and reference column information for the current coding unit; each third combination includes an intra-frame prediction mode and reference row information for the current coding unit, and the reference column information is determined based on the reference row information included in the third combination. For example, the index value of the reference column is the same as the index value of the reference row in the third combination. For example, assuming that the constructed intra-frame prediction mode list includes 10 intra-frame prediction modes, and the decoder obtains 5 at least one reference row and 5 at least one reference column, then based on these 10 intra-frame prediction modes, 5 reference rows, and 5 reference columns, 250 second combinations and 250 third combinations can be obtained. Exemplarily, the reference column in the third combination is determined based on the index value of the reference row, that is, the reference row and reference column in the third combination are the same distance from the current coding unit.

[0108] The decoding end uses the reconstructed samples of the upper P rows and the left Q columns of the current coding unit as a template. For example, the reconstructed samples of the nearest upper row and the nearest left column of the current coding unit can be used as a template. Then, the second template residual value corresponding to each second combination in the second combination list is calculated, and the third template residual value corresponding to each third combination in the third combination list is calculated. It should be noted that the calculation of the second template residual value and the third template residual value can refer to the calculation method of the first template residual value, which will not be repeated here.

[0109] Furthermore, the decoding end selects K second combinations from the second combination list according to the size of the second template residual value corresponding to each combination in the second combination list, and selects L third combinations from the third combination list according to the size of the third template residual value corresponding to each combination in the third combination list.

[0110] Optionally, the K second combinations are the first K second template residual values ​​corresponding to the second combinations in the second combination list having the smallest residual values; or, the L third combinations are the first L third template residual values ​​corresponding to the third combinations in the third combination list having the smallest residual values.

[0111] In this implementation manner, the first index value obtained by the decoding end from the bitstream is also the combined index value of any second combination in the K second combinations, or the combined index value of any third combination in the L third combinations. It should be noted that the encoder can determine K second combinations or L third combinations in the same manner, and select the intra-frame prediction mode, reference row information, and reference column information included in any one of the combinations (the second combination or the third combination) to perform intra-frame prediction on the current coding unit. The encoder transmits the combination index value (i.e., the first index value) corresponding to the selected combination and the index of the second combination list or the index of the third combination list to the decoder via the bitstream. For example, if the encoder selects the second combination, the bitstream also includes the index of the second combination list; if the encoder selects the third combination, the bitstream also includes the index of the third combination list. The decoder then determines the corresponding combination list and the combination in the combination list based on the bitstream, so that the decoder can determine the target intra-frame prediction mode, target reference row, and target reference column based on the combination, and perform intra-frame prediction on the current coding unit based on the target intra-frame prediction mode, target reference row, and target reference column, thereby obtaining the same prediction value as the encoder.

[0112] Optionally, in this embodiment, the reference row information includes the reference row index value, and the reference column information includes the reference column index value;

[0113] wherein the intra-frame prediction mode in the second combination is a target angle prediction mode, and the reference row index value in the second combination is the same as or different from the reference column index value, and the intra-frame prediction mode in the third combination is a non-target angle prediction mode; or,

[0114] The intra-frame prediction mode in the second combination is a target angle prediction mode, and the reference row index value in the second combination is different from the reference column index value. The intra-frame prediction mode in the third combination is any intra-frame prediction mode, and the reference row index value in the third combination is the same as the reference column index value.

[0115] In the embodiment of the present application, two different combinations, namely the second combination and the third combination, are constructed, and the decoder can respectively calculate the template residual values ​​corresponding to the two combinations, thereby obtaining the prediction values ​​corresponding to the two combinations. The decoder can select one combination from these combinations to determine the target intra-frame prediction mode, target reference row, and target reference column to be used. This makes the decoder's intra-frame prediction method more comprehensive and flexible.

[0116] Optionally, the target angle prediction mode may be one of the angle prediction modes with a sequence number greater than 18 and less than 50 among the 65 angle prediction modes of VVC, and the non-target angle prediction mode may refer to any angle prediction mode except the target angle prediction mode.

[0117] Optionally, the intra prediction mode information includes the first index value. Before step 202, the method may further include:

[0118] The decoding end constructs a fourth combination list, the fourth combination list including at least one fourth combination, each of the fourth combinations including a first intra prediction mode, reference row information of the current coding unit, a second intra prediction mode, and reference column information of the current coding unit;

[0119] The decoding end uses the reconstructed samples of the upper R rows of the current coding unit as a template, and calculates a fourth template residual value corresponding to each fourth combination in the fourth combination list according to the first intra prediction mode and the reference row information in the fourth combination, where R is a positive integer;

[0120] The decoding end uses the reconstructed samples of T columns to the left of the current coding unit as a template, and calculates a fifth template residual value corresponding to each fourth combination in the fourth combination list according to the second intra prediction mode and the reference column information in the fourth combination, where T is a positive integer;

[0121] The decoding end determines, according to the fourth template residual value and the fifth template residual value, a sixth template residual value corresponding to each fourth combination in the fourth combination list;

[0122] The decoding end determines H fourth combinations from the fourth combination list according to the sixth template residual value, where H is a positive integer;

[0123] The first index value is a combination index value corresponding to any fourth combination among the H fourth combinations.

[0124] Exemplarily, the decoding end obtains at least one reference row and at least one reference column of the current coding unit, for example, the top five rows and left five columns of the current coding unit; and obtains multiple first intra-frame prediction modes and multiple second intra-frame prediction modes, and combines the multiple first intra-frame prediction modes, the multiple second intra-frame prediction modes, the at least one reference row, and the at least one reference column to obtain multiple fourth combinations, which constitute a fourth combination list. Each fourth combination includes a first intra-frame prediction mode, reference row information for the current coding unit, a second intra-frame prediction mode, and reference column information for the current coding unit. The first intra-frame prediction mode in a fourth combination may be different from the second intra-frame prediction mode in the fourth combination. The first intra-frame prediction modes in different fourth combinations may be the same, and the second intra-frame prediction modes in different fourth combinations may also be the same.

[0125] Furthermore, the decoding end uses the reconstructed samples of the R rows above the current coding unit as a template, for example, uses the reconstructed samples of the row immediately above the current coding unit as a template, and calculates a fourth template residual value corresponding to each fourth combination in the fourth combination list based on the first intra-frame prediction mode and reference row information in the fourth combination. Exemplarily, taking one fourth combination as an example, a prediction value of the current coding unit is calculated based on the intra-frame prediction mode and reference row information included in the fourth combination, and then a fourth template residual value corresponding to the fourth combination is determined based on the reconstructed value of the template and the predicted value. For example, the fourth template residual value may be the absolute value of the difference between the reconstructed value and the predicted value.

[0126] The decoding end uses the reconstructed samples of the T columns to the left of the current coding unit as a template, for example, uses the reconstructed samples of the nearest left column adjacent to the current coding unit as a template, and calculates the fifth template residual value corresponding to each fourth combination in the fourth combination list based on the second intra-frame prediction mode and the reference column information in the fourth combination. The calculation method of the fifth template residual value can refer to the calculation method of the above-mentioned fourth template residual value, which will not be repeated here. In this way, the decoding end can obtain the fourth template residual value obtained by each fourth combination based on the reference row information included therein, and obtain the fifth template residual value obtained by each fourth combination based on the reference column information included therein, thereby determining the sixth template residual value corresponding to each fourth combination, for example, the sixth template residual value can be the absolute value of the sum of the fourth template residual value and the fifth template residual value.

[0127] Furthermore, the decoding end selects H fourth combinations from the fourth combination list based on the magnitude of the sixth template residual value corresponding to each fourth combination in the fourth combination list. Optionally, the H fourth combinations are the first H combinations in the fourth combination list whose corresponding sixth template residual values ​​are the smallest.

[0128] In this embodiment, the first index value is also the combination index value corresponding to any fourth combination among the H fourth combinations. It can be understood that the encoder can determine the H fourth combinations based on the same method as above, and select the first intra-frame prediction mode, reference row information, second intra-frame prediction mode, and reference column information included in any fourth combination to calculate the prediction value of the current coding unit. The encoder sends the combination index value (i.e., the first index value) corresponding to the fourth combination to the decoder via the code stream. Then, the decoder can determine the fourth combination to be selected based on the first index value, thereby using the first intra-frame prediction mode and the second intra-frame prediction mode included in the fourth combination as the target intra-frame prediction mode, determining the reference row corresponding to the reference row information included in the fourth combination as the target reference row, and determining the reference column corresponding to the reference column information in the fourth combination as the target reference column. Intra-frame prediction is performed on the current coding unit based on the target intra-frame prediction mode, target reference row, and target reference column to obtain a prediction value.

[0129] Optionally, in this implementation manner, the intra-frame prediction mode information in the code stream includes the first index value, and step 202 may include:

[0130] The decoding end determines a target fourth combination according to the first index value, where the first index value is a combination index value corresponding to the target fourth combination, and the target fourth combination is any one of the H fourth combinations;

[0131] The decoding end determines the first intra-frame prediction mode and the second intra-frame prediction mode in the target fourth combination as the target intra-frame prediction mode, determines the reference row corresponding to the reference row information in the target fourth combination as the target reference row, and determines the reference column corresponding to the reference column information in the target fourth combination as the target reference column.

[0132] In this case, the decoding end can calculate the prediction value of the current coding unit according to the first intra-frame prediction mode, the second intra-frame prediction mode, the reference row information and the reference column information in the target fourth combination.

[0133] Optionally, the decoding end determines the prediction value of the current coding unit according to the target intra prediction mode, the target reference row, and the target reference column, including:

[0134] The decoding end divides the current coding unit into a first area and a second area based on a preset division method;

[0135] The decoding end calculates a first prediction value of each pixel in the first area according to the first intra-frame prediction mode and the reference row information included in the fourth target combination;

[0136] The decoding end calculates a second prediction value of each pixel in the second area according to the second intra prediction mode and the reference column information included in the fourth target combination;

[0137] The decoding end determines the prediction value of the current coding unit according to the first prediction value of each pixel point in the first area and the second prediction value of each pixel point in the second area.

[0138] For example, the decoding end can be based on the line from the upper left corner to the lower right corner of the current coding unit, dividing the current coding unit into a first area (for example, the upper right area) and a second area (for example, the lower left area); calculating the first prediction value of each pixel point in the first area according to the first intra-frame prediction mode and the reference row information in the target fourth combination, and calculating the second prediction value of each pixel point in the second area according to the second intra-frame prediction mode and the reference column information in the target fourth combination, thereby obtaining the prediction values ​​of all pixel points in the current coding unit, and determining the sum of the prediction values ​​of these pixel points as the prediction value of the current coding unit.

[0139] Optionally, in this implementation, the preset division method is determined based on at least one of the following:

[0140] Intra-frame prediction angle: the decoding end may determine a corresponding preset division method according to the intra-frame prediction angle;

[0141] a partitioning mode index in the bitstream, wherein the partitioning mode index corresponds to any partitioning mode in a preset partitioning mode list, and the decoding end may use the partitioning mode corresponding to the partitioning mode index included in the bitstream as the preset partitioning mode;

[0142] The template residual values ​​corresponding to the multiple candidate partitioning methods are such that the decoding end may use the candidate partitioning method with the smallest template residual value among the multiple candidate partitioning methods as the preset partitioning method.

[0143] In this embodiment, the decoding end divides the current coding unit into a first area and a second area through a preset division method, and then uses different intra-frame prediction modes combined with reference row information or reference column information to calculate the predicted values ​​of pixel points in the first area and the second area, which helps to improve the decoding end's prediction accuracy for the current coding unit and makes the decoding end's intra-frame prediction method more flexible.

[0144] Optionally, when the target pixel point in the current coding unit is located in the first area or the second area, and is located at the junction of the first area and the second area, the decoding end calculates the third prediction value of the target pixel point based on the first intra-frame prediction mode and the reference row information included in the target fourth combination, and calculates the fourth prediction value of the target pixel point based on the second intra-frame prediction mode and the reference column information included in the target fourth combination; the decoding end performs weighted average calculation on the third prediction value and the fourth prediction value to determine the prediction value of the target pixel point.

[0145] It should be noted that the connection between the first area and the second area may refer to the position of the dividing line determined based on a preset division method. For example, assuming that the encoding end divides the current coding unit into the first area and the second area based on the line from the upper left corner to the lower right corner of the current coding unit, the position of the line is also the connection, and the target pixel point is also the pixel point passed by the line.

[0146] In this embodiment, the prediction value of the target pixel point in the current coding unit can be calculated as follows: the decoding end calculates the third prediction value of the target pixel point based on the first intra-frame prediction mode and reference row information included in the target fourth combination, and calculates the fourth prediction value of the target pixel point based on the second intra-frame prediction mode and reference column information included in the target fourth combination, and then performs weighted average calculation on the third prediction value and the fourth prediction value, and the result is also the prediction value of the target pixel point.

[0147] It should be noted that, in this case, the prediction value of the current coding unit is the sum of the first prediction value of each pixel point except the target pixel point in the first area, the second prediction value of each pixel point except the target pixel point in the second area, and the prediction value of each target pixel point in the current coding unit. This will help to improve the accuracy of the prediction value of the current coding unit.

[0148] For better understanding, the technical solution provided in this application is illustrated below through several specific implementation methods.

[0149] Implementation method one:

[0150] Step 11: Determine that the intra prediction mode of the current coding unit to be decoded is the TMRL mode;

[0151] Step 12: Create an intra prediction mode candidate list, obtain the available upper reference row and left reference column of the current coding unit (excluding the upper row and left column adjacent to the current coding unit), and obtain a combination list, where each combination in the combination list includes the intra prediction mode, the upper reference row index value, and the left reference column index value;

[0152] Step 13: Use the upper row and left column adjacent to the current coding unit as templates, calculate the template prediction value of each combination in the combination list, and subtract it from the template reconstruction value to obtain the SAD value; specifically,

[0153] 1. If the intra prediction mode is not an angular prediction mode greater than 18 and less than 50, only the sum of the SAD values ​​of the upper reference row and left reference column with the same distance to the current coding unit in the combination list is calculated;

[0154] 2. If the intra prediction mode is an angle prediction mode greater than 18 and less than 50, traverse all combinations of upper reference rows and left reference columns in the combination list (the distances from the current coding unit can be the same or different) and calculate the SAD value. In this case, the SAD value of the template in the upper row is calculated based on the combination of {intra prediction mode, upper reference row index value}; the SAD value of the template in the left column is calculated based on the combination of {intra prediction mode (the same as the intra prediction mode in the upper template combination), left reference column index value}. The SAD value of the current combination is the sum of the SAD values ​​of the template in the upper row and the SAD values ​​of the template in the left column.

[0155] Step 14: Arrange the combinations in ascending order of SAD values ​​to obtain the top N combinations;

[0156] Step 15: Obtain the combination index value used by the current coding unit from the code stream, and obtain the combination used by the current coding unit according to the index value (the combination is one of the first N combinations);

[0157] Step 16: Use the combination to obtain the predicted value of the current coding unit, and add it to the obtained residual value to obtain the reconstructed value of the current coding unit.

[0158] Implementation method 2:

[0159] Step 21: Determine that the intra prediction mode of the current coding unit is a non-TMRL intra prediction mode;

[0160] Step 22: Obtain the intra-frame prediction mode information of the current coding unit and the information of the upper reference row from the code stream, and derive the information of the left reference column. Specifically, the method for deriving the information of the left reference column is:

[0161] 1. If the intra prediction mode is not an angular prediction mode greater than 18 and less than 50, there is no need to parse the left reference column information from the bitstream. The index value of the left reference column is set to the same index value as the upper reference row.

[0162] 2. If the intra prediction mode is an angle prediction mode greater than 18 and less than 50, the index information of the left reference column is obtained from the bitstream;

[0163] Step 23: Use the obtained intra-frame prediction mode, the upper reference row and the left reference column to obtain the predicted value of the current coding unit, and add it to the obtained residual value to obtain the reconstructed value of the current coding unit.

[0164] Implementation method three:

[0165] Step 31: Determine that the intra prediction mode of the current coding unit is the TMRL mode;

[0166] Step 32: Establish an intra-frame prediction mode candidate list, obtain the available upper reference row and available left reference column of the current coding unit (excluding the upper row and left column adjacent to the current prediction block), and obtain a first combination list and a second combination list. Each combination in the first combination list includes an intra-frame prediction mode, an upper reference row index value, and a left reference column index value. Each combination in the second combination list includes an intra-frame prediction mode and a reference row index value. The index values ​​of the upper reference row and the left reference column in the second combination list are the same. Possible methods for establishing the first combination list and the second combination list include, but are not limited to, the following:

[0167] 1. The intra-frame prediction modes in the first combination list include only angular prediction modes whose intra-frame prediction mode is greater than 18 and less than 50. The index values ​​of the upper reference row and the left reference column can be the same or different. The intra-frame prediction modes in the second combination list include all intra-frame prediction modes except angular prediction modes whose intra-frame prediction mode is greater than 18 and less than 50.

[0168] 2. The intra prediction modes in the first combination list only include angular prediction modes with an intra prediction mode greater than 18 and less than 50, and the index values ​​of the upper reference row and the left reference column are different; the intra prediction modes in the second combination list are not restricted, but the index values ​​of the upper reference row and the left reference column in the second combination list are the same;

[0169] Step 33: Using the upper row and left column adjacent to the current coding unit as templates, respectively calculate the SAD value of the templates of each combination in the first combination list, and calculate the SAD value of the templates of each combination in the second combination list;

[0170] Step 34: Arrange the combinations in ascending order of SAD values ​​to obtain the first N combinations in the first combination list and the first N combinations in the second combination list;

[0171] Step 35: Obtain the combination list information selected by the current coding unit from the bitstream to determine whether it is the first combination list or the second combination list, obtain the combination index information in the selected combination list, and obtain the combination used by the current coding unit (one of the first N combinations in the first combination list or one of the first N combinations in the second combination list) according to the obtained combination index value;

[0172] Step 36: Use the combination to obtain a predicted value of the current coding unit, and add it to the obtained residual value to obtain a reconstructed value of the current coding unit.

[0173] Implementation method four:

[0174] For the case where the intra-frame prediction mode is an angle prediction mode greater than 18 and less than 50, the prediction value of the sample point may use the upper reference row or the left reference column depending on the position of the sample point and the prediction angle. Taking the angle prediction mode greater than or equal to 34 and less than 50 as an example, as shown in Figure 3, the sample point at position p(x1,y1) in the current coding unit uses the upper reference row to obtain the prediction value at the angle indicated by the current arrow, and its prediction value is obtained based on the obtained intra-frame prediction mode and the upper reference row index value; the sample point at position p(x2,y2) uses the (flipped) left reference column to obtain the prediction value at the angle indicated by the current arrow, and its prediction value is obtained based on the obtained intra-frame prediction mode and the left reference column index value.

[0175] Implementation method five:

[0176] Step 41: Create a combination list, where each combination in the combination list includes an upper intra prediction mode, an upper reference row index value, a left intra prediction mode, and a left reference column index value;

[0177] Step 42: Calculate the SAD value of {upper intra prediction mode, upper reference row index} in the combination list using the template in the adjacent upper row of the current coding unit; calculate the SAD value of {left intra prediction mode, left reference column index} in the combination using the template in the adjacent left column; the SAD value of the current combination is the sum of the SAD values ​​of the two templates;

[0178] Step 43: Arrange the combinations in the combination list in ascending order of SAD values, and select the top N combinations;

[0179] Step 44: Obtain the index value of the selected combination from the code stream;

[0180] Step 45: Based on the division method of the current coding unit, the prediction values ​​of the sample points in the upper right area are obtained according to {upper intra-frame prediction mode, upper reference row index value}, and the prediction values ​​of the sample points in the lower left area are obtained according to {left intra-frame prediction mode, left reference column index value}. The prediction values ​​of the sample points on both sides of the edge where the two parts meet are calculated using weighted average.

[0181] The division method can be any of the following:

[0182] 1. A fixed division method;

[0183] 2. The division method derived from the intra-frame prediction angle;

[0184] 3. Obtain a partitioning method index from the bitstream, and select a partitioning method corresponding to the partitioning method index from a list of candidate partitioning methods;

[0185] 4. From multiple candidate partitioning methods, select the partitioning method corresponding to the smallest SAD value among the candidate partitioning methods according to the template.

[0186] It should be noted that the above-mentioned several implementation modes are all applied to the decoding end. The specific implementation process of each of the above-mentioned implementation modes can be described in combination with the embodiment shown in FIG. 2 , and will not be repeated here.

[0187] The multi-reference line intra prediction method provided in the embodiment of the present application can be executed by a multi-reference line intra prediction device. In the embodiment of the present application, the multi-reference line intra prediction method performed by the multi-reference line intra prediction device is used as an example to illustrate the multi-reference line intra prediction device provided in the embodiment of the present application.

[0188] Please refer to FIG. 4 , which is a structural diagram of a multi-reference line intra prediction apparatus provided by an embodiment of the present application. As shown in FIG. 4 , the multi-reference line intra prediction apparatus 400 includes:

[0189] an acquisition module 401, configured to acquire intra-frame prediction mode information of a current coding unit from a bitstream, the intra-frame prediction mode information being used to indicate a target intra-frame prediction mode, a target reference row, and a target reference column, wherein a distance between the target reference row and the current coding unit is different from a distance between the target reference column and the current coding unit;

[0190] A first determining module 402 is configured to determine a target intra prediction mode, a target reference row, and a target reference column used by the current coding unit according to the intra prediction mode information;

[0191] The second determining module 403 is configured to determine a prediction value of the current coding unit according to the target intra prediction mode, the target reference row, and the target reference column.

[0192] Optionally, the intra-frame prediction mode information includes at least one of the following:

[0193] A first index value, where the first index value is a combination index value corresponding to a target combination, where the target combination includes reference row information, reference column information, and an intra prediction mode of the current coding unit;

[0194] first information, the first information including an intra prediction mode of the current coding unit and reference row information of the current coding unit;

[0195] Reference column information of the current coding unit;

[0196] The distance between the reference row corresponding to the reference row information and the current coding unit is a first distance, and the distance between the reference column corresponding to the reference column information and the current coding unit is a second distance, and the first distance is different from the second distance.

[0197] Optionally, the intra prediction mode information includes the first information and reference column information of the current coding unit, and the first determining module 402 is further configured to:

[0198] Determining the intra-frame prediction mode of the current coding unit included in the first information as a target intra-frame prediction mode;

[0199] In a case where the intra-frame prediction mode of the current coding unit is a target angle prediction mode, a target reference row is determined according to the reference row information of the current coding unit included in the first information, and a target reference column is determined according to the reference column information of the current coding unit included in the intra-frame prediction mode information.

[0200] Optionally, the intra-frame prediction mode information includes the first index value, and the apparatus further includes a processing module, wherein the processing module is configured to:

[0201] Constructing an intra-frame prediction mode list and obtaining at least one reference row and at least one reference column of the current coding unit, wherein the intra-frame prediction mode list includes at least one intra-frame prediction mode;

[0202] Combining the intra prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain a first combination list, where the first combination includes at least one first combination, each first combination including one of the intra prediction modes, one reference row information of the current coding unit, and one reference column information of the current coding unit;

[0203] Using the reconstructed samples in the upper X rows and left Y columns of the current coding unit as templates, calculating the first template residual value corresponding to each first combination in the first combination list, where X, Y, and M are all positive integers;

[0204] Determine N first combinations from the first combination list according to the magnitude of the first template residual value corresponding to each first combination in the first combination list, where N is a positive integer;

[0205] The first index value is a combination index value corresponding to any combination of the N first combinations.

[0206] Optionally, the N first combinations are the first N first template residual values ​​corresponding to the first combinations in the first combination list that are the smallest.

[0207] Optionally, the processing module is further configured to:

[0208] Calculating, according to the intra prediction mode and reference row information included in each first combination in the first combination list, a first template sub-residual value corresponding to each first combination in the first combination list;

[0209] Calculating, according to the intra prediction mode and reference column information included in each first combination in the first combination list, a second template sub-residual value corresponding to each first combination in the first combination list;

[0210] Determine the first template residual value corresponding to each first combination in the first combination list according to the first template sub-residual value and the second template sub-residual value.

[0211] Optionally, the intra-frame prediction mode information includes the first index value, and the apparatus further includes a processing module, wherein the processing module is configured to:

[0212] Constructing an intra-frame prediction mode list and obtaining at least one reference row and at least one reference column of the current coding unit, wherein the intra-frame prediction mode list includes at least one intra-frame prediction mode;

[0213] Combining the intra prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain a second combination list and a third combination list, wherein the second combination list includes at least one second combination, each second combination includes one intra prediction mode, one reference row information of the current coding unit, and one reference column information of the current coding unit, and the third combination list includes at least one third combination, each third combination includes one intra prediction mode and one reference row information of the current coding unit;

[0214] Using the reconstructed samples of the upper P rows and the left Q columns of the current coding unit as templates, calculating the second template residual value corresponding to each second combination in the second combination list, and calculating the third template residual value corresponding to each third combination in the third combination list, where P and Q are both positive integers;

[0215] Obtain K second combinations in the second combination list according to the magnitude of the second template residual value, and obtain L third combinations in the third combination list according to the magnitude of the third template residual value, where K and L are both positive integers;

[0216] The code stream also includes an index of the second combination list or an index of the third combination list, and the first index value is a combination index value of any second combination in the K second combinations, or a combination index value of any third combination in the L third combinations.

[0217] Optionally, the K second combinations are first K combinations in the second combination list whose corresponding second template residual values ​​are smallest; or,

[0218] The L third combinations are the first L third template residual values ​​corresponding to the third combinations in the third combination list that are the smallest.

[0219] Optionally, the reference row information includes the reference row index value, and the reference column information includes the reference column index value;

[0220] wherein the intra-frame prediction mode in the second combination is a target angle prediction mode, and the reference row index value in the second combination is the same as or different from the reference column index value, and the intra-frame prediction mode in the third combination is a non-target angle prediction mode; or,

[0221] The intra-frame prediction mode in the second combination is a target angle prediction mode, and the reference row index value in the second combination is different from the reference column index value. The intra-frame prediction mode in the third combination is any intra-frame prediction mode, and the reference row index value in the third combination is the same as the reference column index value.

[0222] Optionally, the intra-frame prediction mode information includes the first index value, and the apparatus further includes a processing module, wherein the processing module is configured to:

[0223] Constructing a fourth combination list, the fourth combination list including at least one fourth combination, each of the fourth combinations including a first intra prediction mode, reference row information of the current coding unit, a second intra prediction mode, and reference column information of the current coding unit;

[0224] Using the reconstructed samples of the upper R rows of the current coding unit as a template, and calculating a fourth template residual value corresponding to each fourth combination in the fourth combination list according to the first intra prediction mode and the reference row information in the fourth combination, where R is a positive integer;

[0225] Using the reconstructed samples of T columns to the left of the current coding unit as templates, and calculating a fifth template residual value corresponding to each fourth combination in the fourth combination list according to the second intra prediction mode and the reference column information in the fourth combination, where T is a positive integer;

[0226] Determine, according to the fourth template residual value and the fifth template residual value, a sixth template residual value corresponding to each fourth combination in the fourth combination list;

[0227] Determine H fourth combinations from the fourth combination list according to the sixth template residual value, where H is a positive integer;

[0228] The first index value is a combination index value corresponding to any fourth combination among the H fourth combinations.

[0229] Optionally, the H fourth combinations are first H of the fourth combinations in the fourth combination list whose corresponding sixth template residual values ​​are the smallest.

[0230] Optionally, the intra prediction mode information includes the first index value, and the first determining module 402 is further configured to:

[0231] Determine a target fourth combination according to the first index value, where the first index value is a combination index value corresponding to the target fourth combination, and the target fourth combination is any one of the H fourth combinations;

[0232] The first intra-frame prediction mode and the second intra-frame prediction mode in the target fourth combination are determined as target intra-frame prediction modes, the reference row corresponding to the reference row information in the target fourth combination is determined as the target reference row, and the reference column corresponding to the reference column information in the target fourth combination is determined as the target reference column.

[0233] Optionally, the second determining module 403 is further configured to:

[0234] Dividing the current coding unit into a first region and a second region based on a preset division method;

[0235] Calculating a first prediction value of each pixel in the first area according to the first intra-frame prediction mode and the reference row information included in the target fourth combination;

[0236] Calculate a second prediction value of each pixel in the second area according to the second intra prediction mode and the reference column information included in the target fourth combination;

[0237] Determine a prediction value of the current coding unit according to a first prediction value of each pixel in the first area and a second prediction value of each pixel in the second area.

[0238] Optionally, the second determining module 403 is further configured to:

[0239] When a target pixel in the current coding unit is located in the first region or the second region and is located at a junction of the first region and the second region, a third prediction value of the target pixel is calculated according to the first intra prediction mode and the reference row information included in the target fourth combination, and a fourth prediction value of the target pixel is calculated according to the second intra prediction mode and the reference column information included in the target fourth combination;

[0240] A weighted average calculation is performed on the third predicted value and the fourth predicted value to determine the predicted value of the target pixel.

[0241] Optionally, the preset division method is determined based on at least one of the following:

[0242] Intra prediction angle;

[0243] A division method index in the code stream, wherein the division method index corresponds to any division method in a preset division method list;

[0244] The template residual values ​​corresponding to multiple candidate partitioning methods.

[0245] In an embodiment of the present application, the intra-frame prediction mode information is used to indicate the intra-frame prediction mode, target reference row and target reference column of the current coding unit, and the distance between the target reference row and the current coding unit is different from the distance between the target reference column and the current coding unit. Therefore, even for the case of uneven texture distribution in the video image, the device can perform intra-frame prediction based on target reference rows and target reference columns with different distances from the current coding unit, which takes into account the asymmetric and uneven texture distribution in the video image, effectively improves the accuracy of intra-frame prediction, and improves coding efficiency.

[0246] The multi-reference row intra prediction apparatus in the embodiments of the present application can be an electronic device, such as an electronic device with an operating system, or a component of an electronic device, such as an integrated circuit or chip. The electronic device can be a terminal or other device other than a terminal. For example, the terminal can include but is not limited to the types of terminals listed above, and the other device can be a server, a network attached storage (NAS), etc., which is not specifically limited in the embodiments of the present application.

[0247] The multi-reference row intra-frame prediction device provided in the embodiment of the present application can implement each process implemented in the method embodiment of Figure 2 and achieve the same technical effect. To avoid repetition, it will not be described here.

[0248] Please refer to Figure 5, which is a flowchart of another multi-reference line intra prediction method provided by an embodiment of the present application, and the method is applied to the encoding end. As shown in Figure 5, the method includes the following steps:

[0249] Step 501: The encoder sends a code stream to the decoder, where the code stream includes intra-frame prediction mode information of the current coding unit.

[0250] The intra-frame prediction mode information is used to indicate a target intra-frame prediction mode, a target reference row and a target reference column, and a distance between the target reference row and the current coding unit is different from a distance between the target reference column and the current coding unit.

[0251] It should be noted that after receiving the code stream, the decoding end can obtain the intra-frame prediction mode information from the code stream, and then can obtain the target intra-frame prediction mode, target reference row and target reference column. The decoding end can perform intra-frame prediction on the current coding unit based on the target intra-frame prediction mode, target reference row and target reference column to determine the prediction value of the current coding unit.

[0252] In an embodiment of the present application, the encoding end can inform the decoding end of the target intra-frame prediction mode, target reference row, and target reference column used for intra-frame prediction of the current coding unit through the code stream, thereby enabling the decoding end to perform intra-frame prediction on the current coding unit based on the target intra-frame prediction mode, target reference row, and target reference column to obtain the same prediction value as the encoding end. Wherein, the distance between the target reference row and the current coding unit is different from the distance between the target reference column and the current coding unit, so that even for the case of uneven texture distribution in the video image, the encoding end can perform intra-frame prediction based on target reference rows and target reference columns that are different in distance from the current coding unit, thus taking into account the asymmetric and uneven texture distribution in the video image, effectively improving the accuracy of intra-frame prediction and improving coding efficiency.

[0253] Optionally, the intra-frame prediction mode information includes at least one of the following:

[0254] A first index value, where the first index value is a combination index value corresponding to a target combination, where the target combination includes reference row information, reference column information, and an intra prediction mode of the current coding unit;

[0255] first information, the first information including an intra prediction mode of the current coding unit and reference row information of the current coding unit;

[0256] Reference column information of the current coding unit;

[0257] The distance between the reference row corresponding to the reference row information and the current coding unit is a first distance, and the distance between the reference column corresponding to the reference column information and the current coding unit is a second distance, and the first distance is different from the second distance.

[0258] It should be noted that the possible situations of the information content included in the intra-frame prediction mode information can be referred to the specific description in the embodiment described in FIG. 2 above, which will not be repeated here.

[0259] Optionally, the intra-frame prediction mode information includes the first index value, and before the encoder sends the code stream to the decoder, the method further includes:

[0260] The encoder constructs an intra-frame prediction mode list and obtains at least one reference row and at least one reference column of the current coding unit, wherein the intra-frame prediction mode list includes at least one intra-frame prediction mode;

[0261] The encoder combines the intra prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain a first combination list, where the first combination includes at least one first combination, each first combination including one intra prediction mode, one reference row information of the current coding unit, and one reference column information of the current coding unit;

[0262] The encoder uses the reconstructed samples in the upper X rows and left Y columns of the current coding unit as templates, and calculates first template residual values ​​corresponding to respective first combinations in the first combination list, where X, Y, and M are all positive integers;

[0263] The encoder determines, from the first combination list, N first combinations according to the magnitude of the first template residual value corresponding to each first combination in the first combination list, where N is a positive integer;

[0264] The encoding end calculates the rate-distortion cost of the current coding unit based on the N first combinations, and calculates the rate-distortion cost of the current coding unit based on other prediction modes, where the other prediction modes are prediction modes other than the intra-frame prediction modes included in the N first combinations; for example, the other prediction modes may include intra-frame prediction modes, inter-frame prediction modes, etc.

[0265] In a case where the calculated minimum value of the rate-distortion cost is calculated based on a target first combination among the N first combinations, the first index value is a combination index value corresponding to the target first combination.

[0266] Optionally, the N first combinations are the first N first template residual values ​​corresponding to the first combinations in the first combination list that are the smallest.

[0267] Optionally, calculating the first template residual value corresponding to each first combination in the first combination list includes:

[0268] The encoder calculates, according to the intra prediction mode and reference row information included in each first combination in the first combination list, a first template sub-residual value corresponding to each first combination in the first combination list;

[0269] The encoder calculates, according to the intra prediction mode and reference column information included in each first combination in the first combination list, a second template sub-residual value corresponding to each first combination in the first combination list;

[0270] The encoder determines, according to the first template sub-residual value and the second template sub-residual value, a first template residual value corresponding to each first combination in the first combination list.

[0271] It should be noted that in the embodiment of the present application, the specific implementation process of calculating the rate-distortion cost based on the intra-frame prediction mode can refer to related technologies and is not specifically explained in this embodiment.

[0272] Optionally, the intra-frame prediction mode information includes the first index value, and before the encoder sends the code stream to the decoder, the method further includes:

[0273] The encoder constructs an intra-frame prediction mode list and obtains at least one reference row and at least one reference column of the current coding unit, wherein the intra-frame prediction mode list includes at least one intra-frame prediction mode;

[0274] The encoder combines the intra prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain a second combination list and a third combination list, wherein the second combination list includes at least one second combination, each of the second combinations includes one intra prediction mode, one reference row information of the current coding unit, and one reference column information of the current coding unit, and the third combination list includes at least one third combination, each of the third combinations includes one intra prediction mode and one reference row information of the current coding unit;

[0275] The encoder uses the reconstructed samples of the upper P rows and the left Q columns of the current coding unit as templates, calculates the second template residual value corresponding to each second combination in the second combination list, and calculates the third template residual value corresponding to each third combination in the third combination list, where P and Q are both positive integers;

[0276] The encoder obtains K second combinations from the second combination list based on the magnitude of the second template residual value, and obtains L third combinations from the third combination list based on the magnitude of the third template residual value, where K and L are both positive integers;

[0277] The encoder calculates, based on the K second combinations, the rate-distortion costs of the current coding unit, based on the L third combinations, and based on other prediction modes other than the intra prediction modes included in the K second combinations and the L third combinations;

[0278] In this case, when the calculated minimum value of the rate-distortion cost is calculated based on the target second combination among the K second combinations, the codestream also includes an index of the second combination list, and the first index value is the combination index value corresponding to the target second combination; when the calculated minimum value of the rate-distortion cost is calculated based on the target third combination among the L third combinations, the codestream also includes an index of the third combination list, and the first index value is the combination index value corresponding to the target third combination.

[0279] Optionally, the K second combinations are first K combinations in the second combination list whose corresponding second template residual values ​​are smallest; or,

[0280] The L third combinations are the first L third template residual values ​​corresponding to the third combinations in the third combination list that are the smallest.

[0281] Optionally, the reference row information includes the reference row index value, and the reference column information includes the reference column index value;

[0282] wherein the intra-frame prediction mode in the second combination is a target angle prediction mode, and the reference row index value in the second combination is the same as or different from the reference column index value, and the intra-frame prediction mode in the third combination is a non-target angle prediction mode; or,

[0283] The intra-frame prediction mode in the second combination is a target angle prediction mode, and the reference row index value in the second combination is different from the reference column index value. The intra-frame prediction mode in the third combination is any intra-frame prediction mode, and the reference row index value in the third combination is the same as the reference column index value.

[0284] Optionally, the intra-frame prediction mode information includes the first index value, and before the encoder sends the code stream to the decoder, the method further includes:

[0285] The encoding end constructs a fourth combination list, where the fourth combination list includes at least one fourth combination, and each fourth combination includes a first intra prediction mode, reference row information of the current coding unit, a second intra prediction mode, and reference column information of the current coding unit;

[0286] The encoder uses the reconstructed samples of the upper R rows of the current coding unit as a template, and calculates a fourth template residual value corresponding to each fourth combination in the fourth combination list according to the first intra prediction mode and the reference row information in the fourth combination, where R is a positive integer;

[0287] The encoder uses the reconstructed samples of T columns to the left of the current coding unit as templates, and calculates a fifth template residual value corresponding to each fourth combination in the fourth combination list according to the second intra prediction mode in the fourth combination and the reference column information, where T is a positive integer;

[0288] The encoder determines, according to the fourth template residual value and the fifth template residual value, a sixth template residual value corresponding to each fourth combination in the fourth combination list;

[0289] The encoder determines, according to the sixth template residual value, H fourth combinations from the fourth combination list, where H is a positive integer;

[0290] The encoder calculates, based on the H fourth combinations, rate-distortion costs of the current coding unit, and calculates, based on other prediction modes, rate-distortion costs of the current coding unit, where the other prediction modes are prediction modes other than the intra prediction modes included in the H fourth combinations;

[0291] In which case, when the calculated minimum value of the rate-distortion cost is calculated based on a target fourth combination among the H fourth combinations, the first index value is a combination index value corresponding to the target fourth combination.

[0292] Optionally, the H fourth combinations are first H of the fourth combinations in the fourth combination list whose corresponding sixth template residual values ​​are the smallest.

[0293] In an embodiment of the present application, the specific implementation method of the encoding end constructing a combination list (such as a first combination list, a second combination list, etc.) and calculating the template residual value corresponding to each combination in the combination list can be the same as that of the decoding end. For details, please refer to the description in the method embodiment of Figure 2 above. To avoid repetition, it will not be repeated here.

[0294] The multi-reference line intra prediction method provided in the embodiment of the present application can be executed by a multi-reference line intra prediction device. In the embodiment of the present application, the multi-reference line intra prediction method performed by the multi-reference line intra prediction device is used as an example to illustrate the multi-reference line intra prediction device provided in the embodiment of the present application.

[0295] Please refer to FIG. 6 , which is a structural diagram of another multi-reference line intra prediction apparatus provided by an embodiment of the present application. As shown in FIG. 6 , the multi-reference line intra prediction apparatus 600 includes:

[0296] A sending module 601 is configured to send a code stream to a decoding end, wherein the code stream includes intra-frame prediction mode information of a current coding unit;

[0297] The intra-frame prediction mode information is used to indicate a target intra-frame prediction mode, a target reference row and a target reference column, and a distance between the target reference row and the current coding unit is different from a distance between the target reference column and the current coding unit.

[0298] Optionally, the intra-frame prediction mode information includes at least one of the following:

[0299] A first index value, where the first index value is a combination index value corresponding to a target combination, where the target combination includes reference row information, reference column information, and an intra prediction mode of the current coding unit;

[0300] first information, the first information including an intra prediction mode of the current coding unit and reference row information of the current coding unit;

[0301] Reference column information of the current coding unit;

[0302] The distance between the reference row corresponding to the reference row information and the current coding unit is a first distance, and the distance between the reference column corresponding to the reference column information and the current coding unit is a second distance, and the first distance is different from the second distance.

[0303] Optionally, the intra-frame prediction mode information includes the first index value, and the apparatus further includes a processing module, wherein the processing module is configured to:

[0304] Constructing an intra-frame prediction mode list and obtaining at least one reference row and at least one reference column of the current coding unit, wherein the intra-frame prediction mode list includes at least one intra-frame prediction mode;

[0305] Combining the intra prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain a first combination list, where the first combination includes at least one first combination, each first combination including one of the intra prediction modes, one reference row information of the current coding unit, and one reference column information of the current coding unit;

[0306] Using the reconstructed samples in the upper X rows and left Y columns of the current coding unit as templates, calculating the first template residual value corresponding to each first combination in the first combination list, where X, Y, and M are all positive integers;

[0307] Determine N first combinations from the first combination list according to the magnitude of the first template residual value corresponding to each first combination in the first combination list, where N is a positive integer;

[0308] Calculating rate-distortion costs of the current coding unit based on the N first combinations, and calculating rate-distortion costs of the current coding unit based on other prediction modes, where the other prediction modes are prediction modes other than the intra prediction modes included in the N first combinations;

[0309] In a case where the calculated minimum value of the rate-distortion cost is calculated based on a target first combination among the N first combinations, the first index value is a combination index value corresponding to the target first combination.

[0310] Optionally, the intra-frame prediction mode information includes the first index value, and the apparatus further includes a processing module, wherein the processing module is configured to:

[0311] Constructing an intra-frame prediction mode list and obtaining at least one reference row and at least one reference column of the current coding unit, wherein the intra-frame prediction mode list includes at least one intra-frame prediction mode;

[0312] Combining the intra prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain a second combination list and a third combination list, wherein the second combination list includes at least one second combination, each second combination includes one intra prediction mode, one reference row information of the current coding unit, and one reference column information of the current coding unit, and the third combination list includes at least one third combination, each third combination includes one intra prediction mode and one reference row information of the current coding unit;

[0313] Using the reconstructed samples of the upper P rows and the left Q columns of the current coding unit as templates, calculating the second template residual value corresponding to each second combination in the second combination list, and calculating the third template residual value corresponding to each third combination in the third combination list, where P and Q are both positive integers;

[0314] Obtain K second combinations in the second combination list according to the magnitude of the second template residual value, and obtain L third combinations in the third combination list according to the magnitude of the third template residual value, where K and L are both positive integers;

[0315] Calculating rate-distortion costs of the current coding unit based on the K second combinations, calculating rate-distortion costs of the current coding unit based on the L third combinations, and calculating rate-distortion costs of the current coding unit based on other prediction modes, where the other prediction modes are prediction modes other than the intra prediction modes included in the K second combinations and the L third combinations;

[0316] In this case, when the calculated minimum value of the rate-distortion cost is calculated based on the target second combination among the K second combinations, the codestream also includes an index of the second combination list, and the first index value is the combination index value corresponding to the target second combination; when the calculated minimum value of the rate-distortion cost is calculated based on the target third combination among the L third combinations, the codestream also includes an index of the third combination list, and the first index value is the combination index value corresponding to the target third combination.

[0317] Optionally, the intra-frame prediction mode information includes the first index value, and the apparatus further includes a processing module, wherein the processing module is configured to:

[0318] Constructing a fourth combination list, the fourth combination list including at least one fourth combination, each of the fourth combinations including a first intra prediction mode, reference row information of the current coding unit, a second intra prediction mode, and reference column information of the current coding unit;

[0319] Using the reconstructed samples of the upper R rows of the current coding unit as a template, and calculating a fourth template residual value corresponding to each fourth combination in the fourth combination list according to the first intra prediction mode and the reference row information in the fourth combination, where R is a positive integer;

[0320] Using the reconstructed samples of T columns to the left of the current coding unit as templates, and calculating a fifth template residual value corresponding to each fourth combination in the fourth combination list according to the second intra prediction mode and the reference column information in the fourth combination, where T is a positive integer;

[0321] Determine, according to the fourth template residual value and the fifth template residual value, a sixth template residual value corresponding to each fourth combination in the fourth combination list;

[0322] Determine H fourth combinations from the fourth combination list according to the sixth template residual value, where H is a positive integer;

[0323] Calculating rate-distortion costs of the current coding unit based on the H fourth combinations, respectively, and calculating rate-distortion costs of the current coding unit based on other prediction modes, where the other prediction modes are prediction modes other than the intra prediction modes included in the H fourth combinations;

[0324] In which case, when the calculated minimum value of the rate-distortion cost is calculated based on a target fourth combination among the H fourth combinations, the first index value is a combination index value corresponding to the target fourth combination.

[0325] In an embodiment of the present application, the device is capable of informing a decoder of the target intra-frame prediction mode, target reference row, and target reference column used for intra-frame prediction of the current coding unit through a code stream. The distance between the target reference row and the current coding unit is different from the distance between the target reference column and the current coding unit. Thus, even in the case of uneven texture distribution in a video image, the device is capable of performing intra-frame prediction based on target reference rows and target reference columns that are at different distances from the current coding unit. This also takes into account the asymmetric and uneven texture distribution in the video image, effectively improving intra-frame prediction accuracy and improving coding efficiency.

[0326] The multi-reference row intra prediction apparatus in the embodiments of the present application can be an electronic device, such as an electronic device with an operating system, or a component of an electronic device, such as an integrated circuit or chip. The electronic device can be a terminal or other device other than a terminal. For example, the terminal can include but is not limited to the types of terminals listed above, and the other device can be a server, a network attached storage (NAS), etc., which is not specifically limited in the embodiments of the present application.

[0327] The multi-reference row intra-frame prediction device provided in the embodiment of the present application can implement each process implemented in the method embodiment of Figure 5 and achieve the same technical effect. To avoid repetition, it will not be described here.

[0328] As shown in Figure 7, an embodiment of the present application also provides an electronic device 700, including a processor 701 and a memory 702, and the memory 702 stores a program or instruction that can be run on the processor 701. When the program or instruction is executed by the processor 701, the various steps of the above-mentioned multi-reference row intra-frame prediction method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0329] The present application also provides a terminal embodiment. This terminal embodiment corresponds to the above-mentioned method embodiment. The various implementation processes and implementation methods of the decoding end or encoding end in the above-mentioned method embodiment are applicable to this terminal embodiment and can achieve the same technical effects. Specifically, Figure 8 is a schematic diagram of the hardware structure of a terminal implementing the embodiment of the present application.

[0330] The terminal 800 includes but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809 and at least some of the components of the processor 810.

[0331] Those skilled in the art will appreciate that the terminal 800 may also include a power supply (such as a battery) to power various components. The power supply may be logically connected to the processor 810 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The terminal structure shown in FIG8 does not limit the terminal. The terminal may include more or fewer components than shown, or may combine certain components, or have different component arrangements, which will not be described in detail here.

[0332] It should be understood that in an embodiment of the present application, the input unit 804 may include a graphics processing unit (GPU) 8041 and a microphone 8042, and the graphics processor 8041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 807 includes a touch panel 8071 and at least one of other input devices 8072. The touch panel 8071 is also called a touch screen. The touch panel 8071 may include two parts: a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0333] In the embodiment of the present application, after receiving downlink data from a network-side device, the radio frequency unit 801 may transmit the data to the processor 810 for processing. Furthermore, the radio frequency unit 801 may send uplink data to the network-side device. Typically, the radio frequency unit 801 includes, but is not limited to, an antenna, an amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and the like.

[0334] The memory 809 can be used to store software programs or instructions and various data. The memory 809 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 809 may include a volatile memory or a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 809 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0335] Processor 810 may include one or more processing units. Optionally, processor 810 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 810.

[0336] Wherein, when the terminal 800 is a decoding end, the processor 810 is configured to:

[0337] Obtaining intra-frame prediction mode information of a current coding unit from a bitstream, the intra-frame prediction mode information being used to indicate a target intra-frame prediction mode, a target reference row, and a target reference column, wherein a distance between the target reference row and the current coding unit is different from a distance between the target reference column and the current coding unit;

[0338] Determining a target intra prediction mode, a target reference row, and a target reference column used by the current coding unit according to the intra prediction mode information;

[0339] A prediction value of the current coding unit is determined according to the target intra prediction mode, a target reference row, and a target reference column.

[0340] When the terminal 800 is a coding end, the radio frequency unit 801 is configured to:

[0341] Sending a code stream to a decoding end, wherein the code stream includes intra-frame prediction mode information of the current coding unit;

[0342] The intra-frame prediction mode information is used to indicate a target intra-frame prediction mode, a target reference row and a target reference column, and a distance between the target reference row and the current coding unit is different from a distance between the target reference column and the current coding unit.

[0343] In an embodiment of the present application, the intra-frame prediction mode information is used to indicate the intra-frame prediction mode, target reference row and target reference column of the current coding unit, and the distance between the target reference row and the current coding unit is different from the distance between the target reference column and the current coding unit. Therefore, even in the case of uneven texture distribution in the video image, the terminal can perform intra-frame prediction based on target reference rows and target reference columns with different distances from the current coding unit, which takes into account the asymmetric and uneven texture distribution in the video image, effectively improves the accuracy of intra-frame prediction, and improves coding efficiency.

[0344] It can be understood that the implementation process of each implementation method mentioned in this embodiment can refer to the relevant description in the method embodiment of Figure 2 or Figure 5 above, and achieve the same or corresponding technical effects. To avoid repetition, it will not be repeated here.

[0345] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned multi-reference row intra-frame prediction method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0346] The processor is the processor in the terminal described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. In some examples, the readable storage medium may be a non-transitory readable storage medium.

[0347] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned multi-reference row intra-frame prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0348] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0349] An embodiment of the present application further provides a computer program / program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-mentioned multi-reference row intra-frame prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0350] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0351] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of a computer software product plus a necessary general-purpose hardware platform, or of course, by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk, etc.) and includes a number of instructions for enabling a terminal or network-side device to execute the methods described in each embodiment of the present application.

[0352] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms of implementation methods without departing from the purpose of this application and the scope of protection of the claims. These implementation methods are all within the protection of this application.

Claims

1. A multi-reference line intra prediction method, comprising: The decoding end obtains intra-frame prediction mode information of the current coding unit from the bitstream, where the intra-frame prediction mode information is used to indicate a target intra-frame prediction mode, a target reference row, and a target reference column, and a distance between the target reference row and the current coding unit is different from a distance between the target reference column and the current coding unit; The decoding end determines a target intra-frame prediction mode, a target reference row, and a target reference column used by the current coding unit according to the intra-frame prediction mode information; The decoding end determines a prediction value of the current coding unit according to the target intra-frame prediction mode, the target reference row, and the target reference column.

2. The method according to claim 1, wherein: The intra prediction mode information includes at least one of the following: A first index value, where the first index value is a combination index value corresponding to a target combination, where the target combination includes reference row information, reference column information, and an intra prediction mode of the current coding unit; first information, the first information including an intra prediction mode of the current coding unit and reference row information of the current coding unit; Reference column information of the current coding unit; The distance between the reference row corresponding to the reference row information and the current coding unit is a first distance, the distance between the reference column corresponding to the reference column information and the current coding unit is a second distance, and the first distance is different from the second distance.

3. The method according to claim 2, wherein: The intra prediction mode information includes the first information and reference column information of the current coding unit, and the decoding end determines a target intra prediction mode, a target reference row, and a target reference column used by the current coding unit according to the intra prediction mode information, including: The decoding end determines the intra-frame prediction mode of the current coding unit included in the first information as a target intra-frame prediction mode; In the case that the intra-frame prediction mode of the current coding unit is a target angle prediction mode, the decoding end determines the target reference row according to the reference row information of the current coding unit included in the first information, and determines the target reference column according to the reference column information of the current coding unit included in the intra-frame prediction mode information.

4. The method according to claim 2, wherein: The intra-frame prediction mode information includes the first index value, and before the decoding end determines the target intra-frame prediction mode, the target reference row, and the target reference column used by the current coding unit according to the intra-frame prediction mode information, the method further includes: The decoding end constructs an intra-frame prediction mode list and obtains at least one reference row and at least one reference column of the current coding unit, wherein the intra-frame prediction mode list includes at least one intra-frame prediction mode; The decoding end combines the intra prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain a first combination list, wherein the first combination list includes at least one first combination, One of the first combinations includes one of the intra prediction modes, one reference row information of the current coding unit, and one reference column information of the current coding unit; The decoding end uses the reconstructed samples of the upper X rows and the left Y columns of the current coding unit as templates, and calculates the first template residual values ​​corresponding to each first combination in the first combination list, where X, Y and M are all positive integers; The decoding end determines N first combinations from the first combination list according to the magnitude of the first template residual value corresponding to each first combination in the first combination list, where N is a positive integer; The first index value is a combination index value corresponding to any combination of the N first combinations.

5. The method according to claim 4, wherein: The N first combinations are the first N combinations in the first combination list whose corresponding first template residual values ​​are the smallest.

6. The method according to claim 4, wherein: The calculating the first template residual value corresponding to each first combination in the first combination list includes: The decoding end calculates the first template sub-residual value corresponding to each first combination in the first combination list according to the intra prediction mode and the reference row information included in each first combination in the first combination list; The decoding end calculates the second template sub-residual value corresponding to each first combination in the first combination list according to the intra prediction mode and reference column information included in each first combination in the first combination list; The decoding end determines the first template residual value corresponding to each first combination in the first combination list according to the first template sub-residual value and the second template sub-residual value.

7. The method according to claim 2, wherein: The intra-frame prediction mode information includes the first index value, and before the decoding end determines the target intra-frame prediction mode, the target reference row, and the target reference column used by the current coding unit according to the intra-frame prediction mode information, the method further includes: The decoding end constructs an intra-frame prediction mode list and obtains at least one reference row and at least one reference column of the current coding unit, wherein the intra-frame prediction mode list includes at least one intra-frame prediction mode; The decoding end combines the intra prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain a second combination list and a third combination list, wherein the second combination list includes at least one second combination, one of the second combinations includes one of the intra prediction mode, one reference row information of the current coding unit and one reference column information of the current coding unit, and the third combination list includes at least one third combination, one of the third combinations includes one of the intra prediction mode and one reference row information of the current coding unit; The decoding end uses the reconstructed samples of the upper P rows and the left Q columns of the current coding unit as templates, calculates the second template residual values ​​corresponding to each second combination in the second combination list, and calculates the third template residual values ​​corresponding to each third combination in the third combination list, where P and Q are both positive integers; The decoding end obtains K second combinations in the second combination list according to the size of the second template residual value, and obtains L third combinations in the third combination list according to the size of the third template residual value, where K and L are both positive integers; The code stream also includes an index of the second combination list or an index of the third combination list, and the first index value is a combination index value of any second combination in the K second combinations, or an index value of any second combination in the L third combinations. The combined index value of any third combination in the combination.

8. The method according to claim 7, wherein: The K second combinations are the first K second template residual values ​​corresponding to the second combinations in the second combination list having the smallest values; or, The L third combinations are first L of the third template residual values ​​corresponding to the third combinations in the third combination list that are the smallest.

9. The method according to claim 7, wherein: The reference row information includes the reference row index value, and the reference column information includes the reference column index value; wherein the intra-frame prediction mode in the second combination is a target angle prediction mode, and the reference row index value in the second combination is the same as or different from the reference column index value, and the intra-frame prediction mode in the third combination is a non-target angle prediction mode; or, The intra-frame prediction mode in the second combination is a target angle prediction mode, and the reference row index value in the second combination is different from the reference column index value, and the intra-frame prediction mode in the third combination is any intra-frame prediction mode, and the reference row index value in the third combination is the same as the reference column index value.

10. The method according to claim 2, wherein: The intra-frame prediction mode information includes the first index value, and before the decoding end determines the target intra-frame prediction mode, the target reference row, and the target reference column used by the current coding unit according to the intra-frame prediction mode information, the method further includes: The decoding end constructs a fourth combination list, the fourth combination list includes at least one fourth combination, each of the fourth combinations includes a first intra-frame prediction mode, a reference row information of the current coding unit, a second intra-frame prediction mode, and a reference column information of the current coding unit; The decoding end uses the reconstructed samples of the upper R rows of the current coding unit as a template, and calculates a fourth template residual value corresponding to each fourth combination in the fourth combination list according to the first intra prediction mode and the reference row information in the fourth combination, where R is a positive integer; The decoding end uses the reconstructed samples of the left T columns of the current coding unit as templates, and calculates the fifth template residual value corresponding to each fourth combination in the fourth combination list according to the second intra prediction mode in the fourth combination and the reference column information, where T is a positive integer; The decoding end determines, according to the fourth template residual value and the fifth template residual value, a sixth template residual value corresponding to each fourth combination in the fourth combination list; The decoding end determines H fourth combinations from the fourth combination list according to the sixth template residual value, where H is a positive integer; The first index value is a combination index value corresponding to any fourth combination among the H fourth combinations.

11. The method according to claim 10, wherein: The H fourth combinations are first H of the fourth combinations in the fourth combination list that correspond to the smallest sixth template residual values.

12. The method according to claim 10, wherein: The intra-frame prediction mode information includes the first index value, and the decoding end determines the target intra-frame prediction mode, the target reference row, and the target reference column used by the current coding unit according to the intra-frame prediction mode information, including: The decoding end determines a target fourth combination according to the first index value, where the first index value is a combination index value corresponding to the target fourth combination, and the target fourth combination is any one of the H fourth combinations; The decoding end determines the first intra-frame prediction mode and the second intra-frame prediction mode in the target fourth combination as target intra-frame prediction modes, determines the reference row corresponding to the reference row information in the target fourth combination as the target reference row, and determines the reference column corresponding to the reference column information in the target fourth combination as the target reference column.

13. The method according to claim 12, wherein: The decoding end determines the prediction value of the current coding unit according to the target intra prediction mode, the target reference row and the target reference column, including: The decoding end divides the current coding unit into a first area and a second area based on a preset division method; The decoding end calculates a first prediction value of each pixel point in the first area according to the first intra-frame prediction mode and the reference row information included in the fourth target combination; The decoding end calculates a second prediction value of each pixel point in the second area according to the second intra-frame prediction mode and the reference column information included in the fourth target combination; The decoding end determines the prediction value of the current coding unit according to the first prediction value of each pixel point in the first area and the second prediction value of each pixel point in the second area.

14. The method according to claim 13, wherein: In a case where the target pixel in the current coding unit is located in the first region or the second region and is located at a junction of the first region and the second region, the decoding end calculates a third prediction value of the target pixel according to the first intra-frame prediction mode and the reference row information included in the target fourth combination, and calculates a fourth prediction value of the target pixel according to the second intra-frame prediction mode and the reference column information included in the target fourth combination; The decoding end performs a weighted average calculation on the third prediction value and the fourth prediction value to determine the prediction value of the target pixel point.

15. The method according to claim 13, wherein: The preset division method is determined based on at least one of the following: Intra prediction angle; A division method index in the bitstream, wherein the division method index corresponds to any division method in a preset division method list; The template residual values ​​corresponding to multiple candidate partitioning methods.

16. A multi-reference line intra prediction method, comprising: The encoding end sends a bit stream to the decoding end, wherein the bit stream includes intra-frame prediction mode information of the current coding unit; The intra-frame prediction mode information is used to indicate a target intra-frame prediction mode, a target reference row and a target reference column, and a distance between the target reference row and the current coding unit is different from a distance between the target reference column and the current coding unit.

17. The method according to claim 16, wherein: The intra prediction mode information includes at least one of the following: A first index value, where the first index value is a combination index value corresponding to a target combination, where the target combination includes reference row information, reference column information, and an intra prediction mode of the current coding unit; first information, the first information including an intra prediction mode of the current coding unit and reference row information of the current coding unit; Reference column information of the current coding unit; The distance between the reference row corresponding to the reference row information and the current coding unit is a first distance, the distance between the reference column corresponding to the reference column information and the current coding unit is a second distance, and the first distance is different from the second distance.

18. The method according to claim 17, wherein: The intra-frame prediction mode information includes the first index value, and before the encoder sends the bit stream to the decoder, the method further includes: The encoding end constructs an intra-frame prediction mode list, and obtains at least one reference row and at least one reference column of the current coding unit, wherein the intra-frame prediction mode list includes at least one intra-frame prediction mode; The encoder combines the intra prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain a first combination list, wherein the first combination list includes at least one first combination, and one first combination includes one intra prediction mode, one reference row information of the current coding unit, and one reference column information of the current coding unit; The encoder uses the reconstructed samples of the upper X rows and the left Y columns of the current coding unit as templates, and calculates first template residual values ​​corresponding to each first combination in the first combination list, where X, Y and M are all positive integers; The encoder determines, according to the magnitude of the first template residual value corresponding to each first combination in the first combination list, N first combinations from the first combination list, where N is a positive integer; The encoder calculates the rate-distortion cost of the current coding unit based on the N first combinations, and calculates the rate-distortion cost of the current coding unit based on other prediction modes, where the other prediction modes are prediction modes other than the intra-frame prediction modes included in the N first combinations; In which, when the calculated minimum value of the rate-distortion cost is calculated based on a target first combination among the N first combinations, the first index value is a combination index value corresponding to the target first combination.

19. The method according to claim 17, wherein: The intra-frame prediction mode information includes the first index value, and before the encoder sends the bit stream to the decoder, the method further includes: The encoding end constructs an intra-frame prediction mode list, and obtains at least one reference row and at least one reference column of the current coding unit, wherein the intra-frame prediction mode list includes at least one intra-frame prediction mode; The encoder combines the intra prediction mode list with at least one reference row and at least one reference column of the current coding unit to obtain a second combination list and a third combination list, wherein the second combination list includes at least one second combination, one second combination includes one intra prediction mode, one reference row information of the current coding unit, and one reference column information of the current coding unit, and the third combination list includes at least one third combination, one third combination includes one intra prediction mode and one reference row information of the current coding unit; The encoder uses the reconstructed samples of the upper P rows and the left Q columns of the current coding unit as templates, calculates the second template residual values ​​corresponding to each second combination in the second combination list, and calculates the third template residual values ​​corresponding to each third combination in the third combination list, where P and Q are both positive integers; The encoder obtains K second combinations in the second combination list according to the size of the second template residual value, and obtains L third combinations in the third combination list according to the size of the third template residual value, where K and L are both positive integers; The encoder calculates the rate-distortion cost of the current coding unit based on the K second combinations, calculates the rate-distortion cost of the current coding unit based on the L third combinations, and calculates the rate-distortion cost of the current coding unit based on other prediction modes, where the other prediction modes are prediction modes other than the intra-frame prediction modes included in the K second combinations and the L third combinations; Wherein, when the calculated minimum value of the rate-distortion cost is calculated based on the target second combination in the K second combinations, the code stream also includes an index of the second combination list, and the first index value is a combination index value corresponding to the target second combination; when the calculated minimum value of the rate-distortion cost is calculated based on the target third combination in the L third combinations, the code stream also includes an index of the third combination list, and the first index value is a combination index value corresponding to the target third combination.

20. The method according to claim 17, wherein: The intra-frame prediction mode information includes the first index value, and before the encoder sends the bit stream to the decoder, the method further includes: The encoding end constructs a fourth combination list, the fourth combination list includes at least one fourth combination, each of the fourth combinations includes a first intra prediction mode, a reference row information of the current coding unit, a second intra prediction mode, and a reference column information of the current coding unit; The encoder uses the reconstructed samples of the upper R rows of the current coding unit as templates, and calculates a fourth template residual value corresponding to each fourth combination in the fourth combination list according to the first intra prediction mode and the reference row information in the fourth combination, where R is a positive integer; The encoder uses the reconstructed samples of the left T columns of the current coding unit as templates, and calculates a fifth template residual value corresponding to each fourth combination in the fourth combination list according to the second intra prediction mode in the fourth combination and the reference column information, where T is a positive integer; The encoding end determines, according to the fourth template residual value and the fifth template residual value, a sixth template residual value corresponding to each fourth combination in the fourth combination list; The encoder determines, according to the sixth template residual value, H fourth combinations from the fourth combination list, where H is a positive integer; The encoder calculates the rate-distortion cost of the current coding unit based on the H fourth combinations, and calculates the rate-distortion cost of the current coding unit based on other prediction modes, where the other prediction modes are prediction modes other than the intra prediction modes included in the H fourth combinations; In which, when the calculated minimum value of the rate-distortion cost is calculated based on a target fourth combination among the H fourth combinations, the first index value is a combination index value corresponding to the target fourth combination.

21. A multi-reference line intra prediction apparatus, comprising: An acquisition module is used to acquire intra-frame prediction mode information of a current coding unit from a bitstream, wherein the intra-frame prediction mode information is used to indicate a target intra-frame prediction mode, a target reference row and a target reference column, wherein the target reference row and the current The distance between the coding units is different from the distance between the target reference column and the current coding unit; A first determination module, configured to determine a target intra-frame prediction mode, a target reference row, and a target reference column used by the current coding unit according to the intra-frame prediction mode information; The second determination module is used to determine the prediction value of the current coding unit according to the target intra-frame prediction mode, the target reference row and the target reference column.

22. The device according to claim 21, wherein The intra prediction mode information includes at least one of the following: A first index value, where the first index value is a combination index value corresponding to a target combination, where the target combination includes reference row information, reference column information, and an intra prediction mode of the current coding unit; first information, the first information including an intra prediction mode of the current coding unit and reference row information of the current coding unit; Reference column information of the current coding unit; The distance between the reference row corresponding to the reference row information and the current coding unit is a first distance, the distance between the reference column corresponding to the reference column information and the current coding unit is a second distance, and the first distance is different from the second distance.

23. A multi-reference line intra prediction device, comprising: A sending module, used for sending a code stream to a decoding end, wherein the code stream includes intra-frame prediction mode information of a current coding unit; The intra-frame prediction mode information is used to indicate a target intra-frame prediction mode, a target reference row and a target reference column, and a distance between the target reference row and the current coding unit is different from a distance between the target reference column and the current coding unit.

24. An electronic device comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the multi-reference row intra-frame prediction method as described in any one of claims 1-20 are implemented.

25. A readable storage medium storing a program or an instruction, wherein the program or the instruction, when executed by a processor, implements the steps of the multi-reference row intra prediction method according to any one of claims 1 to 20.

Citation Information

Patent Citations

  • Intra-frame multi-reference line prediction method and device, storage medium and terminal

    CN111654696A

  • Method and device for decoding intra prediction mode

    CN114584776A

  • Image coding method based on multiple reference line intra prediction, and device therefor

    WO2020130629A1