Intra-frame prediction method and apparatus, and electronic device and readable storage medium

By determining the target filter and calculating the filter coefficients in intra prediction, adapting to the asymmetry and inhomogeneity of image texture distribution, the problem of inaccurate prediction values ​​in the prior art is solved, and the accuracy of intra prediction is improved and efficiency.

WO2024255720A1PCT designated stage expired Publication Date: 2024-12-19VIVO MOBILE COMM CO LTD

Patent Information

Application Number
PCT/CN2024/098319
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-16
Filing Date
2024-06-11
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

In the prior art, when the intra prediction values ​​obtained by the upper reference row and the left reference column with the same distance as the current encoding unit are forced to be used, the prediction values ​​are inaccurate when the image texture distribution is asymmetric or uneven.

Method used

By determining the target filter at the decoding end and the encoding end, the filter coefficients are calculated using the reconstructed pixel template of the sample pixel point and the target pixel point, and the predicted value of the current encoding unit is calculated, allowing the sample pixel point to be located on the right or on the target pixel point. laterally, adapt to the asymmetry and unevenness of texture distribution.

Benefits of technology

The accuracy and decoding efficiency of intra prediction are improved, and the diversity of texture distribution in video images is adapted to ensure the accuracy of predicted values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024098319_19122024_PF_FP_ABST
    Figure CN2024098319_19122024_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of video coding and decoding. Disclosed are an intra-frame prediction method and apparatus, and an electronic device and a readable storage medium. The intra-frame prediction method in the embodiments of the present application comprises: when a prediction mode of the current coding unit is a target mode, a decoding end determining a target filter, wherein the target filter is one of at least one candidate filter, and the candidate filter comprises a sample pixel point and a target pixel point, the sample pixel point is a pixel point which has been decoded or a predicted value of which has been obtained, the target pixel point is a pixel point in the current coding unit that has not been decoded, and the sample pixel point is located on the right side or an upper side of the target pixel point; the decoding end acquiring a reconstruction pixel template corresponding to the target filter; the decoding end determining a coefficient of the target filter on the basis of the reconstruction pixel template; and the decoding end calculating a predicted value of the current coding unit on the basis of the coefficient of the target filter.
Need to check novelty before this filing date? Find Prior Art

Description

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. 202310719342.8 filed on June 16, 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 an intra-frame prediction method, device, electronic device and readable storage medium. Background Art

[0004] 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 encodes each CU in a top-to-bottom, left-to-right order, and the decoder decodes each CU in the current frame in the same order. However, image texture distribution varies. When the texture distribution above and to the left is different or uneven, the prediction value obtained by forcibly using the upper reference row and left reference column at the same distance from the current CU in related technologies will be inaccurate.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide an intra-frame prediction method, apparatus, electronic device, and readable storage medium, which can solve the problem in the related art of inaccurate prediction values ​​obtained by forcibly using an upper reference row and a left reference column at the same distance from a current coding unit.

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

[0008] When the prediction mode of the current coding unit is the target mode, the decoding end determines a target filter, wherein the target filter is one of at least one candidate filter, the candidate filter includes a sample pixel point and a target pixel point, the sample pixel point is a pixel point that has been decoded or has obtained a prediction value, the target pixel point is a pixel point that has not been decoded in the current coding unit, and the sample pixel point is located to the right or above the target pixel point;

[0009] The decoding end obtains a reconstructed pixel template corresponding to the target filter;

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

[0011] The decoding end calculates a prediction value of the current coding unit based on coefficients of the target filter.

[0012] In a second aspect, an intra-frame prediction method is provided, which is performed by an encoder, including:

[0013] When the prediction mode of the current coding unit is the target mode, the encoder determines at least one candidate filter, where the candidate filter includes a sample pixel point and a target pixel point, the sample pixel point is a pixel point that has been encoded or has obtained a prediction value, the target pixel point is a pixel point that has not been encoded in the current coding unit, and the sample pixel point is located to the right or above the target pixel point;

[0014] The encoding end obtains a reconstructed pixel template corresponding to each of the at least one candidate filters;

[0015] The encoding end determines, based on the reconstructed pixel template, coefficients corresponding to each of the at least one candidate filters;

[0016] The encoding end calculates the prediction value of the current coding unit according to the coefficient corresponding to each candidate filter, and determines a target filter according to the prediction value, where the target filter is one of the at least one candidate filter.

[0017] According to a third aspect, an intra-frame prediction apparatus is provided, comprising:

[0018] a first determining module, configured to, when a prediction mode of a current coding unit is a target mode, determine a target filter, wherein the target filter is one of at least one candidate filter, the candidate filter including a sample pixel point and a target pixel point, the sample pixel point being a pixel point that has been decoded or has obtained a prediction value, the target pixel point being a pixel point that has not been decoded in the current coding unit, and the sample pixel point being located to the right or above the target pixel point;

[0019] A first acquisition module, configured to acquire a reconstructed pixel template corresponding to the target filter;

[0020] A second determination module, configured to determine coefficients of the target filter based on the reconstructed pixel template;

[0021] A first calculation module is used to calculate the prediction value of the current coding unit based on the coefficient of the target filter.

[0022] In a fourth aspect, an intra-frame prediction apparatus is provided, comprising:

[0023] a third determining module, configured to, when the prediction mode of the current coding unit is the target mode, determine at least one candidate filter, wherein the candidate filter includes a sample pixel point and a target pixel point, the sample pixel point being a pixel point that has been encoded or has obtained a predicted value, the target pixel point being a pixel point that has not been encoded in the current coding unit, and the sample pixel point being located to the right or above the target pixel point;

[0024] A second acquisition module is used to obtain a reconstructed pixel template corresponding to each of the at least one candidate filters;

[0025] a fourth determining module, configured to determine coefficients corresponding to the at least one candidate filter based on the reconstructed pixel template;

[0026] The second calculation module is used to calculate the prediction value of the current coding unit according to the coefficient corresponding to each candidate filter, and determine the target filter according to the prediction value, where the target filter is one of the at least one candidate filter.

[0027] In a fifth aspect, an electronic device is provided, 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 intra-frame prediction method as described in the first aspect or the second aspect are implemented.

[0028] 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 method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.

[0029] 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 method described in the first aspect, or to implement the method described in the second aspect.

[0030] In an eighth aspect, a computer program / program product is provided, wherein the computer program / program product is stored in a storage medium, and the program / program product is executed by at least one processor to implement the steps of the method described in the first aspect, or to implement the steps of the method described in the second aspect.

[0031] In an embodiment of the present application, the target filter includes sample pixels and target pixels, the sample pixels are decoded pixels, and the target pixels are undecoded pixels in the current coding unit. The sample pixels are located to the right or above the target pixels, that is, the undecoded pixels in the current coding unit are located to the right or above the decoded sample pixels. The current coding unit is predicted based on these sample pixels. This is different from the method in the related art of forcing the use of predicted values ​​obtained by the upper reference row and left reference column with the same distance as the current coding unit. In the embodiment of the present application, the distance between the sample pixels and the pixels to be predicted in the current coding unit is not limited, which takes into account the asymmetric and uneven texture distribution in the video image, effectively improving the accuracy of intra-frame prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] FIG1a is a schematic diagram of three positions of a reconstructed pixel area and a current coding unit in the related art;

[0033] FIG1b is a schematic diagram of three filters of different shapes in the related art;

[0034] FIG2 is a flowchart of an intra-frame prediction method provided by an embodiment of the present application;

[0035] FIG3 is a schematic diagram of one of three candidate filters of different shapes applicable in an embodiment of the present application;

[0036] FIG4 is a schematic diagram of three positions of a reconstructed pixel template and a current coding unit applicable in an embodiment of the present application;

[0037] FIG5 is a second schematic diagram of three candidate filters of different shapes applicable in an embodiment of the present application;

[0038] FIG6 is a flowchart of another intra-frame prediction method provided by an embodiment of the present application;

[0039] FIG7 is a structural diagram of an intra-frame prediction device provided by an embodiment of the present application;

[0040] FIG8 is a structural diagram of another intra-frame prediction device provided by an embodiment of the present application;

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

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

[0043] 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.

[0044] 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 the number of objects is not limited. 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.

[0045] For better understanding, the following explains relevant concepts that may be involved in the embodiments of this application.

[0046] Currently, the encoder uses intra-frame prediction technology based on image texture correlation, taking the reconstructed samples of the upper row and left column adjacent to the current coding unit as references, and traversing the direct current (DC) mode, planar mode and angular prediction mode, and selecting the optimal intra-frame prediction mode with the utilization rate-distortion cost to remove the spatial redundancy of the block.

[0047] In related technologies, at the encoding end, an extrapolation filter-based intra prediction mode (EIP) is implemented as follows:

[0048] 1. Obtain a reconstructed pixel area above and / or to the left of the current coding unit (also called prediction unit, PU) as shown in FIG1a , and calculate 15-tap filter coefficients of three shapes as shown in FIG1b , respectively. The calculation method may be the same as the method for calculating filter coefficients in the convolutional cross-component intra prediction model (CCCM) in the enhanced compression model (ECM) in the related art. Taking FIG1b as an example, specifically:

[0049] The filter coefficients are calculated by minimizing the mean-square error (MSE) between the white and gray samples in the reconstructed pixel area. 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 the 1 white output sample point. The autocorrelation matrix is ​​decomposed by LDL (Lower triangular matrix (L), diagonal matrix (D), transposed lower triangular matrix (L)), and the final filter coefficients are calculated using inverse permutation.

[0050] 2. Using the three extrapolation filter shapes shown in Figure 1b, starting from the first sample point in the upper left corner of the current coding unit, calculate the predicted value for each sample point from left to right and from top to bottom. In Figure 1b, the gray sample point is the input of the EIP mode, and the white sample point in the lower right corner is the output of the EIP mode, that is, the desired predicted value.

[0051] 3. Calculate the predicted value of the current coding unit using the three extrapolation filter shapes in EIP mode, and then calculate the rate-distortion cost. Compare the rate-distortion costs with those of other prediction modes. If the rate-distortion cost of EIP mode is the lowest, set the EIP mode flag to 1 and write the selected filter index (i.e., one of the three filters shown in 1b) into the bitstream.

[0052] After determining that the current coding unit to be decoded is in EIP mode, the decoder parses the index value of the selected filter. The filter coefficients are obtained using the decoded reconstructed pixel values ​​above and / or to the left of the current coding unit in the same manner as the encoder. The predicted value of each sample point in the current coding unit is calculated from top to bottom and from left to right, and the predicted value is 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] However, image texture distribution is diverse. When the texture distribution above and to the left is different or uneven, the prediction value obtained by forcibly using the upper reference row and left reference column with the same distance from the current coding unit in the related art will be inaccurate. The embodiment of the present application proposes a new intra-frame prediction method.

[0054] The intra-frame prediction method, apparatus, and related devices provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings through some embodiments and their application scenarios.

[0055] Please refer to Figure 2, which is a flowchart of an 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:

[0056] Step 201: When the prediction mode of the current coding unit is the target mode, the decoding end determines a target filter.

[0057] The target filter is one of at least one candidate filter, and the candidate filter includes a sample pixel point and a target pixel point. The sample pixel point is a pixel point that has been decoded or has obtained a predicted value, and the target pixel point is an undecoded pixel point in the current coding unit. The sample pixel point is located to the right or above the target pixel point.

[0058] For example, as shown in FIG3 , FIG3 shows three candidate filters of different shapes (a), (b), and (c), respectively, wherein each gray box represents a sample pixel point, and the white box represents the target pixel point, which is also the undecoded pixel point in the current coding unit. The sample pixel point is the pixel point in the image frame that has been decoded or has obtained a predicted value, and the sample pixel point is located to the right or above the target pixel point. In the three candidate filters shown in FIG3 , the sample pixel point is located to the right and above the target pixel point, that is, the target pixel point is located at the lower left corner of the sample pixel point. It should be noted that the above are only three possible candidate filter forms in the embodiment of the present application, but are not limited thereto. The candidate filter provided in the embodiment of the present application can also be in other possible forms.

[0059] In the embodiment of the present application, the target filter is one of the candidate filters, that is, the target filter also includes sample pixels and target pixels.

[0060] The target pixel is an undecoded pixel in the current coding unit, and the sample pixel is a pixel that has been decoded or has obtained a predicted value. That is, the sample pixel is a pixel located above or to the right of the sample point to be predicted in the current coding unit. The target filter can be moved in steps of the number of target pixels. For example, if the number of target pixels is one, the decoding end decodes one pixel in the current coding unit each time, and decodes and predicts the pixels of the current coding unit one by one. For example, the first pixel on the right side of the top row of the current coding unit can be decoded first, and the target pixel in the target filter is also the first pixel. After decoding the first pixel, the second pixel on the right side of the top row of the current coding unit is decoded. At this time, the target pixel in the target filter is also the second pixel. At this time, the target filter is shifted to the right by a step of one pixel, and the sample pixel is also changed. In this way, the decoding end can obtain the predicted value of each pixel in the current coding unit based on this method.

[0061] In an embodiment of the present application, the target mode may be a specific intra-frame prediction mode, such as an EIP mode or other intra-frame prediction mode. For example, the target mode may be an intra-frame prediction mode agreed upon by the decoder and encoder, or may be an intra-frame prediction mode determined by the decoder based on information in the bitstream.

[0062] Optionally, before step 201, the method may further include:

[0063] The decoding end obtains the intra-frame prediction mode index information of the current coding unit from the bit stream;

[0064] The decoding end determines whether the prediction mode of the current coding unit is the target mode based on the intra-frame prediction mode index information.

[0065] It should be noted that the code stream sent by the encoding end to the decoding end includes intra-frame prediction mode index information, which is used to characterize the intra-frame prediction mode used by the encoding end. Then, the decoding end can determine which intra-frame prediction mode is used by the encoding end based on the intra-frame prediction mode index information, and can also determine whether the intra-frame prediction mode used is the target mode, so that the decoding end can use the same intra-frame prediction mode as the encoding end to decode the current coding unit, so as to ensure that the decoding end can obtain a prediction value consistent with the encoding end.

[0066] Exemplarily, taking the target mode as the EIP mode, if the intra-frame prediction mode used by the encoding end is the EIP mode, the intra-frame prediction mode index information is identified as 1; if the encoding end does not use the EIP mode, the intra-frame prediction mode index information may be identified as 0, or an identifier corresponding to another intra-frame prediction mode; the encoding end writes the intra-frame prediction mode index information into the bitstream and sends it to the decoding end, and then the decoding end can determine whether the prediction mode of the current coding unit is the EIP mode by identifying whether the intra-frame prediction mode index information is 1.

[0067] In the embodiment of the present application, the target filter is one of the candidate filters, and the decoding end randomly selects one from the candidate filters as the target filter, or the target filter may be determined based on information obtained from the bitstream.

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

[0069] The decoding end obtains the filter index information of the current coding unit from the bitstream;

[0070] The decoding end determines a filter corresponding to the filter index information among the at least one candidate filter as a target filter.

[0071] In the embodiment of the present application, there may be multiple candidate filters, and the encoder may select one of them as the target filter and encode the current coding unit based on the target filter. The encoder may write filter index information in the bitstream sent to the decoder. The filter index information is used to represent the target filter used by the encoder. The decoder can then determine which target filter is used by the encoder based on the filter index information in the bitstream, and thus use the same target filter as the encoder to decode the current coding unit, ensuring that the decoder can obtain a prediction value consistent with that of the encoder.

[0072] It should be noted that the encoder and decoder may pre-agreed on filter index information corresponding to different candidate filters, for example, the filter index information corresponding to candidate filter 1 is identified as 1, the filter index information corresponding to candidate filter 2 is identified as 2, and so on. Furthermore, the decoder can determine the corresponding candidate filter based on the identification of the filter index information, use the candidate filter as the target filter, and use the candidate filter to decode the current coding unit.

[0073] Step 202: The decoding end obtains a reconstructed pixel template corresponding to the target filter.

[0074] Optionally, different candidate filters may correspond to different reconstructed pixel templates. For example, taking the three candidate filters shown in FIG3 as an example, these three candidate filters correspond to three different reconstructed pixel templates, respectively, wherein the candidate filter (a) in FIG3 corresponds to the reconstructed pixel template shown in FIG4 (c), that is, the candidate filter corresponds to the template composed of the decoded reconstructed pixels on the upper and right sides of the current coding unit; the candidate filter (b) in FIG3 corresponds to the reconstructed pixel template shown in FIG4 (a), that is, the candidate filter corresponds to the template composed of the decoded reconstructed pixels on the upper side of the current coding unit; the candidate filter (c) in FIG3 corresponds to the reconstructed pixel template shown in FIG4 (b), that is, the candidate filter corresponds to the template composed of the decoded reconstructed pixels on the right side of the current coding unit.

[0075] In an embodiment of the present application, after the decoding end determines the target filter, that is, a candidate filter, it can obtain the reconstructed pixel template corresponding thereto. It should be noted that the correspondence between the candidate filter and the reconstructed pixel template can be established in advance. The forms of the candidate filters and the reconstructed pixel templates and the correspondence between the two shown in Figures 3 and 4 above are merely examples and do not constitute a limitation to the embodiments of the present application. The forms of the candidate filters and the reconstructed pixel templates and the correspondence between the two in the embodiments of the present application may also be other possible situations.

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

[0077] It should be noted that after determining the reconstructed pixel template corresponding to the target filter, the decoder can calculate the coefficients of the target 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 in ECM, and the present embodiment will not be detailed in detail.

[0078] Step 204: The decoding end calculates a prediction value of the current coding unit based on the coefficients of the target filter.

[0079] After obtaining the coefficients of the target filter, the decoding end calculates the predicted value of each pixel point of the current coding unit based on the coefficients of the target filter.

[0080] For example, assuming that the target filter is the filter shown in (a) of Figure 3, that is, there is one target pixel, the target filter can obtain the predicted value of one pixel in the current coding unit each time. Based on the target filter, the decoding end obtains the predicted value of each pixel in each row of the current coding unit from right to left, first obtaining the predicted value of each pixel in the first row, then obtaining the predicted value of each pixel in the second row, and so on, obtaining the predicted value of each pixel in each row from top to bottom. It can be understood that in the process of obtaining the predicted value of each pixel in the current coding unit, the target pixel and sample pixel in the target filter also change accordingly.

[0081] It should be noted that the number of coefficients of the target filter is the same as the number of sample pixels in the target filter. For example, taking the target filter as shown in (a) of Figure 3 as an example, the target filter includes 15 sample pixels, and the decoding end will obtain 15 filter coefficients. The decoding end can respectively calculate the product of these 15 filter coefficients and the reconstruction value or prediction value of the corresponding sample pixel points (the sample pixel points are the decoded reconstructed pixel points around the current coding unit, and their reconstruction values ​​are known. The sample pixel points may also be the pixel points within the current coding unit that have obtained the prediction value through this method). That is, 15 products will be obtained. Based on these 15 products, the predicted value of the pixel point to be predicted in the current coding unit is determined. For example, the average value of these 15 products can be used as the predicted value of the pixel point to be predicted. Based on this method, the predicted value of each pixel point in the current coding unit can be obtained one by one.

[0082] Furthermore, the decoding end calculates the residual value of each pixel based on the residual information of each pixel in the current coding unit obtained from the bitstream, and adds the residual value of each pixel to the corresponding prediction value to obtain the reconstructed value of each pixel.

[0083] In an embodiment of the present application, the decoding end obtains the corresponding reconstructed pixel template based on the target filter, determines the coefficient of the target filter based on the reconstructed pixel template, and further calculates the predicted value of each pixel point in the current coding unit based on the coefficient of the target filter. Among them, the target filter includes sample pixels and target pixels, the sample pixels are pixels that have been decoded or have obtained predicted values, and the target pixels are undecoded pixels in the current coding unit (that is, pixels to be predicted). The sample pixels are located to the right or above the target pixels, that is, the undecoded pixels in the current coding unit are located to the right or above the decoded sample pixels (which may be decoded reconstructed pixels outside the current coding unit, or sample points with predicted values ​​inside the current coding unit). The current coding unit is predicted based on these sample pixels. This is different from the method in the related art that forces the use of predicted values ​​obtained by the upper reference row and left reference column at the same distance from the current coding unit. In the embodiment of the present application, the distance between the sample pixels and the pixels to be predicted in the current coding unit is not limited, which takes into account the asymmetric and uneven texture distribution in the video image, effectively improves the accuracy of intra-frame prediction, and also helps to improve decoding efficiency.

[0084] Optionally, the number of target pixels is at least one. For example, in the three candidate filters shown in FIG3 , each candidate filter includes one target pixel (i.e., a white box); the candidate filter shown in FIG5(a) includes four target pixels, the candidate filter shown in FIG5(b) includes eight target pixels, and the candidate filter shown in FIG5(c) includes two target pixels.

[0085] It should be noted that when the number of target pixels is greater than one, the number of target pixels and the shape of the candidate filter may also be other possible forms, and FIG5 above does not constitute a limitation on the candidate filter in the embodiment of the present application.

[0086] Optionally, the number of target pixels in the target filter is N, where N is greater than or equal to 1, and the decoding end determines the coefficients of the target filter based on the reconstructed pixel template, including:

[0087] The decoding end determines N coefficient groups of the target filter based on the reconstructed pixel template, wherein each coefficient group includes M coefficients, the value of M is the same as the number of sample pixels in the target filter, and M is a positive integer;

[0088] The decoding end determines a prediction value of the current coding unit based on a coefficient of the target filter, including:

[0089] The decoding end determines predicted values ​​of N undecoded pixels in the current coding unit based on the N coefficient groups of the target filter.

[0090] The coefficients are filter coefficients.

[0091] In an embodiment of the present application, the number of target pixels in the target filter can be one or more. For example, assuming that the target filter is a filter as shown in FIG3 , that is, the number of target pixels in the target filter is one, and the number of sample pixels is 15, that is, N=1, M=15, the decoding end can predict the predicted value of an undecoded pixel (also referred to as a pixel to be predicted) in the current coding unit at a time. Specifically, the decoding end determines a coefficient group of the target filter based on the reconstructed pixel template corresponding to the target filter, and the coefficient group includes 15 filter coefficients. The decoding end obtains the predicted value of an undecoded pixel in the current coding unit based on these 15 filter coefficients. The undecoded pixel is also the target pixel in the target filter, and the predicted value of each undecoded pixel in the current coding unit is obtained one by one based on this method. Among them, the specific implementation method of calculating the predicted value of the undecoded pixel based on the filter coefficient can be reference to the relevant technology, for example, it can be to calculate the product of the 15 filter coefficients and the reconstructed value or predicted value of the corresponding sample pixel, and the average value of these products is used as the predicted value of the pixel to be predicted.

[0092] Alternatively, the target filter is a filter as shown in FIG5 , that is, the number of target pixels in the target filter is greater than one. Assuming that the target filter is the filter shown in FIG5 (a), that is, the number of target pixels in the target filter is 4, and the number of sample pixels is 12, that is, N=4, M=12, then the decoding end can predict the predicted values ​​of 4 undecoded pixels in the current coding unit each time. Specifically, the decoding end determines the 4 coefficient groups of the target filter based on the reconstructed pixel template corresponding to the target filter, each coefficient group includes 12 filter coefficients, and the decoding end calculates the predicted values ​​of the 4 undecoded pixels in the current coding unit based on these 4 coefficient groups and the 12 filter coefficients in each group. That is, the decoding end can obtain the predicted values ​​of 4 undecoded pixels at the same time, which can effectively improve the decoding efficiency of the decoding end.

[0093] It should be noted that when N is greater than 1, the decoding end can simultaneously determine the predicted values ​​of N undecoded pixels in the current coding unit based on the N coefficient groups of the target filter and the M coefficients in each coefficient group. Specifically, the M coefficients in a coefficient group can be used to calculate the predicted value of an undecoded pixel, and the N coefficient groups also correspond to the predicted values ​​of N undecoded pixels. The specific implementation method of calculating the predicted value of an undecoded pixel based on the M coefficients can be referred to the previous description and will not be repeated here.

[0094] In an embodiment of the present application, the decoding end can determine N coefficient groups based on the N target pixel points in the target filter, and then calculate the predicted values ​​of the N undecoded pixel points in the current coding unit based on these N coefficient groups and the M coefficients in each coefficient group, thereby effectively improving the decoding efficiency of the decoding end.

[0095] Optionally, determining the prediction value of the current coding unit includes any one of the following:

[0096] When the number of target pixels in the target filter is one, the decoding end calculates the prediction value of each undecoded pixel in each row of the current coding unit row by row in a right-to-left order;

[0097] When the number of target pixels in the target filter is greater than one, the decoding end calculates the predicted value of each undecoded pixel in each row of the current coding unit row by row in a right-to-left or left-to-right order.

[0098] For example, if the number of target pixels in the target filter is one, such as the filter shown in Figure 3, in this case, the decoding end can only obtain the prediction value of one undecoded pixel in the current coding unit at a time, and the current coding unit usually includes multiple rows and columns of pixels. The decoding end can calculate the prediction value of each undecoded pixel in the current coding unit in sequence from right to left and from top to bottom, that is, first calculate the prediction value of each undecoded pixel in the first row one by one from right to left, then calculate the prediction value of each undecoded pixel in the second row one by one from right to left, and then calculate the prediction value of each undecoded pixel in the third row one by one from right to left... In this way, the prediction value of each undecoded pixel in each row is calculated row by row from right to left, thereby completing the prediction of the current coding unit.

[0099] Alternatively, if the number of target pixels in the target filter is N, where N is greater than 1, as in the filter shown in FIG5 , in this case, the decoder can simultaneously obtain the predicted values ​​of N undecoded pixels in the current coding unit at a time. The decoder can then calculate the predicted values ​​of each undecoded pixel row by row, from right to left or from left to right. For example, the predicted values ​​of the N undecoded pixels in the first row are calculated from right to left. After the prediction of the first row is completed, the predicted values ​​of the N undecoded pixels in the second row are calculated from right to left. After the prediction of the second row is completed, the predicted values ​​of the N undecoded pixels in the third row are calculated from right to left. In this manner, the predicted values ​​of each undecoded pixel in each row are calculated from right to left, thereby completing the prediction of the current coding unit.

[0100] In an embodiment of the present application, the decoding end can calculate the predicted value of each undecoded pixel point in the current coding unit in the order from the upper right to the lower left, thereby completing the prediction of the current coding unit. This is no longer limited to the decoding end only being able to predict pixels in the order from the upper left to the lower right, which effectively improves the flexibility of decoding, and can also reduce the dependence of the undecoded pixel points in the current coding unit on the adjacent sample points on the left, which also helps to improve the accuracy of intra-frame prediction.

[0101] It should be noted that after obtaining the predicted value of each pixel point, the decoding end calculates the residual value of each pixel point based on the residual information of each pixel point in the current coding unit obtained from the bitstream, and adds the residual value of each pixel point to the corresponding predicted value to obtain the reconstructed value of each pixel point.

[0102] For better understanding, the technical solution provided by this application is described below through two specific embodiments.

[0103] Example 1

[0104] Step S11. The decoding end determines that the prediction mode of the coding unit to be decoded is the EIP mode;

[0105] Step S12: The decoder obtains the filter index information of the current coding unit from the bitstream and determines the selected filter (i.e., the target filter) based on the filter index information. In this embodiment, there are three candidate filters as shown in FIG3 , but the candidate filters are not limited thereto and may have other shapes. It should be noted that the pixel to be predicted (the white box in FIG3 ) is located in the lower left corner of the filter.

[0106] Step S13. The decoding end obtains a template composed of decoded reconstructed pixels based on the filter selected by the current coding unit to be decoded, and then calculates the coefficients of the selected filter. The calculation method can refer to the relevant technology; specifically, in combination with Figures 3 and 4:

[0107] If the selected filter is Figure 3(a), use the template shown in Figure 4(c);

[0108] If the selected filter is Figure 3(b), use the template shown in Figure 4(a);

[0109] If the selected filter is Figure 3(c), use the template shown in Figure 4(b);

[0110] Step S14. The decoding end calculates the predicted value of each pixel in the current coding unit to be decoded one by one in the order from right to left and from top to bottom based on the obtained filter coefficients, and adds it to the residual value obtained from the bit stream to obtain the reconstructed value of the current coding unit.

[0111] Example 2

[0112] Step S21: The decoding end determines that the prediction mode of the current coding unit to be decoded is the EIP mode;

[0113] Step S22: The decoder obtains filter index information for the current coding unit from the bitstream and determines a selected filter based on the filter index information. In this embodiment, the candidate filters include three types, as shown in FIG5 , but are not limited thereto and may have other shapes. Note that the pixel to be predicted is located in the bottom row of the filter (the white box in FIG5 ).

[0114] Step S23. The decoding end obtains a template composed of decoded reconstructed pixels based on the filter selected by the current coding unit to be decoded, and then calculates the coefficients of the selected filter. The calculation method can refer to the relevant art. The difference between the relevant art and Example 1 is that Example 1 and the relevant art obtain a set of coefficients for each filter, and only obtain the predicted value of one pixel at a time. The present embodiment obtains N sets of coefficients for each filter, where N is equal to the width of the filter (such as the number of white boxes in Figure 5). The gray sample points (gray boxes) in each filter in Figure 5 are used to calculate the predicted values ​​of each pixel in the bottom row. The advantage of this embodiment is that it can reduce the dependence of the current pixel to be decoded on the sample points in the same row to the left, and can obtain the predicted values ​​of pixels at N positions at one time, effectively improving decoding efficiency.

[0115] Step S24. The decoding end calculates the predicted value of each pixel in the current coding unit to be decoded one by one in the order from right to left (or from left to right) and from top to bottom according to the obtained filter coefficient, and adds it to the obtained residual value to obtain the reconstructed value of the current coding unit.

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

[0117] Step 601: When the prediction mode of the current coding unit is the target mode, the encoder determines at least one candidate filter.

[0118] The candidate filter includes sample pixel points and target pixel points, the sample pixel points are pixel points that have been encoded or have obtained predicted values, the target pixel points are unencoded pixel points in the current coding unit, and the sample pixel points are located to the right or above the target pixel points.

[0119] It should be noted that the target mode may be a specific intra-frame prediction mode, such as the EIP mode, or other intra-frame prediction modes. The encoder may determine the intra-frame prediction mode by itself, such as the EIP mode.

[0120] Optionally, the shape of the candidate filter may be predetermined by the encoding end and the decoding end, for example, the candidate filter may be shaped as shown in Figures 3 and 5. For details about the candidate filter, please refer to the description in the above decoding end embodiment, which will not be repeated here.

[0121] Step 602: The encoding end obtains a reconstructed pixel template corresponding to each of the at least one candidate filters;

[0122] Step 603: The encoder determines coefficients corresponding to the at least one candidate filter based on the reconstructed pixel template.

[0123] Step 604: The encoding end calculates the prediction value of the current coding unit according to the coefficient corresponding to each candidate filter, and determines a target filter according to the prediction value, where the target filter is one of the at least one candidate filter.

[0124] For example, assuming there are L candidate filters, the encoding end obtains the reconstructed pixel templates corresponding to each of the L candidate filters, and determines the coefficients of each candidate filter based on the reconstructed pixel templates corresponding to each candidate filter, thereby obtaining the coefficients corresponding to each of the L candidate filters. Then, for each candidate filter, a prediction value for the current coding unit is calculated based on the coefficients of the candidate filter, thereby obtaining L corresponding prediction values ​​for the current coding unit, and determining the target filter based on these prediction values. For example, the average of the L prediction values ​​may be calculated, and the candidate filter corresponding to the prediction value closest to the average value is used as the target filter. The prediction value corresponding to the target filter is used as the prediction value for the current coding unit to achieve encoding of the current coding unit.

[0125] In an embodiment of the present application, the encoding end calculates a prediction value of the current coding unit based on a candidate filter, wherein the candidate filter includes a sample pixel point and a target pixel point, the sample pixel point is an encoded pixel point, the target pixel point is an unencoded pixel point in the current coding unit, and the sample pixel point is located to the right or above the target pixel point, that is, the unencoded pixel point in the current coding unit is located to the right or above the encoded sample pixel point. The current coding unit is predicted based on these sample pixel points. This is different from the method in the related art of forcibly using the prediction value obtained by the upper reference row and the left reference column with the same distance as the current coding unit. In the embodiment of the present application, the distance between the sample pixel point and the pixel point to be predicted in the current coding unit is not limited, which takes into account the asymmetric and uneven texture distribution in the video image, effectively improves the accuracy of intra-frame prediction, and also helps to improve coding efficiency.

[0126] Optionally, the encoding end calculates a prediction value of the current coding unit according to a coefficient corresponding to each candidate filter, and determines a target filter according to the prediction value, including:

[0127] The encoding end calculates the prediction value of the current coding unit according to the coefficient corresponding to each candidate filter;

[0128] The encoder determines, according to the predicted value, a rate-distortion cost corresponding to each candidate filter;

[0129] The encoding end determines the candidate filter with the minimum rate-distortion cost as the target filter.

[0130] For example, assuming there are L candidate filters, for each candidate filter, the prediction value of the current coding unit is calculated based on the coefficients of the candidate filter. Consequently, L prediction values ​​are obtained for the current coding unit. The rate-distortion cost corresponding to each of the L prediction values ​​is calculated, and the candidate filter corresponding to the prediction value with the lowest rate-distortion cost is determined as the target filter. This allows the encoder to encode the current coding unit based on the target filter, which has the lowest rate-distortion cost, effectively ensuring encoding accuracy.

[0131] Optionally, the method further includes:

[0132] The encoding end sends a code stream to the decoding end, where the code stream carries filter index information, and the filter index information is used to indicate a target filter.

[0133] In an embodiment of the present application, each candidate filter may include a corresponding identifier, which may be known to both the encoder and decoder. After determining the target filter, the encoder may write the identifier corresponding to the target filter into the bitstream as filter index information. The decoder can then determine the target filter used by the encoder based on the filter index information, thereby allowing the decoder to select the same target filter for intra-frame prediction, effectively ensuring that the encoder and decoder can obtain consistent prediction values.

[0134] Optionally, the method further includes:

[0135] The encoder sends a code stream to the decoder, where the code stream carries intra-frame prediction mode index information, where the intra-frame prediction mode index information is used to indicate that the intra-frame prediction mode used by the encoder is the target mode.

[0136] It should be noted that the code stream sent by the encoder to the decoder includes intra-frame prediction mode index information, which is used to indicate that the intra-frame prediction mode used by the encoder is the target mode, so that the decoder can use the same intra-frame prediction mode as the encoder to decode the current coding unit to ensure that the decoder can obtain a prediction value consistent with the encoder.

[0137] Optionally, when the number of target pixels in the candidate filter is N and N is greater than or equal to 1, the encoder determines, based on the reconstructed pixel template, a coefficient corresponding to each of the at least one candidate filter, including:

[0138] The encoder determines, based on the reconstructed pixel template, N coefficient groups corresponding to a first candidate filter, where each coefficient group includes M coefficients, where the value of M is the same as the number of sample pixels in the first candidate filter, M is a positive integer, and the first candidate filter is one of the at least one candidate filter;

[0139] The encoding end calculates the prediction value of the current coding unit according to the coefficient corresponding to each candidate filter, including:

[0140] The encoding end determines predicted values ​​of N undecoded pixels in the current coding unit based on the N coefficient groups of the first candidate filter.

[0141] Optionally, the calculating the prediction value of the current coding unit includes any one of the following:

[0142] When the number of target pixels in the candidate filter is one, the encoding end calculates the prediction value of each uncoded pixel in each row of the current coding unit row by row from right to left;

[0143] When the number of target pixels in the candidate filter is greater than one, the encoding end calculates the predicted value of each uncoded pixel in each row of the current coding unit row by row in a right-to-left or left-to-right order.

[0144] In an embodiment of the present application, the specific implementation method of the encoding end determining the coefficients of the candidate filter, determining the current coding unit prediction value based on the candidate filter coefficients, and calculating the current coding unit prediction value 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.

[0145] The intra-frame prediction method provided in the embodiment of the present application can be performed by an intra-frame prediction device. In the embodiment of the present application, the intra-frame prediction device performing intra-frame prediction is taken as an example to illustrate the intra-frame prediction device provided in the embodiment of the present application.

[0146] Please refer to FIG7 , which is a structural diagram of an intra-frame prediction device provided by an embodiment of the present application, and the device is applied to a decoding end. As shown in FIG7 , the intra-frame prediction device 700 includes:

[0147] A first determining module 701 is configured to, when a prediction mode of a current coding unit is a target mode, determine a target filter, wherein the target filter is one of at least one candidate filter, the candidate filter including a sample pixel point and a target pixel point, the sample pixel point being a pixel point that has been decoded or has obtained a prediction value, the target pixel point being a pixel point that has not been decoded in the current coding unit, and the sample pixel point being located to the right or above the target pixel point;

[0148] A first acquisition module 702 is configured to acquire a reconstructed pixel template corresponding to the target filter;

[0149] A second determination module 703 is configured to determine coefficients of the target filter based on the reconstructed pixel template;

[0150] The first calculation module 704 is configured to calculate a prediction value of the current coding unit based on coefficients of the target filter.

[0151] Optionally, the first determining module 701 is further configured to:

[0152] Obtaining filter index information of the current coding unit from a bitstream;

[0153] A filter corresponding to the filter index information among the at least one candidate filter is determined as a target filter.

[0154] Optionally, the number of the target pixel points is at least one.

[0155] Optionally, when the number of target pixels in the target filter is N and N is greater than or equal to 1, the second determining module 703 is further configured to:

[0156] Determine N coefficient groups of the target filter based on the reconstructed pixel template, wherein each coefficient group includes M coefficients, the value of M is the same as the number of sample pixels in the target filter, and M is a positive integer;

[0157] The first calculation module 704 is further configured to:

[0158] Determine predicted values ​​of N undecoded pixels in the current coding unit based on the N coefficient groups of the target filter.

[0159] Optionally, the first calculation module 704 is further configured to perform any one of the following:

[0160] When the number of target pixels in the target filter is one, calculating the predicted value of each undecoded pixel in each row of the current coding unit row by row in a right-to-left order;

[0161] When the number of target pixels in the target filter is greater than one, the prediction value of each undecoded pixel in each row of the current coding unit is calculated row by row in a right-to-left or left-to-right order.

[0162] Optionally, the first determining module 701 is further configured to:

[0163] Obtaining intra-frame prediction mode index information of the current coding unit from a bitstream;

[0164] It is determined whether the prediction mode of the current coding unit is the target mode based on the intra prediction mode index information.

[0165] The solution provided in the embodiment of the present application is different from the method in the related art that forcibly uses the prediction value obtained by the upper reference row and left reference column at the same distance as the current coding unit. The embodiment of the present application does not limit the distance between the sample pixel point and the pixel point to be predicted in the current coding unit, which takes into account the asymmetric and uneven texture distribution in the video image, and effectively improves the accuracy of intra-frame prediction.

[0166] The intra-frame 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 in 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 other devices can include servers, network attached storage (NAS), etc., which are not specifically limited in the embodiments of the present application.

[0167] The 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.

[0168] Please refer to FIG8 , which is a structural diagram of another intra-frame prediction device provided by an embodiment of the present application, wherein the device is applied to an encoding end. As shown in FIG8 , the intra-frame prediction device 800 includes:

[0169] a third determining module 801, configured to, when the prediction mode of the current coding unit is the target mode, determine at least one candidate filter, wherein the candidate filter includes a sample pixel point and a target pixel point, the sample pixel point being a pixel point that has been encoded or has obtained a predicted value, the target pixel point being a pixel point that has not been encoded in the current coding unit, and the sample pixel point being located to the right or above the target pixel point;

[0170] A second acquisition module 802 is configured to acquire a reconstructed pixel template corresponding to each of the at least one candidate filters;

[0171] A fourth determining module 803 is configured to determine coefficients corresponding to the at least one candidate filter based on the reconstructed pixel template;

[0172] The second calculation module 804 is configured to calculate a prediction value of the current coding unit according to coefficients corresponding to each candidate filter, and determine a target filter according to the prediction value, where the target filter is one of the at least one candidate filter.

[0173] Optionally, the second calculation module 804 is further configured to:

[0174] Calculating a prediction value of the current coding unit according to the coefficients corresponding to each candidate filter;

[0175] Determine a rate-distortion cost corresponding to each candidate filter according to the predicted value;

[0176] The candidate filter with the smallest rate-distortion cost is determined as the target filter.

[0177] Optionally, the device further comprises:

[0178] The first sending module is configured to send a code stream to a decoding end, where the code stream carries filter index information, and the filter index information is used to indicate a target filter.

[0179] Optionally, the device further comprises:

[0180] The second sending module is used to send a code stream to the decoding end, where the code stream carries intra-frame prediction mode index information, and the intra-frame prediction mode index information is used to indicate that the intra-frame prediction mode used by the encoding end is the target mode.

[0181] Optionally, when the number of target pixels in the candidate filter is N and N is greater than or equal to 1, the fourth determining module 803 is further configured to:

[0182] Determining N coefficient groups corresponding to a first candidate filter based on the reconstructed pixel template, wherein each coefficient group includes M coefficients, the value of M is the same as the number of sample pixels in the first candidate filter, M is a positive integer, and the first candidate filter is one of the at least one candidate filter;

[0183] The second calculation module 804 is further configured to:

[0184] Determine predicted values ​​of N undecoded pixels in the current coding unit based on the N coefficient groups of the first candidate filter.

[0185] Optionally, the second calculation module 804 is further configured to perform any one of the following:

[0186] When the number of target pixels in the candidate filter is one, calculating the predicted value of each uncoded pixel in each row of the current coding unit row by row in a right-to-left order;

[0187] When the number of target pixels in the candidate filter is greater than one, the prediction value of each uncoded pixel in each row of the current coding unit is calculated row by row from right to left or from left to right.

[0188] The solution provided in the embodiment of the present application is different from the method in the related art that forcibly uses the prediction value obtained by the upper reference row and left reference column at the same distance as the current coding unit. The embodiment of the present application does not limit the distance between the sample pixel point and the pixel point to be predicted in the current coding unit, which takes into account the asymmetric and uneven texture distribution in the video image, and effectively improves the accuracy of intra-frame prediction.

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

[0190] As shown in FIG9 , an embodiment of the present application further provides an electronic device 900, comprising a processor 901 and a memory 902. The memory 902 stores a program or instruction that can be executed on the processor 901. For example, when the electronic device 900 is a decoding end, the program or instruction, when executed by the processor 901, implements the various steps of the embodiment of the intra-frame prediction method described in FIG2 above, and can achieve the same technical effect. When the electronic device 900 is an encoding end, the program or instruction, when executed by the processor 901, implements the various steps of the embodiment of the intra-frame prediction method described in FIG6 above, and can achieve the same technical effect. To avoid repetition, they are not further described here.

[0191] The present application also provides a terminal capable of implementing the steps in the above method embodiment. The various implementation processes and implementation methods of the above method embodiment are applicable to the terminal embodiment and can achieve the same technical effects. Specifically, Figure 10 is a schematic diagram of the hardware structure of a terminal implementing the present application embodiment.

[0192] The terminal 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009 and at least some of the components of the processor 1010.

[0193] Those skilled in the art will appreciate that the terminal 1000 may also include a power supply (such as a battery) to power various components. The power supply may be logically connected to the processor 1010 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The terminal structure shown in FIG10 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.

[0194] It should be understood that in an embodiment of the present application, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042, and the graphics processor 10041 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 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 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 an operating stick, which will not be repeated here.

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

[0196] The memory 1009 can be used to store software programs or instructions and various data. The memory 1009 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 1009 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 a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0197] Processor 1010 may include one or more processing units. Optionally, processor 1010 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 1010.

[0198] Wherein, when the terminal 1000 is a decoding end, the processor 1010 is configured to:

[0199] When the prediction mode of the current coding unit is a target mode, determining a target filter, wherein the target filter is one of at least one candidate filter, the candidate filter includes a sample pixel point and a target pixel point, the sample pixel point is a pixel point that has been decoded or has obtained a prediction value, the target pixel point is a pixel point that has not been decoded in the current coding unit, and the sample pixel point is located to the right or above the target pixel point;

[0200] Obtaining a reconstructed pixel template corresponding to the target filter;

[0201] Determining coefficients of the target filter based on the reconstructed pixel template;

[0202] A prediction value of the current coding unit is calculated based on coefficients of the target filter.

[0203] When the terminal 1000 is an encoding terminal, the processor 1010 is configured to:

[0204] When the prediction mode of the current coding unit is the target mode, determining at least one candidate filter, wherein the candidate filter includes a sample pixel point and a target pixel point, the sample pixel point is a pixel point that has been encoded or has obtained a prediction value, the target pixel point is a pixel point that has not been encoded in the current coding unit, and the sample pixel point is located to the right or above the target pixel point;

[0205] Obtaining a reconstructed pixel template corresponding to each of the at least one candidate filters;

[0206] Determine the coefficient corresponding to each of the at least one candidate filters based on the reconstructed pixel template;

[0207] A prediction value of the current coding unit is calculated according to coefficients corresponding to each candidate filter, and a target filter is determined according to the prediction value, where the target filter is one of the at least one candidate filter.

[0208] In the embodiment of the present application, the distance between the sample pixel point and the pixel point to be predicted in the current coding unit is not limited, which takes into account the asymmetric and uneven texture distribution in the video image, effectively improving the accuracy of intra-frame prediction.

[0209] 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 6 above, and achieve the same or corresponding technical effects. To avoid repetition, it will not be repeated here.

[0210] 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 intra-frame prediction method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0211] 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.

[0212] 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 intra-frame prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0213] 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.

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

[0215] 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.

[0216] 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.

[0217] 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. An intra-frame prediction method, comprising: In a case where the prediction mode of the current coding unit is the target mode, the decoding end determines a target filter, wherein the target filter is one of at least one candidate filter, the candidate filter includes a sample pixel point and a target pixel point, the sample pixel point is a pixel point that has been decoded or has obtained a prediction value, the target pixel point is a pixel point that has not been decoded in the current coding unit, and the sample pixel point is located on the right side or the upper side of the target pixel point; The decoding end obtains a 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 a prediction value of the current coding unit based on coefficients of the target filter.

2. The method according to claim 1, wherein: The decoding end determines a target filter, including: The decoding end obtains the filter index information of the current coding unit from the bit stream; The decoding end determines a filter corresponding to the filter index information among the at least one candidate filter as a target filter.

3. The method according to claim 1 or 2, wherein: When the number of target pixel points in the target filter is N and N is greater than or equal to 1, the decoding end determines the coefficient of the target filter based on the reconstructed pixel template, including: The decoding end determines N coefficient groups of the target filter based on the reconstructed pixel template, wherein each coefficient group includes M coefficients, the value of M is the same as the number of sample pixel points in the target filter, and M is a positive integer; The decoding end determines the prediction value of the current coding unit based on the coefficient of the target filter, including: The decoding end determines the prediction values ​​of N undecoded pixels in the current coding unit based on the N coefficient groups of the target filter.

4. The method according to claim 1 or 2, wherein: The calculating the prediction value of the current coding unit includes any one of the following: When the number of target pixel points in the target filter is one, the decoding end calculates the prediction value of each undecoded pixel point in each row of the current coding unit row by row in a right-to-left order; When the number of target pixels in the target filter is greater than one, the decoding end calculates the prediction value of each undecoded pixel in each row of the current coding unit row by row in a right-to-left or left-to-right order.

5. The method according to any one of claims 1 to 4, further comprising: The decoding end obtains the intra-frame prediction mode index information of the current coding unit from the bit stream; The decoding end determines whether the prediction mode of the current coding unit is the target mode based on the intra-frame prediction mode index information.

6. An intra-frame prediction method, comprising: When the prediction mode of the current coding unit is the target mode, the encoding end determines at least one candidate filter, wherein the candidate filter includes a sample pixel point and a target pixel point, the sample pixel point is a pixel point that has been encoded or has obtained a prediction value, the target pixel point is a pixel point that has not been encoded in the current coding unit, and the sample pixel point is located on the right side or the upper side of the target pixel point; The encoding end obtains a reconstructed pixel template corresponding to each of the at least one candidate filters; The encoding end determines the coefficients corresponding to each of the at least one candidate filter based on the reconstructed pixel template; The encoding end calculates the prediction value of the current coding unit according to the coefficients corresponding to each of the candidate filters, and determines a target filter according to the prediction value, where the target filter is one of the at least one candidate filter.

7. The method according to claim 6, wherein: The encoding end calculates the prediction value of the current coding unit according to the coefficient corresponding to each of the candidate filters, and determines the target filter according to the prediction value, including: The encoding end calculates the prediction value of the current coding unit according to the coefficients corresponding to each of the candidate filters; The encoding end determines a rate-distortion cost corresponding to each of the candidate filters according to the prediction value; The encoding end determines the candidate filter with the smallest rate-distortion cost as the target filter.

8. The method according to claim 6, further comprising: The encoding end sends a code stream to the decoding end, the code stream carries filter index information, and the filter index information is used to indicate a target filter.

9. The method according to claim 6, further comprising: The encoding end sends a code stream to the decoding end, where the code stream carries intra-frame prediction mode index information, and the intra-frame prediction mode index information is used to indicate that the intra-frame prediction mode used by the encoding end is the target mode.

10. The method according to any one of claims 6 to 9, wherein: When the number of target pixels in the candidate filter is N and N is greater than or equal to 1, the encoder determines the coefficients corresponding to the at least one candidate filter based on the reconstructed pixel template, including: The encoding end determines N coefficient groups corresponding to a first candidate filter based on the reconstructed pixel template, wherein each coefficient group includes M coefficients, the value of M is the same as the number of sample pixels in the first candidate filter, M is a positive integer, and the first candidate filter is one of the at least one candidate filter; The encoding end calculates the prediction value of the current coding unit according to the coefficient corresponding to each of the candidate filters, including: The encoding end determines the prediction values ​​of N undecoded pixels in the current coding unit based on the N coefficient groups of the first candidate filter.

11. The method according to any one of claims 6 to 9, wherein: The calculating the prediction value of the current coding unit includes any one of the following: When the number of target pixels in the candidate filter is one, the encoding end calculates the prediction value of each uncoded pixel in each row of the current coding unit row by row in a right-to-left order; When the number of target pixels in the candidate filter is greater than one, the encoding end calculates the prediction value of each uncoded pixel in each row of the current coding unit row by row in a right-to-left or left-to-right order.

12. An intra-frame prediction device, comprising: A first determination module is used to determine a target filter when the prediction mode of the current coding unit is a target mode, wherein the target filter is one of at least one candidate filter, the candidate filter includes a sample pixel point and a target pixel point, the sample pixel point is a pixel point that has been decoded or has obtained a prediction value, the target pixel point is a pixel point that has not been decoded in the current coding unit, and the sample pixel point is located on the right side or the upper side of the target pixel point; A first acquisition module, used to acquire a reconstructed pixel template corresponding to the target filter; A second determination module, configured to determine coefficients of the target filter based on the reconstructed pixel template; The first calculation module is used to calculate the prediction value of the current coding unit based on the coefficient of the target filter.

13. An intra-frame prediction device, comprising: a third determination module, configured to determine at least one candidate filter when the prediction mode of the current coding unit is the target mode, wherein the candidate filter includes a sample pixel point and a target pixel point, the sample pixel point is a pixel point that has been encoded or has obtained a prediction value, the target pixel point is a pixel point that has not been encoded in the current coding unit, and the sample pixel point is located on the right side or the upper side of the target pixel point; A second acquisition module, used to acquire a reconstructed pixel template corresponding to each of the at least one candidate filters; A fourth determination module, configured to determine coefficients corresponding to each of the at least one candidate filter based on the reconstructed pixel template; The second calculation module is used to calculate the prediction value of the current coding unit according to the coefficients corresponding to each of the candidate filters, and determine the target filter according to the prediction value, where the target filter is one of the at least one candidate filter.

14. 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 intra-frame prediction method according to any one of claims 1 to 11 are implemented.

15. 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 intra-frame prediction method according to any one of claims 1 to 11.

16. A chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or an instruction to implement the intra-frame prediction method according to any one of claims 1 to 11.

17. A computer program / program product, wherein the computer program / program product is stored in a storage medium, and wherein the program / program product is executed by at least one processor to implement the intra-frame prediction method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Video intra-frame coding method based on hierarchical flexible block sequence

    CN106254866A

  • Video encoding method and device, video decoding method and device, computer equipment and storage medium

    CN111050176A

  • Intra-frame prediction method and device, electronic equipment and storage medium

    CN115086679A

  • Image decoding method, encoding method and device

    CN116071440A

Cited By

  • Intra prediction method and apparatus, and electronic device

    WO2026189192A1