Intra prediction method, reference object determination method, device and electronic equipment

By using a target filter to calculate the sample point pixel values ​​of the target reference row or column, the problem of low intra-frame prediction accuracy is solved, and efficient intra-frame prediction is achieved under conditions of uneven texture or noise.

CN119316610BActive Publication Date: 2026-04-14VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
VIVO MOBILE COMM CO LTD
Filing Date
2023-07-11
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In existing technologies, intra-frame prediction accuracy is not high during video encoding, especially when the texture distribution is uneven or there is noise. The reference information based on the adjacent rows or columns of the current coding unit is inaccurate, resulting in low encoding and decoding accuracy.

Method used

The target filter is used to calculate the sample point pixel values ​​of the target reference row or column, and the target reference object is synthesized through the coefficients of the target filter. This avoids using the adjacent rows or columns of the current coding unit as references and improves the accuracy of intra-frame prediction.

Benefits of technology

It effectively improves the accuracy of intra-frame prediction and decoding efficiency, ensuring that accurate prediction values ​​can still be obtained even when the texture is uneven or there is noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119316610B_ABST
    Figure CN119316610B_ABST
Patent Text Reader

Abstract

The application discloses an intra prediction method, a reference object determination method, a device and electronic equipment, and belongs to the technical field of video coding. The intra prediction method comprises the following steps: a decoding end determines a target filter, and acquires a reconstructed pixel template corresponding to the target filter; the decoding end determines a coefficient of the target filter based on the reconstructed pixel template; the decoding end calculates a pixel value of a sample point of a target reference object based on the coefficient of the target filter, wherein the target reference object is a target reference row or a target reference column; and the decoding end calculates a prediction value of a current coding unit based on the pixel value of the sample point of the target reference object and an intra prediction mode of the current coding unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of video encoding and decoding technology, specifically relating to an intra-frame prediction method, a reference object determination method, an apparatus, and an electronic device. Background Technology

[0002] The video encoder employs 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), then further divides them into different Coding Units (CUs) according to a quadtree. The encoder encodes each CU in a top-down, left-to-right order, and the decoder decodes the CUs of the current frame in the same order. Currently, when performing intra-frame prediction, the encoder and decoder typically select one from multiple reference rows or columns as a reference sample row or column to calculate the predicted value of the current CU. However, when the texture distribution is uneven or noise is present, the reference information obtained from the reference rows or columns selected in this way is inaccurate, resulting in low accuracy in intra-frame prediction. Summary of the Invention

[0003] This application provides an intra-frame prediction method, a reference object determination method, an apparatus, and an electronic device, which can solve the problem of low accuracy of intra-frame prediction in related technologies.

[0004] Firstly, an intra-frame prediction method is provided, executed by the decoding end, including:

[0005] The decoding end determines the target filter and obtains the reconstructed pixel template corresponding to the target filter;

[0006] The decoding end determines the coefficients of the target filter based on the reconstructed pixel template;

[0007] The decoding end calculates the pixel value of the sample point of the target reference object based on the coefficients of the target filter, wherein the target reference object is a target reference row or a target reference column;

[0008] The decoding end calculates the prediction value of the current coding unit based on the pixel values ​​of the sample points of the target reference object and the intra-frame prediction mode of the current coding unit.

[0009] Secondly, a method for determining a reference object is provided, executed by the encoding end, including:

[0010] The encoding end determines the coefficients of N candidate filters based on the reconstructed pixel template, where N is a positive integer.

[0011] The encoding end calculates the pixel values ​​of the sample points of the synthesis reference objects corresponding to each of the N candidate filters based on the coefficients of each candidate filter, and obtains the pixel values ​​of the sample points of the N synthesis reference objects. The synthesis reference objects are synthesis reference rows or synthesis reference columns.

[0012] The encoding end calculates N first prediction values ​​for the current encoding unit based on the pixel values ​​of the sample points of the N synthetic reference objects, and one first prediction value for the current encoding unit is obtained for each synthetic reference object.

[0013] The encoding end determines N first rate distortion costs based on the N first prediction values, and determines a target reference object based on the N first rate distortion costs. The target reference object is one of the N synthetic reference objects.

[0014] Thirdly, an intra-frame prediction apparatus is provided, comprising:

[0015] The first determining module is used to determine the target filter and obtain the reconstructed pixel template corresponding to the target filter;

[0016] The second determining module is used to determine the coefficients of the target filter based on the reconstructed pixel template;

[0017] The first calculation module is used to calculate the pixel value of the sample point of the target reference object based on the coefficients of the target filter, wherein the target reference object is a target reference row or a target reference column;

[0018] The second calculation module is used to calculate the prediction value of the current coding unit based on the pixel values ​​of the sample points of the target reference object and the intra-frame prediction mode of the current coding unit.

[0019] Fourthly, a reference object determining device is provided, comprising:

[0020] The third determining module is used to determine the coefficients of each of the N candidate filters based on the reconstructed pixel template, where N is a positive integer.

[0021] The third calculation module is used to calculate the pixel values ​​of the sample points of the synthesis reference objects corresponding to the N candidate filters based on the coefficients of each candidate filter, so as to obtain the pixel values ​​of the sample points of the N synthesis reference objects, wherein the synthesis reference objects are synthesis reference rows or synthesis reference columns.

[0022] The fourth calculation module is used to calculate N first prediction values ​​of the current coding unit based on the pixel values ​​of the sample points of the N synthetic reference objects, wherein one first prediction value of the current coding unit is obtained for each synthetic reference object.

[0023] The fourth determining module is used to determine N first rate distortion costs based on the N first predicted values, and to determine a target reference object based on the N first rate distortion costs, wherein the target reference object is one of the N synthetic reference objects.

[0024] Fifthly, an electronic device is provided, including a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method as described in the first aspect, or implementing the steps of the method as described in the second aspect.

[0025] In a sixth aspect, a readable storage medium is provided, on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect, or implement the steps of the method described in the second aspect.

[0026] In a seventh aspect, a chip is provided, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to run programs or instructions to implement the method as described in the first aspect, or to implement the method as described in the second aspect.

[0027] Eighthly, a computer program / program product is provided, the computer program / program product being stored in a storage medium, the program / program product being executed by at least one processor to implement the steps of the method as described in the first aspect, or to implement the steps of the method as described in the second aspect.

[0028] In this embodiment, the decoding end uses the pixel values ​​of sample points in the target reference row or column when calculating the predicted value of the current coding unit. The pixel values ​​of the sample points (or pixels) in the target reference row or column are calculated by the decoding end based on the coefficients of the target filter. That is, the target reference row or column is synthesized based on the calculation of the target filter, instead of calculating the predicted value based on the rows or columns adjacent to the current coding unit as reference rows. This avoids the problem of inaccurate predicted values ​​calculated based on the rows or columns adjacent to the current coding unit as reference rows or columns when the image texture is uneven or there is noise. In addition, since the pixel values ​​of the sample points in the target reference object are calculated by the reconstructed values ​​of the reconstructed pixels in multiple rows or columns above and / or to the left of it and the corresponding filter coefficients, it also avoids the problem of inaccurate prediction caused by selecting a row or column adjacent to the current coding unit as a reference object in related technologies. In this embodiment, intra-frame prediction of the current coding unit is performed based on the target reference row or target reference column calculated by the target filter, which can effectively improve the accuracy of intra-frame prediction, thereby improving decoding accuracy and also helping to improve decoding efficiency. Attached Figure Description

[0029] Figure 1a This is a schematic diagram of the 65 angle prediction modes included in the intra-frame prediction of VVC in related technologies;

[0030] Figure 1b It is a schematic diagram of the reference row or reference column of the current coding unit in the related technology;

[0031] Figure 1c These are schematic diagrams illustrating three possible positions of the reconstructed pixel region and the current coding unit in related technologies;

[0032] Figure 1d These are schematic diagrams of three different filter shapes in related technologies;

[0033] Figure 1e This is a schematic diagram of calculating the current coding unit based on filters in related technologies;

[0034] Figure 2 This is a flowchart of an intra-frame prediction method provided in an embodiment of this application;

[0035] Figure 3 This is a schematic diagram of one of three different shaped candidate filters applicable in the embodiments of this application;

[0036] Figure 4 This is a schematic diagram of three possible positions of the reconstructed pixel template and the current coding unit in the embodiments of this application;

[0037] Figure 5 This is a flowchart of a method for determining a reference object provided in an embodiment of this application;

[0038] Figure 6 This is a structural diagram of an intra-frame prediction device provided in an embodiment of this application;

[0039] Figure 7 This is a structural diagram of a reference object determining device provided in an embodiment of this application;

[0040] Figure 8 This is a structural diagram of an electronic device provided in an embodiment of this application;

[0041] Figure 9 This is a structural diagram of a terminal provided in an embodiment of this application. Detailed Implementation

[0042] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0043] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, without limiting the number of objects; for example, the first object can be one or more. Furthermore, "or" in this application indicates at least one of the connected objects. For example, "A or B" covers three scenarios: Scenario 1: including A but not B; Scenario 2: including B but not A; Scenario 3: including both A and B. The character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0044] To better understand, the relevant concepts and technologies involved in the embodiments of this application will be explained below.

[0045] The video encoder employs 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), further subdividing them into different Coding Units (CUs) according to a quadtree structure. It then traverses various tree types for partitioning, with the final partitioning result determined by rate-distortion cost. The encoder encodes each CU in a top-down, left-to-right order, and the decoder decodes the current frame's CUs in the same order. The encoder uses intra-frame prediction based on image texture correlation, using the reconstructed samples in the row above and column to the left adjacent to the current CU as references. By traversing DC mode, Planar mode, and angle prediction mode, it selects the optimal intra-frame prediction mode using rate-distortion cost to remove spatial redundancy within the block. Figure 1a As shown, the latest video compression standards, such as Versatile Video Coding (VVC), include 65 angle prediction modes (predModeIntra) for intra-frame prediction. VVC supports multiple reference rows, including a total of 6 reference rows with index values ​​{1, 3, 5, 7, 12} in addition to the adjacent top row and left column of reconstructed samples. Figure 1b As shown, the index value indicates the distance between the reference line and the current coding unit.

[0046] In related technologies, one type of "extrapolation filter-based intra prediction mode (EIP)" has the following implementation steps at the encoding end:

[0047] Step 1. Obtain the following Figure 1c The reconstructed pixel regions above or to the left of the current coding unit are calculated respectively. Figure 1d The 15-tap filter coefficients of the three shapes shown are calculated using the same method as the filter system calculation method in the Convolutional Cross-Component Intra Model (CCCM) of the existing Enhanced Compression Model (ECM), specifically:

[0048] by Figure 1e For example, starting from the top left corner of the reconstructed pixel region, each row is traversed from left to right, starting from the first row and moving downwards. The weighted average of the reconstructed values ​​of the corresponding gray sample points in each of the 15 filter coefficients is calculated. This is achieved by minimizing the mean-square error (MSE) between the weighted average calculated using the white samples in all 4×4 regions of the reconstructed pixel region and the weighted average calculated using the gray samples. MSE minimization is performed by calculating the autocorrelation matrix with the reconstructed values ​​of the 15 gray sample points as input, and the cross-correlation vector between the 15 gray input sample points and one white output sample point. The autocorrelation matrix is ​​then decomposed using LDL, and the final filter coefficients are calculated using inverse permutation.

[0049] Step 2. Use them respectively Figure 1d The three types of extrapolation filters shown calculate the predicted value of each sample point in order from left to right and from top to bottom, starting from the first sample point in the upper left corner of the current coding unit; where the value of the gray sample point is the input and the value of the white sample point in the lower right corner is the predicted value of the output.

[0050] The number of sample points to be predicted in the current coding unit is W×H, where W and H are the width and height of the current coding unit, respectively. Taking a 15-tap (i.e., a filter with 15 coefficients, where the predicted value of the sample point in the lower right corner is obtained by taking the values ​​of 15 sample points in the upper left part; these 15 sample points may be decoded and reconstructed pixels outside the current coding unit, or sample points inside the current coding unit that have already obtained predicted values) as shown above, will result in the following... Figure 1d (Several cases in the process), the 15 filter coefficients and the 15 sample point values ​​correspond one-to-one.

[0051] Step 3. Calculate the prediction value of the current coding unit obtained using the three shapes of extrapolation filters in EIP mode, and then calculate the rate-distortion cost, comparing it with the rate-distortion cost of other prediction modes. If the rate-distortion cost of EIP mode is the lowest, set the EIP mode identifier information to 1, and write it into the bitstream along with the selected filter index information.

[0052] After the decoder obtains that the current coding unit to be decoded is in EIP mode, it parses the index value of the selected filter. Following the same method as the encoder, it obtains the filter coefficients using the decoded and reconstructed pixel values ​​above or to the left of the current coding unit. Then, it calculates the predicted value of each sample point in the current coding unit in a top-to-bottom, left-to-right order. This predicted value is then added to the residual value calculated from the residual information of the current coding unit obtained from the bitstream to obtain the reconstructed value.

[0053] Intra-frame prediction methods in related technologies typically select from multiple reference rows or columns of the current coding unit (e.g., ...). Figure 1b The example shows six reference rows (including index values ​​{0, 1, 3, 5, 7, 12}) selected as a reference sample row or column to calculate the predicted value of the current coding unit. However, video frames may have uneven texture distribution or noise, so the reference sample rows or columns obtained in the above manner cannot provide accurate reference information, resulting in low encoding and decoding accuracy. To address this problem, embodiments of this application provide an intra-frame prediction method and a reference object determination method.

[0054] The intra-frame prediction method, reference object determination method, and related devices provided in this application will be described in detail below with reference to the accompanying drawings and through some embodiments and application scenarios.

[0055] Please refer to Figure 2 , Figure 2 This is a flowchart of an intra-frame prediction method provided in an embodiment of this application, which is applied at the decoding end. Figure 2 As shown, the intra-frame prediction method includes the following steps:

[0056] Step 201: The decoding end determines the target filter and obtains the reconstructed pixel template corresponding to the target filter.

[0057] Optionally, the method further includes:

[0058] The decoding end obtains the intra-prediction mode index information of the current coding unit from the bitstream. The intra-prediction mode index information is used to indicate the intra-prediction mode of the current coding unit.

[0059] Optionally, the decoding end may obtain the intra-prediction mode index information of the current coding unit from the bitstream. This intra-prediction mode index information indicates the intra-prediction mode used by the encoding end, and thus the decoding end can determine which intra-prediction mode the encoding end is using based on the intra-prediction mode index information. Therefore, based on the intra-prediction mode index information, the decoding end can use the same intra-prediction mode as the encoding end to decode the current coding unit, ensuring that the decoding end obtains the same prediction value as the encoding end. For example, the intra-prediction mode involved in the embodiments of this application may be as follows: Figure 1a One of the 65 angle prediction modes shown.

[0060] Optionally, the decoding end can obtain filter index information from the bitstream and determine the target filter based on the filter index information. It should be noted that a filter index information indicates a filter. For example, the encoding and decoding ends can use at least one candidate filter, and each candidate filter corresponds to a filter index information (also called a filter identifier). The encoding and decoding ends know the correspondence between each candidate filter and each filter index information; then, the encoding end selects one of the candidate filters as the target filter, and the encoding end sends the filter index information corresponding to the target filter along with the bitstream to the decoding end. The decoding end can then determine the corresponding target filter based on the filter index information. This ensures that the decoding end uses the same filter as the encoding end for intra-frame prediction, ensuring that the code end obtains the same prediction value as the encoding end.

[0061] Optionally, the encoder and decoder can agree to use the same filter. For example, there can be only one candidate filter, that is, a filter with only one shape, which is also the target filter. In this case, the encoder does not need to send filter index information to the decoder, and the decoder does not need to determine the target filter through the filter index information.

[0062] In this embodiment of the application, after determining the target filter, the decoding end obtains the reconstructed pixel template corresponding to the target filter. Different candidate filters may correspond to different reconstructed pixel templates.

[0063] For example, with Figure 3 Taking the three candidate filters shown as examples, these three candidate filters correspond to three different reconstructed pixel templates, among which... Figure 3 The candidate filter (a) corresponds to Figure 4 The reconstructed pixel template shown in (a) is shown in the middle. Figure 3 The candidate filter (b) corresponds to Figure 4 The reconstructed pixel template shown in (b) is shown in the middle. Figure 3 The candidate filter (c) corresponds to Figure 4 The reconstructed pixel template shown in (c) is shown in the middle.

[0064] In this embodiment, after determining the target filter, i.e., a candidate filter, the decoding end can obtain the corresponding reconstructed pixel template composed of decoded reconstructed pixels. It should be noted that the correspondence between the candidate filter and the reconstructed pixel template can be pre-established. Figure 3 and Figure 4 The candidate filters and reconstructed pixel templates shown in the examples, as well as the correspondence between them, are merely illustrative and do not constitute a limitation on the embodiments of this application. The candidate filters and reconstructed pixel templates shown in the embodiments of this application, as well as the correspondence between them, may be other possible cases.

[0065] Step 202: The decoding end determines the coefficients of the target filter based on the reconstructed pixel template.

[0066] It should be noted that after determining the reconstructed pixel template corresponding to the target filter, the decoding end can calculate the coefficients of the target filter based on the reconstructed pixel template. The calculation method can refer to relevant technologies, such as the method for calculating filter coefficients in CCCM within ECM, which will not be specifically described in this embodiment.

[0067] Step 203: The decoding end calculates the pixel value of the sample point of the target reference object based on the coefficients of the target filter. The target reference object is a target reference row or a target reference column.

[0068] In this embodiment of the application, after determining the coefficients of the target filter, the decoding end calculates the pixel values ​​of the sample points of the target reference row or target reference column based on the coefficients of the target filter.

[0069] For example, suppose the target filter is Figure 3 The filter shown in (a) comprises 15 sample pixels. Figure 3 (the gray box in a) and a target pixel ( Figure 3 The white box in the lower right corner of a) represents the target pixel, which is also the sample point of the target reference object (target reference row or target reference column). The pixel value of the target pixel obtained by the decoding end based on the coefficients of the target filter is also the pixel value of the sample point of the target reference object.

[0070] The number of coefficients in the target filter is the same as the number of sample pixels in the target filter. For example, taking the target filter as... Figure 3Taking the filter shown in (a) as an example, the target filter includes 15 sample pixels, so the decoder will obtain 15 filter coefficients. The decoder can calculate the product of these 15 filter coefficients and the reconstructed value of their respective sample pixels (the sample pixels are the reconstructed pixels around the current coding unit that have already been decoded, so their reconstructed values ​​are known), that is, it will get 15 products. Based on these 15 products, the predicted value of the target pixel in the current coding unit is determined. For example, the average of these 15 products can be used as the predicted value of the target pixel. For example, taking the target filter as a 15-head filter (such as...) Figure 3 Taking the three filters shown as an example, the target filter includes 15 sample pixels and a target pixel whose prediction value needs to be calculated. The prediction value of the target pixel can be calculated using the following formula:

[0071]

[0072] Among them, w i r represents the filter coefficient corresponding to the i-th reconstructed pixel. i p represents the reconstructed value of the i-th reconstructed pixel. j It is the predicted value of the target pixel, that is, the predicted value of a pixel in the target reference object (such as the target reference row or target reference column). Thus, the pixel value of the target pixel is obtained by multiplying the reconstructed values ​​of the reconstructed pixels to its left, or above, or above and to its left, by their corresponding filter coefficients and then taking a weighted average.

[0073] It should be noted that, based on the above calculation method, the decoding end obtains the pixel value of each target pixel one by one from left to right and from top to bottom according to the target filter. For example, the decoding end can calculate the pixel value of each pixel in a row sequentially from left to right, that is, each pixel in that row will be used as the target pixel in the target filter in turn (e.g., ...). Figure 3The pixel value of the white box in the lower right corner (a) is calculated, and thus the pixel value of each pixel in that row is obtained. This row can then be used as the target reference row for the current coding unit. Alternatively, the decoder can calculate the pixel value of each pixel in a column sequentially from top to bottom. That is, each pixel in the column is used as a target pixel in the target filter to calculate its corresponding pixel value, and thus the pixel value of each pixel in the column is obtained. This column can then be used as the target reference column for the current coding unit. Based on this method, the pixel values ​​of each sample point (i.e., pixel) in the target reference row or the target reference column can be obtained. Based on the above method, the decoder can calculate the pixel values ​​of multiple sample points multiple times based on the coefficients of the target filter, and combine these sample points with calculated pixel values ​​into a target reference row or target reference column, that is, obtain the target reference object.

[0074] Step 204: The decoding end calculates the prediction value of the current coding unit based on the pixel value of the sample point of the target reference object and the intra-frame prediction mode of the current coding unit.

[0075] Specifically, the decoding end calculates the predicted value of the current coding unit based on the pixel values ​​of the sample points of the target reference row or the pixel values ​​of the sample points of the target reference column, and according to the intra-frame prediction mode of the current coding unit. It should be noted that the specific implementation process of calculating the predicted value of the current coding unit based on the reference row or reference column and the intra-frame prediction mode can refer to related technologies, and will not be elaborated upon in this embodiment.

[0076] In this embodiment, the decoding end uses the pixel values ​​of sample points in the target reference row or column when calculating the predicted value of the current coding unit. The pixel values ​​of the sample points in the target reference row or column are calculated by the decoding end based on the coefficients of the target filter. That is, the target reference row or column is synthesized based on the calculation of the target filter, instead of calculating the predicted value based on the adjacent rows or columns of the current coding unit as reference rows. This avoids the problem of inaccurate predicted values ​​calculated based on the adjacent rows or columns of the current coding unit as reference rows or columns when the image texture is uneven or there is noise. In this embodiment, the intra-frame prediction of the current coding unit is performed based on the target reference row or column calculated by the target filter, which can effectively improve the accuracy of intra-frame prediction, thereby improving the decoding accuracy and also helping to improve the decoding efficiency.

[0077] Furthermore, since the pixel value of each sample point (pixel) in the target reference object is obtained by multiplying the reconstructed values ​​of the reconstructed pixels to its left, or above, or above and to its left in multiple rows or columns by their corresponding filter coefficients and then taking a weighted average, using the target reference object synthesized based on such sample points as the reference object of the current coding unit can also avoid the problem of inaccurate prediction caused by selecting a row or column from the adjacent rows or columns of the current coding unit as the reference object in related technologies. The solution provided by the embodiments of this application can effectively improve the accuracy of intra-frame prediction.

[0078] Optionally, the decoding end determines the target filter, including:

[0079] The decoding end determines the target filter when it determines that the current encoding unit uses the target reference object.

[0080] In this embodiment of the application, the target reference object (i.e., the target reference row or the target reference column) needs to be synthesized based on the pixel values ​​calculated from the coefficients of the target filter. Then, if the decoding end determines that the current coding unit needs to use the synthesized target reference row or the target reference column for intra-frame prediction, the target filter to be selected is determined.

[0081] It should be noted that the method for determining the target filter can refer to the preceding description.

[0082] Optionally, before determining the target filter when the decoding end determines that the current coding unit uses the target reference object, the method further includes:

[0083] The decoding end obtains the first indication information corresponding to the current encoding unit from the bit stream. The first indication information is used to indicate whether the reference object corresponding to the current encoding unit is the target reference object.

[0084] Optionally, each coding unit in the bitstream corresponds to a first indication information, or multiple coding units in the bitstream correspond to a first indication information.

[0085] Understandably, in order to ensure that the decoder can obtain the same prediction value as the encoder, it needs to use the same intra-frame prediction method as the encoder and select the same reference row or reference column for intra-frame prediction.

[0086] In this application, the encoding end carries first indication information in the bitstream sent to the decoding end. This first indication information indicates whether the reference object (reference row or reference column) used by the encoding end for the current coding unit is a target reference object (target reference row or target reference column). For example, if the first indication information indicates that the encoding end uses a target reference object for intra-frame prediction, the decoding end also needs to use the target reference object for intra-frame prediction of the current coding unit. If the first indication information indicates that the encoding end does not use a target reference object for intra-frame prediction, the decoding end can select an adjacent row or column of the current coding unit as a reference row for intra-frame prediction, according to methods in related technologies. Furthermore, through the first indication information, the decoding end can use the same reference row as the encoding end for intra-frame prediction, ensuring that the decoding end obtains the same prediction value as the encoding end.

[0087] Optionally, the decoding end determines the target filter, including:

[0088] The decoding end obtains the filter index information of the current encoding unit from the bit stream;

[0089] The decoding end determines the filter corresponding to the filter index information among N candidate filters as the target filter, where N is a positive integer.

[0090] It should be noted that the encoding and decoding ends can use multiple candidate filters, that is, candidate filters of different shapes can be used for intra-frame prediction, such as... Figure 3 The three candidate filters are shown.

[0091] Optionally, when there are multiple candidate filters, each candidate filter includes corresponding filter index information. The encoder and decoder learn the correspondence between each candidate filter and its filter index information. The encoder may select one of the multiple candidate filters as the target filter for intra-frame prediction and calculate the pixel values ​​of each sample point of the target reference object based on the coefficients of the target filter to obtain the synthesized target reference object. In this case, the encoder sends the filter index information corresponding to the target filter in the bitstream to the decoder, so that the decoder can determine the filter corresponding to the filter index information in the candidate filters as the target filter based on the filter index information in the bitstream. This ensures that the decoder uses the same filter as the encoder for intra-frame prediction, ensuring that the encoder obtains the same prediction value as the encoder.

[0092] Optionally, the candidate filter includes sample pixels and target pixels. The sample pixels are sample pixels that have been decoded or whose pixel values ​​have been obtained. The target pixels are sample pixels of the target reference object. The sample pixels are located to the left or above the target pixels.

[0093] For example, with Figure 3 Taking the candidate filter shown in (a) as an example, this candidate filter includes 15 sample pixels (i.e., Figure 3 (the gray box in (a)) represents the target pixel, which is... Figure 3 The white box in the lower right corner of (a) represents the target pixel, which is also the sample point of the target reference object (target reference row or target reference column). The pixel value of the target pixel calculated by the decoding end based on the coefficients of the candidate filter is also the pixel value of the sample point of the target reference object. The specific calculation method and how to obtain the target reference object can be referred to the previous description.

[0094] The intra-frame prediction method provided in this application can perform intra-frame prediction on the current coding unit based on the target reference row or target reference column calculated by the target filter, which can effectively improve the accuracy of intra-frame prediction, thereby improving decoding accuracy and also helping to improve decoding efficiency.

[0095] Please refer to Figure 5 , Figure 5 This is a flowchart of a reference object determination method provided in an embodiment of this application, the method being applied at the encoding end. Figure 5 As shown, the reference object determination method includes the following steps:

[0096] Step 501: The encoding end determines the coefficients of each of the N candidate filters based on the reconstructed pixel template, where N is a positive integer.

[0097] It should be noted that, prior to this step, the encoding end first needs to determine the intra-prediction mode of the current coding unit. For example, after determining the intra-prediction mode of the current coding unit as follows... Figure 1a In the case of one of the 65 angle prediction modes shown, the encoder determines the coefficients of each of the N candidate filters based on the reconstructed pixel template.

[0098] Optionally, the encoding end can construct reconstructed pixel templates for each candidate filter based on the reconstructed pixels adjacent to the current encoding unit. It should be noted that different candidate filters can correspond to different reconstructed pixel templates. Please refer to... Figure 3 and Figure 4 ,in Figure 3 The candidate filter (a) corresponds to Figure 4 The reconstructed pixel template shown in (a) is Figure 3The candidate filter (b) corresponds to Figure 4 The reconstructed pixel template shown in (b) is Figure 3 The candidate filter (c) corresponds to Figure 4 The reconstructed pixel template is shown in (c). The correspondence between the candidate filter and the reconstructed pixel template can be pre-established. Figure 3 and Figure 4 The candidate filters and reconstructed pixel templates shown in the examples, as well as the correspondence between them, are merely illustrative and do not constitute a limitation on the embodiments of this application. The candidate filters and reconstructed pixel templates shown in the embodiments of this application, as well as the correspondence between them, may be other possible cases.

[0099] In this embodiment, after determining the reconstructed pixel template corresponding to each candidate filter, the encoding end can calculate the coefficients of the corresponding candidate filter based on the reconstructed pixel template. The calculation method can refer to related technologies, such as the method for calculating filter coefficients in CCCM within ECM, which will not be elaborated upon in this embodiment.

[0100] Step 502: The encoding end calculates the pixel values ​​of the sample points of the synthesis reference objects corresponding to each of the N candidate filters based on the coefficients of each candidate filter, and obtains the pixel values ​​of the sample points of the N synthesis reference objects. The synthesis reference objects are synthesis reference rows or synthesis reference columns.

[0101] The candidate filter includes sample pixels and target pixels. The sample pixels are those that have been decoded or whose pixel values ​​have been obtained. The target pixels are those that are sample pixels of the target reference object. The sample pixels are located to the left or above the target pixels.

[0102] For example, suppose the candidate filter is Figure 3 The filter shown in (a) comprises 15 sample pixels. Figure 3 (the gray box in a) and a target pixel ( Figure 3 The white box in the lower right corner of image 'a' represents the target pixel, which is also a sample point in the synthetic reference object (synthetic reference row or column). The pixel value of the target pixel, calculated by the decoder based on the coefficients of the candidate filter, is also the pixel value of the sample point in the synthetic reference object. Consequently, the encoder can calculate a synthetic reference object (synthetic reference row or column) based on this candidate filter. In this way, N synthetic reference objects can be calculated based on N candidate filters.

[0103] Specifically, the encoder acquires the pixel value of each target pixel sequentially from left to right and from top to bottom based on the target filter. For example, the encoder can calculate the pixel value of each pixel in a row sequentially from left to right, meaning that each pixel in that row will be used as a target pixel in the target filter (e.g., ...). Figure 3 The pixel value of the white box in the lower right corner (a) is calculated, and thus the pixel value of each pixel in that row is obtained. This row can then be used as the synthesis reference row for the current coding unit. Alternatively, the encoder can calculate the pixel value of each pixel in a column sequentially from top to bottom. That is, each pixel in the column is used as a target pixel in the target filter to calculate its corresponding pixel value, and thus the pixel value of each pixel in the column is obtained. This column can then be used as the synthesis reference column for the current coding unit. Based on this method, the pixel values ​​of each sample point (i.e., pixel) in the synthesis reference row or the pixel values ​​of each sample point (i.e., pixel) in the synthesis reference column can be obtained.

[0104] It should be noted that the specific implementation of calculating the pixel value of the target pixel based on the filter coefficients can refer to the above. Figure 2 The descriptions in the method embodiments will not be repeated in this embodiment.

[0105] Step 503: The encoding end calculates N first prediction values ​​of the current encoding unit based on the pixel values ​​of the sample points of the N synthetic reference objects, and one first prediction value of the current encoding unit is obtained for each synthetic reference object.

[0106] In this embodiment, the encoder performs intra-frame prediction on the current coding unit based on the pixel values ​​of the sample points of each synthetic reference object to obtain a first prediction value. For example, taking a specific synthetic reference object, the encoder calculates the intra-frame prediction value (i.e., the first prediction value) of the current coding unit based on the pixel values ​​of the sample points of that synthetic reference object. In this way, one first prediction value can be calculated for each synthetic reference object, thus yielding N first prediction values.

[0107] Step 504: The encoding unit determines N first rate distortion costs based on the N first prediction values, and determines a target reference object based on the N first rate distortion costs, wherein the target reference object is one of the N synthetic reference objects.

[0108] For example, taking a certain first predicted value as an example, the corresponding rate-distortion cost (i.e., the first rate-distortion cost) is calculated based on the first predicted value. In this way, the first rate-distortion cost corresponding to each first predicted value can be determined, that is, N first rate-distortion costs are obtained. The method of calculating the rate-distortion cost based on the predicted value can refer to related technologies, which will not be specifically described in this embodiment.

[0109] Furthermore, the encoding end can determine the target reference object based on the N first rate distortion costs. For example, it can select the first predicted value corresponding to the smallest first rate distortion cost and determine the synthetic reference object for which the first predicted value is calculated as the target reference object.

[0110] It should be noted that the process of calculating the first prediction value at the encoding end is also the process of performing intra-frame prediction on the current coding unit. After determining the target reference object, the encoding end can use the first prediction value calculated based on the target reference object as the intra-frame prediction value of the current coding unit, and obtain the final bitstream to be sent to the decoding end based on the intra-frame prediction value.

[0111] In this embodiment, the encoder calculates the pixel values ​​of sample points of the synthetic reference objects corresponding to each of the N candidate filters based on their respective coefficients, obtaining the pixel values ​​of sample points of the N synthetic reference objects. Based on the pixel values ​​of the sample points of the N synthetic reference objects, N first prediction values ​​of the current coding unit are calculated. Based on these first prediction values, the corresponding first rate-distortion cost is determined, thereby determining the target reference object from the N synthetic reference objects. The synthetic reference objects are all synthesized based on the coefficients of the candidate filters, meaning the target reference object is also synthesized based on the coefficients of the corresponding filters, rather than calculating prediction values ​​based on the adjacent rows or columns of the current coding unit as reference rows or columns. This avoids the problem of inaccurate prediction values ​​calculated based on the adjacent rows or columns of the current coding unit due to uneven image texture or noise. In this embodiment, the synthetic reference rows or columns synthesized based on the coefficients of the candidate filters are used to perform intra-frame prediction for the current coding unit, which can effectively improve the accuracy of intra-frame prediction, thereby improving coding accuracy and contributing to improved coding efficiency.

[0112] Furthermore, since the pixel value of each sample point in the synthetic reference object is obtained by multiplying the reconstructed values ​​of the reconstructed pixels to its left, or above, or above and to its left in multiple rows or columns by their corresponding filter coefficients and then taking a weighted average, using the synthetic reference object obtained based on such sample points as the reference object of the current coding unit can also avoid the problem of inaccurate prediction caused by selecting a row or column from the adjacent rows or columns of the current coding unit as the reference object in related technologies. The solution provided by the embodiments of this application can effectively improve the accuracy of intra-frame prediction.

[0113] Optionally, determining the target reference object based on the N first rate-distortion costs includes:

[0114] The encoding end obtains the smallest first rate distortion cost among the N first rate distortion costs;

[0115] The encoding end determines the target reference object based on the minimum first rate distortion cost.

[0116] In this embodiment of the application, after the encoding end calculates the first rate distortion cost corresponding to each of the N first predicted values, it obtains the smallest first rate distortion cost among them, determines the first predicted value corresponding to the smallest first rate distortion cost, and determines the synthetic reference object for which the first predicted value is calculated as the target reference object.

[0117] It should be noted that the smaller the first rate distortion cost, the higher the accuracy of the first prediction value corresponding to the first rate distortion cost. The bitstream obtained by the encoder based on the first prediction value will also have higher accuracy. Furthermore, the encoder uses the synthesized reference object that calculates the first prediction value as the target reference object, the candidate filter that synthesizes the target reference object as the target filter, and carries the filter index information corresponding to the target filter in the bitstream. This enables the decoder to clearly know which filter the encoder uses for the first prediction value, thus ensuring that the decoder can obtain the same prediction value as the encoder based on the target filter.

[0118] Optionally, the method further includes:

[0119] The encoding end obtains the candidate reference object of the current encoding unit, and the candidate reference object is the reference row or reference column adjacent to the current encoding unit;

[0120] The encoding end calculates a second prediction value for the current encoding unit based on the candidate reference object;

[0121] The encoding end determines the second rate distortion cost based on the second predicted value;

[0122] The encoding end determines the target reference object based on the minimum first rate-distortion cost, including:

[0123] If the second rate-distortion cost is greater than the minimum first rate-distortion cost, the encoding end determines the target reference object based on the minimum first rate-distortion cost.

[0124] It should be noted that the candidate reference row or candidate reference column is the reference row or reference column adjacent to the current coding unit, for example, it may be the first column on the left and the first row on the top of the current coding unit.

[0125] In this embodiment, the encoder calculates a second prediction value for the current coding unit based on these adjacent reference rows or reference columns, determines a second rate-distortion cost based on the second prediction value, and compares the second rate-distortion cost obtained based on adjacent reference rows or reference columns with a first rate-distortion cost obtained based on synthetic reference rows or synthetic reference columns. If the smallest rate-distortion cost is one of the first rate-distortion costs obtained based on synthetic reference rows or synthetic reference columns, the encoder determines the target reference object based on the smallest first rate-distortion cost, that is, obtains the first prediction value corresponding to the smallest first rate-distortion cost, and determines the synthetic reference row or synthetic reference column for which the first prediction value is calculated as the target reference object.

[0126] It should be noted that if the minimum rate-distortion cost is the second rate-distortion cost obtained based on adjacent reference rows or columns, then the encoder calculates the second prediction value based on the adjacent reference rows or columns to obtain the final bitstream. This allows the encoder to perform intra-frame prediction based on different reference objects, improving the flexibility of intra-frame prediction.

[0127] Optionally, the method further includes:

[0128] The encoding end sends the bitstream of the current encoding unit to the decoding end. The bitstream carries first indication information, which is used to indicate whether the reference object used by the encoding end for the current encoding unit is the target reference object.

[0129] For example, if the minimum rate-distortion cost is one of the first rate-distortion costs obtained based on the synthesized reference row or column, the encoder determines the target reference object based on this minimum first rate-distortion cost. That is, the encoder calculates a first prediction value based on the target reference object to obtain the final bitstream. In this case, the first indication information indicates that the reference object used by the encoder is the target reference object. If the minimum rate-distortion cost is a second rate-distortion cost obtained based on adjacent reference rows or columns, the encoder calculates a second prediction value based on adjacent reference rows or columns to obtain the final bitstream. In this case, the first indication information may indicate that the reference object used by the encoder is not the target reference object, but rather a reference row or column adjacent to the current coding unit. This ensures that the decoder can use the same reference object as the encoder for intra-frame prediction, thus ensuring that the decoder obtains a bitstream consistent with the encoder.

[0130] The intra-prediction method provided in this application can be executed by an intra-prediction device. This application uses an intra-prediction device executing the intra-prediction method as an example to illustrate the intra-prediction device provided in this application.

[0131] Please refer to Figure 6 , Figure 6 This is a structural diagram of an intra-frame prediction device provided in an embodiment of this application, which is applied at the decoding end. Figure 6 As shown, the intra-frame prediction device 600 includes:

[0132] The first determining module 601 is used to determine the target filter and obtain the reconstructed pixel template corresponding to the target filter;

[0133] The second determining module 602 is used to determine the coefficients of the target filter based on the reconstructed pixel template;

[0134] The first calculation module 603 is used to calculate the pixel value of the sample point of the target reference object based on the coefficients of the target filter, wherein the target reference object is a target reference row or a target reference column;

[0135] The second calculation module 604 is used to calculate the prediction value of the current coding unit based on the pixel values ​​of the sample points of the target reference object and the intra-frame prediction mode of the current coding unit.

[0136] Optionally, the first determining module 601 is further configured to:

[0137] If it is determined that the current coding unit uses the target reference object, a target filter is determined.

[0138] Optionally, the device further includes:

[0139] The first acquisition module is used to acquire first indication information corresponding to the current coding unit from the bit stream. The first indication information is used to indicate whether the reference object corresponding to the current coding unit is the target reference object.

[0140] Optionally, the first determining module 601 is further configured to:

[0141] Obtain the filter index information of the current coding unit from the bitstream;

[0142] The filter corresponding to the filter index information among the N candidate filters is determined as the target filter, where N is a positive integer.

[0143] Optionally, the candidate filter includes sample pixels and target pixels. The sample pixels are sample pixels that have been decoded or whose pixel values ​​have been obtained. The target pixels are sample pixels of the target reference object. The sample pixels are located to the left or above the target pixels.

[0144] Optionally, the device further includes:

[0145] The second acquisition module is used to acquire the intra-prediction mode index information of the current coding unit from the bitstream, wherein the intra-prediction mode index information is used to indicate the intra-prediction mode of the current coding unit.

[0146] The apparatus provided in this application embodiment can perform intra-frame prediction of the current coding unit based on the target reference row or target reference column calculated by the target filter, which can effectively improve the accuracy of intra-frame prediction, thereby improving decoding accuracy and also helping to improve decoding efficiency.

[0147] The intra-frame prediction device 600 in this embodiment can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices besides a terminal. For example, the terminal can include, but is not limited to, the type of terminal 11 listed above; other devices can be servers, network attached storage (NAS), etc., and this embodiment does not specifically limit the type.

[0148] The intra-frame prediction device 600 provided in this application embodiment can achieve... Figure 2 The various processes implemented at the decoding end in the method embodiment achieve the same technical effect, and will not be described again here to avoid repetition.

[0149] The reference object determination method provided in this application can be executed by a reference object determination device. This application uses the example of a reference object determination device executing the reference object determination method to illustrate the reference object determination device provided in this application.

[0150] Please refer to Figure 7 , Figure 7 This is a structural diagram of a reference object determining device provided in an embodiment of this application, the device being applied to an encoding end. Figure 7 As shown, the reference object determining device 700 includes:

[0151] The third determining module 701 is used to determine the coefficients of each of the N candidate filters based on the reconstructed pixel template, where N is a positive integer.

[0152] The third calculation module 702 is used to calculate the pixel values ​​of the sample points of the synthesis reference objects corresponding to the N candidate filters based on the coefficients of each candidate filter, so as to obtain the pixel values ​​of the sample points of the N synthesis reference objects, wherein the synthesis reference objects are synthesis reference rows or synthesis reference columns.

[0153] The fourth calculation module 703 is used to calculate N first prediction values ​​of the current coding unit based on the pixel values ​​of the sample points of the N synthetic reference objects, wherein one first prediction value of the current coding unit is obtained for each synthetic reference object.

[0154] The fourth determining module 704 is used to determine N first rate distortion costs based on the N first predicted values, and to determine a target reference object based on the N first rate distortion costs, wherein the target reference object is one of the N synthetic reference objects.

[0155] Optionally, the fourth determining module 704 is further configured to:

[0156] Obtain the minimum first rate distortion cost among the N first rate distortion costs;

[0157] The target reference object is determined based on the minimum first rate distortion cost.

[0158] Optionally, the device further includes:

[0159] The third acquisition module is used to acquire candidate reference objects of the current coding unit, wherein the candidate reference objects are reference rows or reference columns adjacent to the current coding unit;

[0160] The fifth calculation module is used to calculate the second prediction value of the current coding unit based on the candidate reference object;

[0161] The fifth determining module is used to determine the second rate distortion cost based on the second predicted value;

[0162] The fourth determining module 704 is further configured to:

[0163] If the second rate distortion cost is greater than the minimum first rate distortion cost, the target reference object is determined based on the minimum first rate distortion cost.

[0164] Optionally, the device further includes:

[0165] The sending module is used to send the bit stream of the current encoding unit to the decoding end. The bit stream carries first indication information, which is used to indicate whether the reference object used by the device for the current encoding unit is the target reference object.

[0166] Optionally, the candidate filter includes sample pixels and target pixels. The sample pixels are sample pixels that have been decoded or whose pixel values ​​have been obtained. The target pixels are sample pixels of the target reference object. The sample pixels are located to the left or above the target pixels.

[0167] The apparatus provided in this application can avoid the problem that the predicted value calculated based on the adjacent rows or columns of the current coding unit as reference rows or columns is inaccurate when the image texture is uneven or there is noise. In this application, the synthesized reference rows or columns synthesized based on the coefficients of the candidate filter are used to perform intra-frame prediction on the current coding unit, which can effectively improve the accuracy of intra-frame prediction, thereby improving coding accuracy and also helping to improve coding efficiency.

[0168] The reference object determining device 700 provided in this application embodiment can achieve... Figure 5 The various processes implemented at the encoding end in the method embodiment achieve the same technical effect, and will not be described again here to avoid repetition.

[0169] like Figure 8 As shown, this application embodiment also provides an electronic device 800, including a processor 801 and a memory 802. The memory 802 stores a program or instructions that can run on the processor 801. For example, when the electronic device 800 is a decoding end, the program or instructions executed by the processor 801 implement the above-mentioned... Figure 2 Each step of the method embodiment described herein can achieve the same technical effect. When the electronic device 800 is a network-side device, the program or instruction executed by the processor 801 implements the above-described steps. Figure 5 The steps of the method embodiments described herein can achieve the same technical effect, and will not be repeated here to avoid repetition.

[0170] This application also provides a terminal capable of achieving the following: Figure 2 or Figure 5 The steps in the method embodiment shown are illustrated. All implementation processes and methods of the above method embodiments are applicable to this terminal embodiment and can achieve the same technical effect. Specifically, Figure 9 A schematic diagram of the hardware structure of a terminal to implement an embodiment of this application.

[0171] The terminal 900 includes, but is not limited to, at least some of the following components: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, and processor 910.

[0172] Those skilled in the art will understand that the terminal 900 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 910 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 9 The terminal structure shown does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0173] It should be understood that, in this embodiment, the input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042. The GPU 9041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0174] In this embodiment, after receiving data, the radio frequency unit 901 can transmit it to the processor 910 for processing; in addition, the radio frequency unit 901 can send data. Typically, the radio frequency unit 901 includes, but is not limited to, an antenna, an amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc.

[0175] The memory 909 can be used to store software programs or instructions, as well as various data. The memory 909 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 909 may include volatile memory or non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can 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 memory bus RAM (DRRAM). The memory 909 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0176] Processor 910 may include one or more processing units; optionally, processor 910 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 910.

[0177] Wherein, when the terminal 900 is a decoding end, the processor 910 is used for:

[0178] Determine the target filter and obtain the reconstructed pixel template corresponding to the target filter;

[0179] The coefficients of the target filter are determined based on the reconstructed pixel template;

[0180] Based on the coefficients of the target filter, the pixel values ​​of the sample points of the target reference object are calculated, wherein the target reference object is a target reference row or a target reference column;

[0181] The predicted value of the current coding unit is calculated based on the pixel values ​​of the sample points of the target reference object and the intra-frame prediction mode of the current coding unit.

[0182] When the terminal 900 is an encoding terminal, the processor 910 is used to:

[0183] The coefficients of N candidate filters are determined based on the reconstructed pixel template, where N is a positive integer.

[0184] Based on the coefficients corresponding to each candidate filter, the pixel values ​​of the sample points of the synthesis reference objects corresponding to each of the N candidate filters are calculated respectively, and the pixel values ​​of the sample points of the N synthesis reference objects are obtained. The synthesis reference objects are synthesis reference rows or synthesis reference columns.

[0185] Based on the pixel values ​​of the sample points of the N synthetic reference objects, N first prediction values ​​of the current coding unit are calculated, and one first prediction value of the current coding unit is obtained for each synthetic reference object.

[0186] Based on the N first predicted values, N first rate distortion costs are determined, and based on the N first rate distortion costs, a target reference object is determined, wherein the target reference object is one of the N synthetic reference objects.

[0187] The terminal provided in this application embodiment can effectively improve the accuracy of intra-frame prediction.

[0188] It is understood that the implementation process of each implementation method mentioned in this embodiment can refer to the above. Figure 2 or Figure 5 The relevant descriptions in the method embodiments, which achieve the same or corresponding technical effects, will not be repeated here to avoid duplication.

[0189] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described intra-frame prediction method or reference object determination method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

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

[0191] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described intra-frame prediction method or reference object determination method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0192] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0193] This application also 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-described intra-frame prediction method or reference object determination method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0194] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0195] From the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of computer software products plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk, etc.) and includes several instructions to cause the terminal or network-side device to execute the methods described in the various embodiments of this application.

[0196] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other implementations under the guidance of this application without departing from the spirit and scope of the claims. All of these implementations are within the protection scope of this application.

Claims

1. An intra-frame prediction method, characterized in that, include: The decoding end determines the target filter and obtains the reconstructed pixel template corresponding to the target filter; The decoding end determines the coefficients of the target filter based on the reconstructed pixel template; The decoding end calculates the pixel value of the sample point of the target reference object based on the coefficients of the target filter, wherein the target reference object is a target reference row or a target reference column; The decoding end calculates the prediction value of the current coding unit based on the pixel values ​​of the sample points of the target reference object and the intra-frame prediction mode of the current coding unit.

2. The method according to claim 1, characterized in that, The decoding end determines the target filter, including: The decoding end determines the target filter when it determines that the current encoding unit uses the target reference object.

3. The method according to claim 2, characterized in that, Before determining the target filter when the decoding end determines that the current coding unit uses the target reference object, the method further includes: The decoding end obtains the first indication information corresponding to the current encoding unit from the bit stream. The first indication information is used to indicate whether the reference object corresponding to the current encoding unit is the target reference object.

4. The method according to any one of claims 1-3, characterized in that, The decoding end determines the target filter, including: The decoding end obtains the filter index information of the current encoding unit from the bit stream; The decoding end determines the filter corresponding to the filter index information among N candidate filters as the target filter, where N is a positive integer.

5. The method according to claim 4, characterized in that, The candidate filter includes sample pixels and target pixels. The sample pixels are sample pixels that have been decoded or whose pixel values ​​have been obtained. The target pixels are sample pixels of the target reference object. The sample pixels are located to the left or above the target pixels.

6. The method according to any one of claims 1-3, characterized in that, The method further includes: The decoding end obtains the intra-prediction mode index information of the current coding unit from the bitstream. The intra-prediction mode index information is used to indicate the intra-prediction mode of the current coding unit.

7. A method for determining a reference object, characterized in that, include: The encoding end determines the coefficients of N candidate filters based on the reconstructed pixel template, where N is a positive integer. The encoding end calculates the pixel values ​​of the sample points of the synthesis reference objects corresponding to each of the N candidate filters based on the coefficients of each candidate filter, and obtains the pixel values ​​of the sample points of the N synthesis reference objects. The synthesis reference objects are synthesis reference rows or synthesis reference columns. The encoding end calculates N first prediction values ​​for the current encoding unit based on the pixel values ​​of the sample points of the N synthetic reference objects, and one first prediction value for the current encoding unit is obtained for each synthetic reference object. The encoding end determines N first rate distortion costs based on the N first prediction values, and determines a target reference object based on the N first rate distortion costs. The target reference object is one of the N synthetic reference objects. The synthesis reference row is the reference row of the current coding unit, and each pixel in the synthesis reference row is sequentially used as a target pixel in the target filter to calculate the corresponding pixel value. The synthesis reference column is the reference column of the current coding unit, and each pixel in the synthesis reference column is sequentially used as a target pixel in the target filter to calculate the corresponding pixel value.

8. The method according to claim 7, characterized in that, The determination of the target reference object based on the N first rate-distortion costs includes: The encoding end obtains the smallest first rate distortion cost among the N first rate distortion costs; The encoding end determines the target reference object based on the minimum first rate distortion cost.

9. The method according to claim 8, characterized in that, The method further includes: The encoding end obtains the candidate reference object of the current encoding unit, and the candidate reference object is the reference row or reference column adjacent to the current encoding unit; The encoding end calculates a second prediction value for the current encoding unit based on the candidate reference object; The encoding end determines the second rate distortion cost based on the second predicted value; The encoding end determines the target reference object based on the minimum first rate-distortion cost, including: If the second rate-distortion cost is greater than the minimum first rate-distortion cost, the encoding end determines the target reference object based on the minimum first rate-distortion cost.

10. The method according to any one of claims 7-9, characterized in that, The method further includes: The encoding end sends the bitstream of the current encoding unit to the decoding end. The bitstream carries first indication information, which is used to indicate whether the reference object used by the encoding end for the current encoding unit is the target reference object.

11. The method according to any one of claims 7-9, characterized in that, The candidate filter includes sample pixels and target pixels. The sample pixels are sample pixels that have been decoded or whose pixel values ​​have been obtained. The target pixels are sample pixels of the target reference object. The sample pixels are located to the left or above the target pixels.

12. An intra-frame prediction device, characterized in that, include: The first determining module is used to determine the target filter and obtain the reconstructed pixel template corresponding to the target filter; The second determining module is used to determine the coefficients of the target filter based on the reconstructed pixel template; The first calculation module is used to calculate the pixel value of the sample point of the target reference object based on the coefficients of the target filter, wherein the target reference object is a target reference row or a target reference column; The second calculation module is used to calculate the prediction value of the current coding unit based on the pixel values ​​of the sample points of the target reference object and the intra-frame prediction mode of the current coding unit.

13. The apparatus according to claim 12, characterized in that, The first determining module is further configured to: If it is determined that the current coding unit uses the target reference object, a target filter is determined.

14. The apparatus according to claim 13, characterized in that, The device further includes: The first acquisition module is used to acquire first indication information corresponding to the current coding unit from the bit stream. The first indication information is used to indicate whether the reference object corresponding to the current coding unit is the target reference object.

15. The apparatus according to any one of claims 12-13, characterized in that, The first determining module is further configured to: Obtain the filter index information of the current coding unit from the bitstream; The filter corresponding to the filter index information among the N candidate filters is determined as the target filter, where N is a positive integer.

16. The apparatus according to claim 15, characterized in that, The candidate filter includes sample pixels and target pixels. The sample pixels are sample pixels that have been decoded or whose pixel values ​​have been obtained. The target pixels are sample pixels of the target reference object. The sample pixels are located to the left or above the target pixels.

17. The apparatus according to any one of claims 12-13, characterized in that, The device further includes: The second acquisition module is used to acquire the intra-prediction mode index information of the current coding unit from the bitstream, wherein the intra-prediction mode index information is used to indicate the intra-prediction mode of the current coding unit.

18. A reference object determining device, characterized in that, include: The third determining module is used to determine the coefficients of each of the N candidate filters based on the reconstructed pixel template, where N is a positive integer. The third calculation module is used to calculate the pixel values ​​of the sample points of the synthesis reference objects corresponding to the N candidate filters based on the coefficients of each candidate filter, so as to obtain the pixel values ​​of the sample points of the N synthesis reference objects, wherein the synthesis reference objects are synthesis reference rows or synthesis reference columns. The fourth calculation module is used to calculate N first prediction values ​​of the current coding unit based on the pixel values ​​of the sample points of the N synthetic reference objects, wherein one first prediction value of the current coding unit is obtained for each synthetic reference object. The fourth determining module is used to determine N first rate distortion costs based on the N first predicted values, and to determine a target reference object based on the N first rate distortion costs, wherein the target reference object is one of the N synthetic reference objects; The synthesis reference row is the reference row of the current coding unit, and each pixel in the synthesis reference row is sequentially used as a target pixel in the target filter to calculate the corresponding pixel value. The synthesis reference column is the reference column of the current coding unit, and each pixel in the synthesis reference column is sequentially used as a target pixel in the target filter to calculate the corresponding pixel value.

19. The apparatus according to claim 18, characterized in that, The fourth determining module is also used for: Obtain the minimum first rate distortion cost among the N first rate distortion costs; The target reference object is determined based on the minimum first rate distortion cost.

20. The apparatus according to claim 19, characterized in that, The device further includes: The third acquisition module is used to acquire candidate reference objects of the current coding unit, wherein the candidate reference objects are reference rows or reference columns adjacent to the current coding unit; The fifth calculation module is used to calculate the second prediction value of the current coding unit based on the candidate reference object; The fifth determining module is used to determine the second rate distortion cost based on the second predicted value; The fourth determining module is also used for: If the second rate distortion cost is greater than the minimum first rate distortion cost, the target reference object is determined based on the minimum first rate distortion cost.

21. The apparatus according to any one of claims 18-20, characterized in that, The device further includes: The sending module is used to send the bit stream of the current encoding unit to the decoding end. The bit stream carries first indication information, which is used to indicate whether the reference object used by the device for the current encoding unit is the target reference object.

22. The apparatus according to any one of claims 18-20, characterized in that, The candidate filter includes sample pixels and target pixels. The sample pixels are sample pixels that have been decoded or whose pixel values ​​have been obtained. The target pixels are sample pixels of the target reference object. The sample pixels are located to the left or above the target pixels.

23. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the intra-frame prediction method as described in any one of claims 1-6, or to implement the steps of the reference object determination method as described in any one of claims 7-11.

24. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the intra-frame prediction method as described in any one of claims 1-6, or the steps of the reference object determination method as described in any one of claims 7-11.

25. A chip, characterized in that, The chip includes a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the intra-frame prediction method as described in any one of claims 1-6, or to implement the reference object determination method as described in any one of claims 7-11.