Intra-frame prediction method and device, reference object determination method and device and electronic equipment
By using the reference object calculated by the target filter in video encoding technology to perform intra prediction, the problem of intra prediction in the uneven texture or inaccurate intra prediction is solved, and the accuracy and decoding efficiency of intra prediction are improved.
Patent Information
- Application Number
- CN202310846936.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-11
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2043-07-11
AI Technical Summary
When the existing video encoding technology is intra prediction, when the texture distribution is uneven or there is noise, the reference information based on adjacent rows or columns is inaccurate, resulting in low intra prediction accuracy.
By determining the target filter and its corresponding reconstructed pixel template at the decoding end, the sample point pixel values of the target reference object are calculated, and intra prediction is performed based on these values, avoiding the use of adjacent rows or columns as references.
Improves the accuracy and decoding efficiency of intra prediction, ensuring that accurate prediction values can still be obtained when texture is uneven or noise exists.
Smart Images

Figure CN119316610A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of video coding and decoding technology, and specifically relates to an intra-frame prediction method, a reference object determination method, a device and an electronic device. Background Art
[0002] The video encoder adopts a block-based hybrid coding framework. The coding process includes: block partitioning, intra-frame prediction, inter-frame prediction, transformation, quantization, loop filtering and entropy coding. The encoder first divides the image into non-overlapping coding tree units (CTUs), and then divides them into different coding units (CUs) according to the quadtree. The encoder encodes each coding unit from top to bottom and from left to right, and the decoder also decodes each coding unit of the current frame in the same order. At present, when the encoder and decoder perform intra-frame prediction, they usually select one reference sample row or column from multiple reference rows or columns to calculate the prediction value of the current coding unit. However, when the texture distribution is uneven or there is noise, the reference information obtained based on the reference rows or columns selected in the above manner is also inaccurate, resulting in low accuracy of intra-frame prediction. Summary of the invention
[0003] The embodiments of the present application provide an intra-frame prediction method, a reference object determination method, a device and an electronic device, which can solve the problem of low intra-frame prediction accuracy in the related art.
[0004] In a first aspect, an intra-frame prediction method is provided, which is performed by a decoding end and includes:
[0005] The decoding end determines a target filter and obtains a 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 coefficient of the target filter, and the target reference object is a target reference row or a target reference column;
[0008] The decoding end calculates a prediction value of the current coding unit based on a pixel value of a sample point of the target reference object and an intra-frame prediction mode of the current coding unit.
[0009] In a second aspect, a reference object determination method is provided, which is performed by an encoding end and includes:
[0010] The encoder determines the coefficients corresponding to each of N candidate filters based on the reconstructed pixel template, where N is a positive integer;
[0011] The encoding end calculates pixel values of sample points of synthetic reference objects corresponding to the N candidate filters respectively based on coefficients corresponding to the candidate filters, to obtain pixel values of sample points of the N synthetic reference objects, where the synthetic reference objects are synthetic reference rows or synthetic reference columns;
[0012] The encoding end calculates N first prediction values of the current coding unit based on the pixel values of the sample points of the N synthetic reference objects, and one first prediction value of the current coding unit is obtained corresponding to one 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, where the target reference object is one of the N synthetic reference objects.
[0014] According to a third aspect, an intra-frame prediction device is provided, including:
[0015] A first determination module, used to determine a target filter and obtain a reconstructed pixel template corresponding to the target filter;
[0016] A second determination module, configured to determine coefficients of the target filter based on the reconstructed pixel template;
[0017] A first calculation module, configured to calculate a pixel value of a sample point of a target reference object based on a coefficient 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 value of the sample point of the target reference object and the intra-frame prediction mode of the current coding unit.
[0019] In a fourth aspect, a reference object determination device is provided, comprising:
[0020] A third determination module is used to determine coefficients corresponding to N candidate filters based on the reconstructed pixel template, where N is a positive integer;
[0021] A third calculation module is used to calculate the pixel values of the sample points of the synthetic reference objects corresponding to the N candidate filters respectively based on the coefficients corresponding to the candidate filters, so as to obtain the pixel values of the sample points of the N synthetic reference objects, where the synthetic reference objects are synthetic reference rows or synthetic reference columns;
[0022] A fourth calculation module, configured to calculate N first prediction values of a current coding unit based on pixel values of sample points of the N synthetic reference objects, wherein one first prediction value of the current coding unit is obtained corresponding to one synthetic reference object;
[0023] The fourth determination module is used to determine N first rate-distortion costs based on the N first prediction values, and determine a target reference object based on the N first rate-distortion costs, where the target reference object is one of the N synthetic reference objects.
[0024] In a fifth aspect, an electronic device is provided, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.
[0025] 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.
[0026] 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 a program or instruction to implement the method described in the first aspect, or to implement the method described in the second aspect.
[0027] 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.
[0028] In an embodiment of the present application, the decoding end uses the pixel value of the sample point of the target reference row or target reference column in the process of calculating the prediction value of the current coding unit, and the pixel value of the sample point (or pixel point) in the target reference row or target reference column is calculated by the decoding end according to the coefficient of the target filter, that is, the target reference row or target reference column is synthesized based on the calculation of the target filter, and the prediction value is no longer calculated based on the adjacent rows or columns of the current coding unit as the reference row. In this way, the problem of inaccurate prediction value calculated based on the adjacent rows or columns of the current coding unit as the reference row or reference column due to uneven image texture or the presence of noise can be avoided. In addition, since the pixel value of the sample point in the target reference object is calculated by reconstructing the values of the reconstructed pixels of multiple rows or columns above and / or to the left and the corresponding filter coefficients, it can also avoid the problem of inaccurate prediction caused by selecting a row or a column from the adjacent rows or columns of the current coding unit as a reference object in the related art. In the embodiment of the present application, intra-frame prediction is performed 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 helps to improve decoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1a It is a schematic diagram of 65 angle prediction modes included in the intra-frame prediction of VVC in the related art;
[0030] Figure 1b is a schematic diagram of a reference row or reference column of a current coding unit in the related art;
[0031] Figure 1c Schematic diagram of three positions of the reconstructed pixel area and the current coding unit in the related art;
[0032] Figure 1d Schematic diagram of three filters of different shapes in the related art;
[0033] Figure 1e is a schematic diagram of calculating a current coding unit based on a filter in the related art;
[0034] Figure 2 is a flowchart of an intra-frame prediction method provided by an embodiment of the present application;
[0035] Figure 3 is one of the schematic diagrams of three candidate filters of different shapes applicable in the embodiments of the present application;
[0036] Figure 4 Schematic diagrams of three positions of the reconstructed pixel template and the current coding unit applicable in the embodiments of the present application;
[0037] Figure 5 is a flow chart of a reference object determination method provided in an embodiment of the present application;
[0038] Figure 6 is a structural diagram of an intra-frame prediction device provided in an embodiment of the present application;
[0039] Figure 7 is a structural diagram of a reference object determination device provided in an embodiment of the present application;
[0040] Figure 8 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0041] Fig. 9 It is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of this application.
[0043] The terms "first", "second", etc. of the present 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 one type, and the number of objects is not limited, for example, the first object can be one or more. In addition, "or" in the present application represents at least one of the connected objects. For example, "A or B" covers three schemes, namely, Scheme 1: including A but not including B; Scheme 2: including B but not including A; Scheme 3: including both A and B. The character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0044] For better understanding, the relevant concepts and technologies involved in the embodiments of the present application are explained below.
[0045] The video encoder adopts a block-based hybrid coding framework, and the coding process includes: block partitioning, intra-frame prediction, inter-frame prediction, transformation, quantization, loop filtering and entropy coding. The encoder first divides the image into non-overlapping coding tree units (Coding Tree Unit, CTU), and then divides it into different coding units (Coding Unit, CU) according to the quadtree, and then traverses multiple types of trees for division. The final division result is finally determined by the rate-distortion cost. The encoder encodes each coding unit from top to bottom and from left to right, and the decoder also decodes each coding unit of the current frame in the same order. The encoder adopts intra-frame prediction technology based on image texture correlation, and uses the reconstructed samples of the upper row and left column adjacent to the current coding unit as a reference. By traversing the DC mode, Planar mode and angle prediction mode, the rate-distortion cost is used to select the optimal intra-frame prediction mode to remove the spatial redundancy of the block. Figure 1a As shown in Figure 1, the latest video compression standards such as Versatile Video Coding (VVC) include 65 angle prediction modes (predModeIntra) for intra 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 most adjacent top row and left column of reconstructed samples, such as Figure 1b As shown, the index value indicates the distance between the reference row and the current coding unit.
[0046] In the related art, an "extrapolation filter-based intra prediction mode (EIP)" is implemented at the encoding end in the following steps:
[0047] Step 1. Get the following Figure 1c The pixel area above or to the left of the current coding unit shown is reconstructed, and the calculation is performed respectively. Figure 1d The 15-tap filter coefficients of the three shapes shown are calculated in the same way as the filter system in the convolutional cross-component intra prediction model (CCCM) in the existing enhanced compression model (ECM), specifically:
[0048] by Figure 1e For example, starting from the top left corner of the reconstructed pixel area, from the top first row downward, each row traverses each 4×4 area in order from left to right, and calculates the weighted average of the 15 filter coefficients multiplied by the reconstructed values of the gray position sample points at the corresponding positions in the 4×4 area, and is obtained by minimizing the mean square error (MSE) between the white samples and the weighted average calculated using the gray samples in all 4×4 areas 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 1 white output sample point. The autocorrelation matrix is LDL decomposed, and the final filter coefficients are calculated using inverse permutation.
[0049] Step 2. Use Figure 1d The three shapes of interpolation filters shown are calculated from the first sample point in the upper left corner of the current coding unit, from left to right and from top to bottom to obtain the predicted value of each sample point; among them, 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 output predicted value.
[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. Taking a 15-tap filter (i.e., a filter with 15 coefficients, for example, to obtain the predicted value of the sample point in the lower right corner, the values of the 15 sample points in the upper left part are required. These 15 sample points may be decoded and reconstructed pixels outside the current coding unit, or sample points with predicted values inside the current coding unit), the following will appear: Figure 1d There are several cases in the above example), 15 filter coefficients correspond to 15 sample point values one by one.
[0051] Step 3. Calculate the prediction value of the current coding unit obtained by using three shapes of extrapolation filters in EIP mode, and then calculate the rate-distortion cost, and compare it with the rate-distortion cost of other prediction modes. If the rate-distortion cost of EIP mode is the smallest, set the EIP mode identification information to 1 and write it into the bitstream together with the selected filter index information.
[0052] After obtaining that the current coding unit to be decoded is in EIP mode, the decoder parses the index value of the selected filter. The filter coefficient is obtained by using the decoded reconstructed pixel value above or to the left of the current coding unit to be decoded in the same way as the encoder, and then the prediction value of each sample point in the current coding unit is calculated from top to bottom and from left to right, and the residual value calculated from the residual information of the current coding unit obtained from the bitstream is added to obtain the reconstructed value.
[0053] In the related art, intra-frame prediction methods usually select multiple reference rows or reference columns (such as Figure 1b A total of 6 reference rows with index values {0, 1, 3, 5, 7, 12} are shown in the figure) and one is selected as a reference sample row or reference sample column to calculate the prediction value of the current coding unit. However, the video frame may have uneven texture distribution or noise, and the reference sample row or reference sample column obtained based on the above method cannot provide accurate reference information, resulting in low accuracy of encoding and decoding. To address this problem, an embodiment of the present application provides 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 by the embodiments of the present application are described in detail below through some embodiments and their application scenarios in combination with the accompanying drawings.
[0055] Please refer to Figure 2 , Figure 2 1 is a flowchart of an intra-frame prediction method provided by an embodiment of the present application, and the method is applied to a decoding end. Figure 2 As shown, the intra-frame prediction method includes the following steps:
[0056] Step 201: The decoding end determines a target filter and obtains a reconstructed pixel template corresponding to the target filter.
[0057] Optionally, the method further comprises:
[0058] The decoding end obtains the intra-frame prediction mode index information of the current coding unit from the bit stream, where the intra-frame prediction mode index information is used to indicate the intra-frame prediction mode of the current coding unit.
[0059] Optionally, the decoding end may obtain the intra-frame prediction mode index information of the current coding unit from the bitstream, and the intra-frame prediction mode index information is used to indicate the intra-frame prediction mode used by the encoding end, and 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. Therefore, based on the intra-frame prediction mode index information, 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 the prediction value consistent with the encoding end. For example, the intra-frame prediction mode involved in the embodiment of the present application may be as follows: Figure 1a One of the 65 angular prediction modes shown in .
[0060] Optionally, the decoding end may 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 is used to indicate a filter, for example, the encoding end and the decoding end can use at least one candidate filter, each candidate filter corresponds to a filter index information (also called a filter identifier), and the encoding end and the decoding end 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 carries the filter index information corresponding to the target filter in the bitstream and sends it to the decoding end, and the decoding end can determine the corresponding target filter based on the filter index information. In this way, it can ensure that the decoding end uses the same filter as the encoding end for intra-frame prediction, so as to ensure that the code end can obtain the prediction value consistent with the encoding end.
[0061] Optionally, the encoder and decoder may agree to use the same filter. For example, there may be only one candidate filter, that is, a filter of 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 the embodiment of the present application, after determining the target filter, the decoding end obtains the reconstructed pixel template corresponding to the target filter, and different candidate filters may correspond to different reconstructed pixel templates.
[0063] For example, Figure 3 Take the three candidate filters shown in as examples, these three candidate filters correspond to three different reconstructed pixel templates, where Figure 3 The candidate filter (a) corresponds to Figure 4 The reconstructed pixel template shown in (a); Figure 3 The candidate filter (b) corresponds to Figure 4 The reconstructed pixel template shown in (b); Figure 3 The candidate filter (c) corresponds to Figure 4 The reconstructed pixel template shown in (c).
[0064] In the embodiment of the present application, after the decoding end determines the target filter, that is, a candidate filter, it can also 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 established in advance. Figure 3 and Figure 4 The forms of the candidate filters and the reconstructed pixel templates and the correspondence between the two shown in the figure are merely illustrative and do not constitute a limitation on 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.
[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 the decoding end determines the reconstructed pixel template corresponding to the target filter, it can calculate the coefficient of the target filter based on the reconstructed pixel template. The calculation method can refer to the relevant technology, for example, according to the method of calculating the filter coefficient in CCCM in ECM, which is not described in detail in the embodiment of the present application.
[0067] Step 203: The decoding end calculates the pixel value of the sample point of the target reference object based on the coefficient of the target filter, and the target reference object is a target reference row or a target reference column.
[0068] In the embodiment of the present 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 the target reference column based on the coefficients of the target filter.
[0069] For example, assuming the target filter is Figure 3 The filter shown in (a) includes 15 sample pixels ( Figure 3 The gray box in a) and a target pixel ( Figure 3 The target pixel point is also the sample point of the target reference object (target reference row or target reference column). The pixel value of the target pixel point obtained by the decoding end according to the coefficient of the target filter is also the pixel value of the sample point of the target reference object.
[0070] The number of coefficients of the target filter is the same as the number of sample pixels in the target filter. Figure 3Taking the filter shown in (a) 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 the 15 filter coefficients and the reconstruction values of the corresponding sample pixels (the sample pixels are the decoded reconstructed pixels around the current coding unit, and their reconstruction values are known), that is, 15 products will be obtained, and the predicted value of the target pixel in the current coding unit is determined based on the 15 products. For example, the average value of the 15 products can be used as the predicted value of the target pixel. Exemplarily, the target filter is a 15-head filter (such as Figure 3 Take the three filters shown in as an example, that is, the target filter includes 15 sample pixels and a target pixel point for which a prediction value needs to be calculated. The prediction value of the target pixel point can be calculated by the following formula:
[0071]
[0072] Among them, w i represents the filter coefficient corresponding to the i-th reconstructed pixel, r i represents the reconstruction value of the i-th reconstructed pixel, p j 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 the target reference column). In this way, the pixel value of the target pixel is obtained by multiplying the reconstructed values of the reconstructed pixels in multiple rows or columns to its left, or above, or above and left by their corresponding filter coefficients and performing weighted averaging.
[0073] It should be noted that based on the above calculation method, the decoding end obtains the pixel value of each target pixel point one by one in the order from left to right and from top to bottom based on the target filter. For example, the decoding end can calculate the pixel value of each pixel point in a row from left to right, that is, each pixel point in the row will be used as the target pixel point in the target filter in turn (such as Figure 3a) to calculate the corresponding pixel value, and finally obtain the pixel value of each pixel in the row, and the row can be used as the target reference row of the current coding unit. Alternatively, the decoding end can calculate the pixel value of each pixel in a column in sequence from top to bottom, that is, each pixel in the column will be used as the target pixel in the target filter in sequence to calculate the corresponding pixel value, and finally obtain the pixel value of each pixel in the column, and the column can be used as the target reference column of the current coding unit. Based on this method, the pixel value of each sample point (that is, pixel point) in the target reference row or the pixel value of each sample point (that is, pixel point) in the target reference column can be obtained. Based on the above method, the decoding end can also calculate the pixel values of multiple sample points multiple times based on the coefficient of the target filter, and synthesize these sample points whose pixel values have been calculated into a target reference row or a target reference column, that is, obtain the target reference object.
[0074] Step 204: The decoding end calculates a 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 prediction value of the current coding unit based on the calculated pixel value of the sample point of the target reference row or the calculated pixel value of the sample point 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 prediction value of the current coding unit based on the reference row or reference column and the intra-frame prediction mode can be referred to the relevant technology, which is not described in detail in this embodiment.
[0076] In an embodiment of the present application, the decoding end uses the pixel value of the sample point of the target reference row or target reference column in the process of calculating the prediction value of the current coding unit, and the pixel value of the sample point of the target reference row or target reference column is calculated by the decoding end according to the coefficient of the target filter, that is, the target reference row or target reference column is synthesized based on the calculation of the target filter, and the prediction value is no longer calculated based on the adjacent rows or columns of the current coding unit as the reference row. In this way, the problem of inaccurate prediction value calculated based on the adjacent rows or columns of the current coding unit as the reference row or reference column due to uneven image texture or the presence of noise can be avoided. In the embodiment of the present application, 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 helps to improve decoding efficiency.
[0077] In addition, since the pixel value of each sample point (pixel point) in the target reference object is obtained by multiplying the reconstructed values of multiple rows or columns of reconstructed pixels to its left, or above, or above and left by their corresponding filter coefficients and performing weighted averaging, the target reference object synthesized based on such sample points is used as the reference object of the current coding unit. This can also avoid the problem of inaccurate prediction caused by selecting a row or a column from adjacent rows or columns of the current coding unit as a reference object in the related art. The solution provided in the embodiment of the present 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 a target filter when it is determined that the current coding unit uses the target reference object.
[0080] In an embodiment of the present application, the target reference object (that is, the target reference row or target reference column) needs to be synthesized based on the pixel values calculated according to the coefficients of the target filter. Furthermore, if the decoding end determines that the current coding unit needs to use the synthesized target reference row or 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 may refer to the above description.
[0082] Optionally, when the decoding end determines that the current coding unit uses the target reference object, before determining the target filter, the method further includes:
[0083] The decoding end obtains first indication information corresponding to the current coding unit from the bitstream, where the first indication information is used to indicate whether a reference object corresponding to the current coding unit is the target reference object.
[0084] Optionally, each coding unit in the code stream corresponds to one first indication information, or multiple coding units in the code stream correspond to one first indication information.
[0085] It can be understood that in order to ensure that the decoder can obtain the same prediction value as the encoder, it is necessary to use the same intra-frame prediction method as the encoder and select the same reference row or reference column to perform intra-frame prediction.
[0086] In the implementation of the present application, the encoder carries the first indication information in the code stream sent to the decoder, and the first indication information is used to indicate whether the reference object (reference row or reference column) used by the encoder for the current coding unit is the target reference object (target reference row or target reference column). For example, if the first indication information indicates that the encoder uses the target reference object for intra-frame prediction, the decoder also needs to use the target reference object to perform intra-frame prediction on the current coding unit; if the first indication information indicates that the encoder does not use the target reference object for intra-frame prediction, the decoder can select the adjacent rows or adjacent columns of the current coding unit as reference rows for intra-frame prediction according to the method in the related art. Furthermore, through the first indication information, the decoder can use the same reference row as the encoder for intra-frame prediction to ensure that the decoder obtains the same prediction value as the encoder.
[0087] Optionally, the decoding end determines the target filter, including:
[0088] The decoding end obtains the filter index information of the current coding 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 there may be multiple candidate filters that can be used by the encoding end and the decoding end, that is, candidate filters of different shapes may be used for intra-frame prediction, such as Figure 3 Three candidate filters are shown.
[0091] Optionally, when there are multiple candidate filters, each candidate filter includes corresponding filter index information, and the encoding end and the decoding end are aware of the correspondence between each candidate filter and each filter index information. The encoding end may select one from multiple candidate filters as a target filter to perform intra-frame prediction, and calculate the pixel value of each sample point of the target reference object based on the coefficient of the target filter to obtain a synthesized target reference object. In this case, the encoding end carries the filter index information corresponding to the target filter in the bitstream and sends it to the decoding end, and then the decoding end can determine the filter corresponding to the filter index information in the candidate filter as the target filter based on the filter index information in the bitstream. In this way, it can ensure that the decoding end uses the same filter as the encoding end for intra-frame prediction, so as to ensure that the code end can obtain a prediction value consistent with the encoding end.
[0092] Optionally, the candidate filter includes sample pixel points and target pixel points, the sample pixel points are sample points whose pixel values have been decoded or obtained, the target pixel points are sample points of the target reference object, and the sample pixel points are located to the left or above the target pixel points.
[0093] For example, Figure 3 Take the candidate filter shown in (a) as an example, the candidate filter also includes 15 sample pixels (i.e. Figure 3 The target pixel is the gray box in (a). Figure 3 The white box in the lower right corner of (a). The target pixel point is also the sample point of the target reference object (target reference row or target reference column). The pixel value of the target pixel point obtained by the decoding end based on the coefficient 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 refer to the previous description.
[0094] The intra-frame prediction method provided in the embodiment of the present 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 help improve decoding efficiency.
[0095] Please refer to Figure 5 , Figure 5 is a flow chart of a reference object determination method provided in an embodiment of the present application, and the method is applied to the encoding end. Figure 5 As shown, the reference object determination method includes the following steps:
[0096] Step 501: The encoder determines coefficients corresponding to N candidate filters based on a reconstructed pixel template, where N is a positive integer.
[0097] It should be noted that before this step, the encoding end first needs to determine the intra-frame prediction mode of the current coding unit. Exemplarily, when determining the intra-frame prediction mode of the current coding unit as follows Figure 1a In the case of one of the 65 angular prediction modes shown in , the encoder determines the coefficients corresponding to each of the N candidate filters based on the reconstructed pixel template.
[0098] Optionally, the encoding end may construct a reconstructed pixel template of each candidate filter based on the adjacent reconstructed pixels of the current coding unit. It should be noted that different candidate filters may correspond to different reconstructed pixel templates. 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 corresponding relationship between the candidate filter and the reconstructed pixel template can be pre-established. Figure 3 and Figure 4 The forms of the candidate filters and the reconstructed pixel templates and the correspondence between the two shown in the figure are merely illustrative and do not constitute a limitation on 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.
[0099] In the embodiment of the present application, after determining the reconstructed pixel template corresponding to each candidate filter, the encoding end can calculate the coefficient of the corresponding candidate filter based on the reconstructed pixel template. The calculation method can refer to the relevant technology, for example, according to the method of calculating the filter coefficient in CCCM in ECM, which is not described in detail in the embodiment of the present application.
[0100] Step 502: The encoding end calculates the pixel values of the sample points of the synthetic reference objects corresponding to the N candidate filters based on the coefficients corresponding to the candidate filters, and obtains the pixel values of the sample points of the N synthetic reference objects, where the synthetic reference objects are synthetic reference rows or synthetic reference columns.
[0101] The candidate filter includes sample pixel points and target pixel points, the sample pixel points are sample points that have been decoded or have obtained pixel values, the target pixel points are sample points of the target reference object, and the sample pixel points are located to the left or above the target pixel points.
[0102] Exemplarily, assume that the candidate filter is Figure 3 The filter shown in (a) includes 15 sample pixels ( Figure 3 The gray box in a) and a target pixel ( Figure 3 a), the target pixel is also the sample point in the synthetic reference object (synthetic reference row or synthetic reference column), the pixel value of the target pixel obtained by the decoding end according to the coefficient of the candidate filter is also the pixel value of the sample point in the synthetic reference object, and then the encoding end can calculate a synthetic reference object (synthetic reference row or synthetic reference column) based on the candidate filter. Based on this method, N synthetic reference objects can be calculated based on N candidate filters.
[0103] Specifically, the encoding end obtains the pixel value of each target pixel point one by one in a left-to-right and top-to-bottom order based on the target filter. For example, the encoding end may calculate the pixel value of each pixel point in a row from left to right, that is, each pixel point in the row will be used as the target pixel point in the target filter in turn (such as Figure 3 a) to calculate the corresponding pixel value, and finally obtain the pixel value of each pixel in the row, and the row can be used as the synthetic reference row of the current coding unit. Alternatively, the encoding end can calculate the pixel value of each pixel in a column in sequence from top to bottom, that is, each pixel in the column will be used as the target pixel in the target filter in sequence to calculate the corresponding pixel value, and finally obtain the pixel value of each pixel in the column, and the column can be used as the synthetic reference column of the current coding unit. Based on this method, the pixel value of each sample point (that is, pixel point) in the synthetic reference row or the pixel value of each sample point (that is, pixel point) in the synthetic reference column can be obtained.
[0104] It should be noted that the specific implementation of calculating the pixel value of the target pixel point based on the filter coefficient can refer to the above Figure 2 The description in the method embodiment will not be repeated in this embodiment.
[0105] Step 503: The encoding end calculates N first prediction values of the current coding unit based on the pixel values of the sample points of the N synthetic reference objects, and one first prediction value of the current coding unit is obtained corresponding to one synthetic reference object.
[0106] In the embodiment of the present application, the encoding end 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. Exemplarily, taking a synthetic reference object as an example, the encoding end 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 the synthetic reference object. Based on this approach, a synthetic reference object can also calculate a first prediction value, and then obtain 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, where the target reference object is one of the N synthesized reference objects.
[0108] Exemplarily, taking a first predicted value as an example, a corresponding rate-distortion cost (i.e., a first rate-distortion cost) is calculated based on the first predicted value. In this way, each first predicted value can be obtained to determine its corresponding first rate-distortion cost, that is, N first rate-distortion costs are obtained. The method of calculating the rate-distortion cost according to the predicted value can refer to the relevant technology, and this embodiment will not be described in detail.
[0109] Furthermore, the encoding end may determine the target reference object based on the N first rate-distortion costs, for example, by selecting the first prediction value corresponding to the smallest first rate-distortion cost, and determining the synthetic reference object obtained by calculating the first prediction value 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 code stream that needs to be sent to the decoding end based on the intra-frame prediction value.
[0111] In the embodiment of the present application, the encoding end calculates the pixel values of the sample points of the synthetic reference objects corresponding to the N candidate filters based on the coefficients corresponding to the N candidate filters, obtains the pixel values of the sample points of the N synthetic reference objects, calculates the N first prediction values of the current coding unit based on the pixel values of the sample points of the N synthetic reference objects, and determines the first rate distortion costs corresponding to the N first prediction values based on the first prediction values, so as to determine the target reference object from the N synthetic reference objects. Among them, the synthetic reference objects are synthesized based on the coefficient calculation of the candidate filters, that is, the target reference object is also synthesized based on the calculation of the coefficients of the corresponding filters, and no longer based on the adjacent rows or columns of the current coding unit as reference rows or columns to calculate the prediction value, so that the problem of inaccurate prediction values calculated based on the adjacent rows or columns of the current coding unit as reference rows or columns due to uneven image texture or noise can be avoided. In the embodiment of the present application, the synthetic reference rows or synthetic reference columns synthesized based on the coefficient calculation of the candidate filters are used to perform intra-frame prediction on the current coding unit, which can effectively improve the accuracy of intra-frame prediction, thereby improving the coding accuracy, and also help to improve the coding efficiency.
[0112] In addition, since the pixel value of each sample point in the synthetic reference object is obtained by multiplying the reconstructed values of multiple rows or columns of reconstructed pixels to its left, or above, or above and left by their corresponding filter coefficients and performing weighted averaging, the synthetic reference object synthesized based on such sample points is used as the reference object of the current coding unit. This can also avoid the problem of inaccurate prediction caused by selecting a row or a column from adjacent rows or columns of the current coding unit as a reference object in the related art. The solution provided in the embodiment of the present 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 minimum first rate distortion cost among the N first rate distortion costs;
[0115] The encoding end determines a target reference object based on the minimum first rate-distortion cost.
[0116] In an embodiment of the present application, after the encoding end calculates the first rate-distortion costs corresponding to each of N first prediction values, it obtains the minimum first rate-distortion cost, determines the first prediction value corresponding to the minimum first rate-distortion cost, and determines the synthetic reference object obtained by calculating the first prediction value as the target reference object.
[0117] It should be noted that the smaller the first rate-distortion cost is, the higher the accuracy of the first prediction value corresponding to the first rate-distortion cost is, and the code stream of the current coding unit obtained by the encoder based on the first prediction value has higher accuracy. In addition, the encoder uses the synthetic reference object calculated to obtain the first prediction value as the target reference object, and the candidate filter synthesized to obtain the target reference object as the target filter, and carries the filter index information corresponding to the target filter in the code stream, so that the decoder can clearly know which filter corresponds to the first prediction value used by the encoder, and can ensure that the decoder can obtain a prediction value consistent with the encoder based on the target filter.
[0118] Optionally, the method further comprises:
[0119] The encoding end obtains a candidate reference object of the current coding unit, where the candidate reference object is a reference row or a reference column adjacent to the current coding unit;
[0120] The encoding end calculates a second prediction value of the current coding unit based on the candidate reference object;
[0121] The encoding end determines a second rate-distortion cost based on the second prediction value;
[0122] The encoder determines a target reference object based on the minimum first rate-distortion cost, including:
[0123] When the second rate-distortion cost is greater than the minimum first rate-distortion cost, the encoding end determines a target reference object based on the minimum first rate-distortion cost.
[0124] It should be noted that the candidate reference rows or candidate reference columns are reference rows or reference columns adjacent to the current coding unit, for example, they may be the first column on the left and the first row on the top of the current coding unit.
[0125] In an embodiment of the present application, the encoding end calculates a second prediction value of 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 the adjacent reference rows or reference columns with the first rate-distortion cost obtained based on the synthetic reference rows or synthetic reference columns. If the minimum rate-distortion cost is one of the first rate-distortion costs obtained based on the synthetic reference rows or synthetic reference columns, the encoding end determines the target reference object based on the minimum first rate-distortion cost, that is, obtains the first prediction value corresponding to the minimum first rate-distortion cost, and determines the synthetic reference row or synthetic reference column that calculates the first prediction value 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 the adjacent reference row or reference column, the encoder obtains the final bitstream based on the second prediction value calculated based on the adjacent reference row or reference column. In this way, the encoder can perform intra-frame prediction based on different reference objects, which improves the flexibility of intra-frame prediction.
[0127] Optionally, the method further comprises:
[0128] The encoder sends a code stream of the current coding unit to a decoder, where the code stream carries first indication information, where the first indication information is used to indicate whether a reference object used by the encoder for the current coding 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 synthetic reference row or synthetic reference column, the encoder determines the target reference object based on the minimum first rate-distortion cost, that is, the encoder calculates the 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 the second rate-distortion cost obtained based on the adjacent reference row or reference column, the encoder obtains the final bitstream based on the second prediction value calculated by the adjacent reference row or reference column. In this case, the first indication information may indicate that the reference object used by the encoder is not the target reference object, but the reference row or reference column adjacent to the current coding unit. In this way, it is possible to ensure that the decoder can use the same reference object as the encoder for intra-frame prediction, so as to ensure that the decoder obtains a bitstream consistent with the encoder.
[0130] 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, an intra-frame prediction device performing the intra-frame prediction method is taken as an example to illustrate the intra-frame prediction device provided in the embodiment of the present application.
[0131] Please refer to Figure 6 , Figure 6 is a structural diagram of an intra-frame prediction device provided in an embodiment of the present application, and the device is applied to a decoding end. Figure 6 As shown, the intra-frame prediction device 600 includes:
[0132] A first determination module 601 is used to determine a target filter and obtain a reconstructed pixel template corresponding to the target filter;
[0133] A second determination module 602, configured to determine coefficients of the target filter based on the reconstructed pixel template;
[0134] A first calculation module 603, configured to calculate the 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;
[0135] The second calculation module 604 is used to calculate 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.
[0136] Optionally, the first determining module 601 is further configured to:
[0137] In case it is determined that the current coding unit uses the target reference object, a target filter is determined.
[0138] Optionally, the device further comprises:
[0139] The first acquisition module is used to acquire first indication information corresponding to the current coding unit from a bitstream, where the first indication information is used to indicate whether a 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] Acquire filter index information of the current coding unit from a bitstream;
[0142] A filter corresponding to the filter index information among N candidate filters is determined as the target filter, where N is a positive integer.
[0143] Optionally, the candidate filter includes sample pixel points and target pixel points, the sample pixel points are sample points whose pixel values have been decoded or obtained, the target pixel points are sample points of the target reference object, and the sample pixel points are located to the left or above the target pixel points.
[0144] Optionally, the device further comprises:
[0145] The second acquisition module is used to acquire the intra-frame prediction mode index information of the current coding unit from the code stream, where the intra-frame prediction mode index information is used to indicate the intra-frame prediction mode of the current coding unit.
[0146] The device provided in the embodiment of the present 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 help improve decoding efficiency.
[0147] The intra-frame prediction device 600 in the embodiment 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 a chip. The electronic device can be a terminal, or can be other devices other than a terminal. Exemplarily, the terminal can include but is not limited to the types of the terminal 11 listed above, and other devices can be servers, network attached storage (Network Attached Storage, NAS), etc., which are not specifically limited in the embodiment of the present application.
[0148] The intra-frame prediction device 600 provided in the embodiment of the present application can realize Figure 2 The various processes implemented by 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 the embodiment of the present application may be executed by a reference object determination device. In the embodiment of the present application, the reference object determination device provided in the embodiment of the present application is described by taking the reference object determination method executed by the reference object determination device as an example.
[0150] Please refer to Figure 7 , Figure 7 is a structural diagram of a reference object determination device provided in an embodiment of the present application, and the device is applied to an encoding end. Figure 7 As shown, the reference object determining device 700 includes:
[0151] A third determination module 701 is used to determine coefficients corresponding to N candidate filters based on the reconstructed pixel template, where N is a positive integer;
[0152] A third calculation module 702 is used to calculate the pixel values of the sample points of the synthetic reference objects corresponding to the N candidate filters respectively based on the coefficients corresponding to the candidate filters, so as to obtain the pixel values of the sample points of the N synthetic reference objects, where the synthetic reference objects are synthetic reference rows or synthetic reference columns;
[0153] A 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, where one first prediction value of the current coding unit is obtained corresponding to one synthetic reference object;
[0154] The fourth determination module 704 is configured to determine N first rate-distortion costs based on the N first prediction values, and determine a target reference object based on the N first rate-distortion costs, where the target reference object is one of the N synthetic reference objects.
[0155] Optionally, the fourth determining module 704 is further configured to:
[0156] Obtaining a minimum first rate distortion cost among the N first rate distortion costs;
[0157] A target reference object is determined based on the minimum first rate-distortion cost.
[0158] Optionally, the device further comprises:
[0159] A third acquisition module, configured to acquire a candidate reference object of the current coding unit, wherein the candidate reference object is a reference row or a reference column adjacent to the current coding unit;
[0160] a fifth calculation module, configured to calculate a second prediction value of the current coding unit based on the candidate reference object;
[0161] a fifth determining module, configured to determine a second rate-distortion cost based on the second predicted value;
[0162] The fourth determining module 704 is further configured to:
[0163] In a case where the second rate-distortion cost is greater than the minimum first rate-distortion cost, a target reference object is determined based on the minimum first rate-distortion cost.
[0164] Optionally, the device further comprises:
[0165] The sending module is used to send the code stream of the current coding unit to the decoding end, the code stream carries first indication information, and the first indication information is used to indicate whether the reference object used by the device for the current coding unit is the target reference object.
[0166] Optionally, the candidate filter includes sample pixel points and target pixel points, the sample pixel points are sample points whose pixel values have been decoded or obtained, the target pixel points are sample points of the target reference object, and the sample pixel points are located to the left or above the target pixel points.
[0167] The device provided in the embodiment of the present application can avoid the problem of inaccurate prediction values calculated based on the rows or columns adjacent to the current coding unit as reference rows or columns due to uneven image texture or the presence of noise. In the embodiment of the present application, the synthesized reference rows or synthetic reference columns calculated based on the coefficients of the candidate filters are used to perform intra-frame prediction on the current coding unit, which can effectively improve the accuracy of intra-frame prediction, thereby improving encoding accuracy, and also helps to improve encoding efficiency.
[0168] The reference object determination device 700 provided in the embodiment of the present application can achieve Figure 5 The various processes implemented by 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, the embodiment of the present application further provides an electronic device 800, including a processor 801 and a memory 802, wherein the memory 802 stores a program or instruction that can be run on the processor 801. For example, when the electronic device 800 is a decoding end, the program or instruction is executed by the processor 801 to implement the above Figure 2 When the electronic device 800 is a network side device, the program or instruction is executed by the processor 801 to implement the above Figure 5 The various steps of the method embodiment can achieve the same technical effect, and will not be described again here to avoid repetition.
[0170] The present application also provides a terminal capable of implementing Figure 2 or Figure 5 The steps in the method embodiment shown. Each implementation process and implementation method of the above method embodiment can be applied to the terminal embodiment and can achieve the same technical effect. Specifically, Fig. 9 A schematic diagram of the hardware structure of a terminal for implementing an embodiment of the present application.
[0171] The terminal 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909 and at least some of the components of a processor 910.
[0172] Those skilled in the art will appreciate that the terminal 900 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The terminal structure shown in the figure does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0173] It should be understood that in the embodiment of the present application, the input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042, and the graphics processor 9041 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 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0174] In the embodiment of the present application, after receiving data, the RF unit 901 can transmit the data to the processor 910 for processing; in addition, the RF unit 901 can send data. Generally, the RF 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 and various data. The memory 909 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, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 909 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 909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0176] The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 910.
[0177] Wherein, when the terminal 900 is a decoding end, the processor 910 is configured to:
[0178] Determine a target filter, and obtain a reconstructed pixel template corresponding to the target filter;
[0179] Determining coefficients of the target filter based on the reconstructed pixel template;
[0180] Calculating pixel values of sample points of a target reference object based on coefficients of the target filter, the target reference object being a target reference row or a target reference column;
[0181] A prediction value of the current coding unit is calculated based on pixel values of sample points of the target reference object and an intra-frame prediction mode of the current coding unit.
[0182] When the terminal 900 is a coding end, the processor 910 is configured to:
[0183] Determine coefficients corresponding to each of N candidate filters based on the reconstructed pixel template, where N is a positive integer;
[0184] Based on the coefficients corresponding to the candidate filters, respectively calculate the pixel values of the sample points of the synthetic reference objects corresponding to the N candidate filters, to obtain the pixel values of the sample points of the N synthetic reference objects, where the synthetic reference objects are synthetic reference rows or synthetic 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 corresponding to one synthetic reference object;
[0186] N first rate-distortion costs are determined based on the N first prediction values, and a target reference object is determined based on the N first rate-distortion costs, where the target reference object is one of the N synthesized reference objects.
[0187] The terminal provided by the embodiment of the present application can effectively improve the accuracy of intra-frame prediction.
[0188] It can be 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 achieve the same or corresponding technical effects and will not be repeated here to avoid repetition.
[0189] 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, each process of the above-mentioned intra-frame prediction method or reference object determination method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0190] 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-transient readable storage medium.
[0191] 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 or reference object determination method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0192] 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.
[0193] An embodiment of the present application further provides a computer program / program product, which is stored in a storage medium and is executed by at least one processor to implement the various processes of the above-mentioned intra-frame prediction method or reference object determination method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0194] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including 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 one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment 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 reverse 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.
[0195] Through the description of the above implementation methods, 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 hardware platform, and of course, can also be implemented by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, disk, CD, etc.), including several instructions to enable a terminal or a network-side device to execute the methods described in each embodiment of the present application.
[0196] 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 the present application, ordinary technicians in this field can also make many forms of implementation methods without departing from the purpose of the present application and the scope of protection of the claims, and these implementation methods are all within the protection of the present application.
Claims
1. An intra-frame prediction method, characterized in that: include: The decoding end determines a target filter and 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 the pixel value of the sample point of the target reference object based on the coefficient of the target filter, and the target reference object is a target reference row or a target reference column; The decoding end calculates a prediction value of the current coding unit based on a pixel value of a sample point of the target reference object and an intra-frame prediction mode of the current coding unit.
2. The method according to claim 1, characterized in that The decoding end determines a target filter, including: The decoding end determines a target filter when it is determined that the current coding unit uses the target reference object.
3. The method according to claim 2, characterized in that When the decoding end determines that the current coding unit uses the target reference object, before determining the target filter, the method further includes: The decoding end obtains first indication information corresponding to the current coding unit from the bitstream, where the first indication information is used to indicate whether a reference object corresponding to the current coding unit is the target reference object.
4. The method according to any one of claims 1 to 3, characterized in that 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 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 pixel points and target pixel points, the sample pixel points are sample points whose pixel values have been decoded or obtained, the target pixel points are sample points of the target reference object, and the sample pixel points are located on the left or above the target pixel points.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: The decoding end obtains the intra-frame prediction mode index information of the current coding unit from the bit stream, where the intra-frame prediction mode index information is used to indicate the intra-frame prediction mode of the current coding unit.
7. A method for determining a reference object, characterized in that: include: The encoder determines the coefficients corresponding to each of N candidate filters based on the reconstructed pixel template, where N is a positive integer; The encoding end calculates pixel values of sample points of synthetic reference objects corresponding to the N candidate filters respectively based on coefficients corresponding to the candidate filters, to obtain pixel values of sample points of the N synthetic reference objects, where the synthetic reference objects are synthetic reference rows or synthetic reference columns; The encoding end calculates N first prediction values of the current coding unit based on the pixel values of the sample points of the N synthetic reference objects, and one first prediction value of the current coding unit is obtained corresponding to one 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, where the target reference object is one of the N synthetic reference objects.
8. The method according to claim 7, characterized in that The determining the target reference object based on the N first rate-distortion costs includes: The encoding end obtains the minimum first rate distortion cost among the N first rate distortion costs; The encoding end determines a target reference object based on the minimum first rate-distortion cost.
9. The method according to claim 8, characterized in that The method further comprises: The encoding end obtains a candidate reference object of the current coding unit, where the candidate reference object is a reference row or a reference column adjacent to the current coding unit; The encoding end calculates a second prediction value of the current coding unit based on the candidate reference object; The encoding end determines a second rate-distortion cost based on the second prediction value; The encoder determines a target reference object based on the minimum first rate-distortion cost, including: When the second rate-distortion cost is greater than the minimum first rate-distortion cost, the encoding end determines a target reference object based on the minimum first rate-distortion cost.
10. The method according to any one of claims 7 to 9, characterized in that: The method further comprises: The encoder sends a code stream of the current coding unit to a decoder, where the code stream carries first indication information, where the first indication information is used to indicate whether a reference object used by the encoder for the current coding unit is the target reference object.
11. The method according to any one of claims 7 to 10, characterized in that: The candidate filter includes sample pixel points and target pixel points, the sample pixel points are sample points whose pixel values have been decoded or obtained, the target pixel points are sample points of the target reference object, and the sample pixel points are located on the left or above the target pixel points.
12. An intra-frame prediction device, characterized in that: include: A first determination module, used to determine a target filter and obtain 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; A first calculation module, configured to calculate a pixel value of a sample point of a target reference object based on a coefficient 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 value of the sample point of the target reference object and the intra-frame prediction mode of the current coding unit.
13. The device according to claim 12, characterized in that The first determining module is further used for: In case it is determined that the current coding unit uses the target reference object, a target filter is determined.
14. The device according to claim 13, characterized in that The device also includes: The first acquisition module is used to acquire first indication information corresponding to the current coding unit from a bitstream, where the first indication information is used to indicate whether a reference object corresponding to the current coding unit is the target reference object.
15. The device according to any one of claims 12-13, characterized in that The first determining module is further used for: Acquire filter index information of the current coding unit from a bitstream; A filter corresponding to the filter index information among N candidate filters is determined as the target filter, where N is a positive integer.
16. The device according to claim 15, characterized in that The candidate filter includes sample pixel points and target pixel points, the sample pixel points are sample points whose pixel values have been decoded or obtained, the target pixel points are sample points of the target reference object, and the sample pixel points are located on the left or above the target pixel points.
17. The device according to any one of claims 12 to 16, characterized in that The device also includes: The second acquisition module is used to acquire the intra-frame prediction mode index information of the current coding unit from the code stream, where the intra-frame prediction mode index information is used to indicate the intra-frame prediction mode of the current coding unit.
18. A reference object determination device, characterized in that: include: A third determination module is used to determine coefficients corresponding to N candidate filters based on the reconstructed pixel template, where N is a positive integer; A third calculation module is used to calculate the pixel values of the sample points of the synthetic reference objects corresponding to the N candidate filters respectively based on the coefficients corresponding to the candidate filters, so as to obtain the pixel values of the sample points of the N synthetic reference objects, where the synthetic reference objects are synthetic reference rows or synthetic reference columns; A fourth calculation module, configured to calculate N first prediction values of a current coding unit based on pixel values of sample points of the N synthetic reference objects, wherein one first prediction value of the current coding unit is obtained corresponding to one synthetic reference object; The fourth determination module is used to determine N first rate-distortion costs based on the N first prediction values, and determine a target reference object based on the N first rate-distortion costs, where the target reference object is one of the N synthetic reference objects.
19. The device according to claim 18, characterized in that The fourth determining module is further used for: Obtaining a minimum first rate distortion cost among the N first rate distortion costs; A target reference object is determined based on the minimum first rate-distortion cost.
20. The device according to claim 19, characterized in that The device also includes: A third acquisition module, configured to acquire a candidate reference object of the current coding unit, wherein the candidate reference object is a reference row or a reference column adjacent to the current coding unit; a fifth calculation module, configured to calculate a second prediction value of the current coding unit based on the candidate reference object; a fifth determining module, configured to determine a second rate-distortion cost based on the second predicted value; The fourth determining module is further used for: In a case where the second rate-distortion cost is greater than the minimum first rate-distortion cost, a target reference object is determined based on the minimum first rate-distortion cost.
21. The device according to any one of claims 18 to 20, characterized in that The device also includes: The sending module is used to send the code stream of the current coding unit to the decoding end, the code stream carries first indication information, and the first indication information is used to indicate whether the reference object used by the device for the current coding unit is the target reference object.
22. The device according to any one of claims 18 to 21, characterized in that The candidate filter includes sample pixel points and target pixel points, the sample pixel points are sample points whose pixel values have been decoded or obtained, the target pixel points are sample points of the target reference object, and the sample pixel points are located on the left or above the target pixel points.
23. An electronic device, characterized in that: It includes a processor and a memory, 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, it implements the steps of the intra-frame prediction method as described in any one of claims 1 to 6, or implements the steps of the reference object determination method as described in any one of claims 7 to 11.
24. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the intra-frame prediction method as described in any one of claims 1-6 are implemented, or the steps of the reference object determination method as described in any one of claims 7-11 are implemented.
25. A chip, characterized in that: The chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or instruction 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.
Citation Information
Patent Citations
Intra-Prediction With Multiple Reference Lines
US20180332284A1
Intra prediction method and device in video coding system
US20190052875A1
Methods and apparatus for multiple line intra prediction in video compression
US20200014919A1
Method and apparatus of cross-component prediction
US20220078484A1
Image encoding / decoding method and apparatus
WO2023128489A1