Intra-frame prediction method and device, and encoding and decoding method and device based on intra-frame prediction
By selecting an appropriate linear interpolation filter based on color component information and intra prediction mode information, and calculating the prediction value of the intra prediction unit, the problems of unnatural texture and low encoding and decoding efficiency of the intra prediction unit are solved, and a more natural way is achieved texture and more efficient encoding.
Patent Information
- Application Number
- CN201911078110.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-08-23
- Filing Date
- 2019-11-06
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2039-11-06
AI Technical Summary
In the prior art, the internal texture of the intra prediction unit is unnatural, and the energy after image encoding and decoding is not concentrated enough, resulting in low encoding and decoding efficiency.
By determining the linear interpolation filter for intra prediction based on color component information, reference pixel information, and intra prediction mode information, the prediction value of each pixel point in the intra prediction unit in the intra prediction mode is calculated.
The accuracy of intra prediction is improved, making the internal texture of the prediction unit more natural, and the energy after image encoding is more concentrated, which improves encoding efficiency.
Smart Images

Figure CN112422968B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of video coding and decoding, and more specifically, to an intra-frame prediction method and device, and a coding and decoding method and device based on intra-frame prediction. Background Art
[0002] In existing video coding, such as AVS2, H.264 / AVC and HEVC, intra-frame prediction methods are used. That is, the spatial correlation of the image content is used, and the adjacent encoded or decoded reconstructed pixel values around the current block to be encoded / intra-frame prediction unit are used as reference pixels, and the prediction values of each pixel in the current encoding block / intra-frame prediction unit are calculated according to a specific intra-frame prediction model. In this way, the purpose of reducing image spatial redundancy and improving compression rate is achieved. Specifically, at the encoding end, for the intra-frame prediction unit, all intra-frame prediction modes and all inter-frame prediction modes of the inter-frame prediction unit are traversed, and the one with the lowest rate distortion cost is selected as the final prediction mode. The difference between the original pixel value and the predicted pixel value is transformed into the quantized residual information, and the final prediction mode information, etc., and entropy coding is performed to generate a bitstream. At the decoding end, the prediction mode information and residual information are obtained from the bitstream by entropy decoding, and the prediction value of each pixel in the intra-frame prediction unit is obtained according to the prediction mode information, and it is added to the residual value after inverse quantization and inverse transformation to obtain the decoded reconstructed image.
[0003] The first phase standard of AVS3 defines that a coding unit can have seven intra prediction units as shown in FIG1 , each of which includes a luminance (component) intra prediction unit and two chrominance (component) intra prediction units (Cb and Cr).
[0004] The first phase of the AVS3 standard also stipulates that 34 intra-frame prediction modes are defined for the luminance (component) intra-frame prediction unit, and 7 intra-frame prediction models are defined for the chrominance (component) intra-frame prediction unit, as shown in Tables 1 and 2. The 34 intra-frame prediction modes of the luminance intra-frame prediction unit are as follows: Figure 2 shown.
[0005] Table 1 Luma intra prediction unit intra prediction mode
[0006]
[0007]
[0008] Table 2 Chroma intra prediction unit intra prediction mode
[0009]
[0010] The intra prediction mode of the luma intra prediction unit with index values of 3 to 11, 13 to 23, and 25 to 32 is an angular prediction mode. In addition, the DM mode in the prediction mode of the chroma intra prediction unit is to calculate the prediction value of the chroma intra prediction unit based on the intra prediction mode selected by the luma intra prediction unit with an intra prediction unit order of 0 (that is, the first one to be predicted) in the current coding unit as the intra prediction mode of the current chroma intra prediction unit. Therefore, when the intra prediction mode selected by the luma intra prediction unit with a prediction order of 0 (that is, the first one to be predicted) is an angular prediction mode, the prediction mode of the current chroma intra prediction unit is also an angular prediction mode.
[0011] When the angle prediction mode is adopted, all pixels in the current intra-frame prediction unit are mapped to reference pixels at corresponding positions on the left or above according to the specified prediction angle, and the reference pixel values are used as prediction values. Figure 3 Taking the 4×4 intra prediction unit as an example, the reconstructed pixel values of the adjacent upper row (ref_up) and left column (ref_left) are its reference pixel values. For example, if the vertical prediction mode (Vertical) is used, each column of pixel values in the intra prediction unit uses the reference pixel value of the corresponding column of the upper row as its prediction value, that is, the pixel value of the 0th column uses the 0th pixel value in ref_up, the pixel value of the 1st column uses the 1st pixel value in ref_up, and so on. However, for the angular prediction mode, the position of the reference pixel point after mapping may not be the position of the integer pixel point, for example Figure 4 As shown in the figure, if the direction indicated by the arrow is used for intra-frame prediction, the corresponding reference pixel position obtained by mapping the pixel point p according to the arrow prediction direction is ref(p), and ref(p) is not an integer pixel. In this case, a 4-tap linear interpolation filter is needed to use the adjacent 4 integer pixel reference pixels (x -1 , x 0 , x 1 , x 2 ) Calculate the value of ref(p). Formula p = ref(p) = ((32-a) × x -1 +(64-a)×x 0 +(32+a)×x 1 +a×x 2 +64)>>7, p is the pixel to be predicted, ref(p) is the reference pixel value after mapping, that is, the predicted value of p, and a is the square root of ref(p) and x 0The horizontal distance between the two pixels is shown in Figure 1. >> is the bitwise right shift operation. This 4-tap linear interpolation filter plays the role of linear interpolation and smoothing filtering at the same time. On the one hand, smoothing filtering makes the texture of the intra-frame prediction unit more natural, which is conducive to the concentration of energy after transformation, but it will cause the loss of some high-frequency texture detail information, especially near the reference pixel. On the other hand, using the same filter for all pixels in an intra-frame prediction unit may cause the texture of the intra-frame prediction unit to be unnatural or the prediction to be inaccurate, which will reduce the encoding performance.
[0012] In VVC, a multi-filter intra-frame prediction method is used. Formula p = ref (p) = f k,0 × -1 +fk,1×x 0 +f k,2 × 1 +f k,3 × 2 ,0≤k≤4,0≤i≤3, where p is the pixel to be predicted, f k is a linear interpolation filter, k is the index value of the linear interpolation filter, and f k,i is the linear interpolation filter coefficient, x i is the reference pixel value at the integer pixel position. There are 5 different filters (0≤k≤4) according to the degree of smoothness. According to the distance between the predicted pixel and the reference pixel from near to far, the filters with the degree of smoothing from weak to strong are used for linear interpolation. For example Figure 5 As shown, the intra-frame prediction mode is the direction indicated by the arrow, and the filter f with the weakest smoothing filtering degree is used for the pixel in the 0th row (or 0th column) closest to the reference pixel above (or on the left). 0 Calculate the predicted pixel value and use the second weakest smoothing filter f for the pixels in the first row (or first column) 1 Calculate the predicted pixel value and use a medium smoothing filter f for the pixels in the 2nd row (or 0th column) and the 3rd row (or 0th column) 2 Calculate the predicted pixel value and use the filter with the strongest smoothing filter f for the pixel farthest from the reference pixel above (or to the left) 4 Calculate and obtain the predicted pixel value.
[0013] In summary, the multi-filter intra-frame prediction method used in the prior art makes the internal texture of the chrominance intra-frame prediction unit unnatural, and the energy is not concentrated enough during the encoding and decoding process, so the encoding and decoding efficiency is low. Summary of the invention
[0014] An exemplary embodiment of the present disclosure is to provide a coding method and apparatus to solve the problems of unnatural texture inside an intra-frame prediction unit, insufficient energy concentration after image coding and decoding, and low coding and decoding efficiency.
[0015] According to an exemplary embodiment of the present disclosure, an intra-frame prediction method is provided, including: determining an intra-frame prediction unit, obtaining intra-frame prediction unit information of the intra-frame prediction unit, wherein the intra-frame prediction unit information includes at least intra-frame prediction mode information, reference pixel information and color component information; determining a linear interpolation filter for intra-frame prediction according to the color component information, reference pixel information and intra-frame prediction mode information; and calculating a prediction value of each pixel point in the intra-frame prediction unit under the intra-frame prediction mode according to the reference pixel information and the determined linear interpolation filter.
[0016] Optionally, the color component information is information about whether the color component of the intra prediction unit is a luminance component or a chrominance component.
[0017] Optionally, the step of determining a linear interpolation filter for intra-frame prediction based on color component information, reference pixel information and intra-frame prediction mode information may include: determining whether the intra-frame prediction mode of the intra-frame prediction unit is an intra-frame angle prediction mode based on the intra-frame prediction mode information; when the intra-frame prediction mode is the intra-frame angle prediction mode, determining whether the intra-frame prediction unit is a luminance component prediction unit or a chrominance component prediction unit based on the color component information; and selecting a linear interpolation filter as the linear interpolation filter for intra-frame prediction from a set of candidate linear interpolation filters based on the reference pixel information of the intra-frame prediction unit and the determination result of whether the intra-frame prediction unit is a luminance component prediction unit or a chrominance component prediction unit, wherein the index value of the linear interpolation filter in the set of candidate linear interpolation filters is 0 to I, and I is a positive integer.
[0018] Optionally, the intra-frame prediction unit information may also include width and height information of the intra-frame prediction unit, and the step of selecting a linear interpolation filter from a set of candidate linear interpolation filters as a linear interpolation filter for intra-frame prediction may include: determining the reference pixel of the intra-frame prediction unit according to the reference pixel information; and selecting a linear interpolation filter for each row of pixels or each column of pixels of the intra-frame prediction unit according to the width and height information of the intra-frame prediction unit and the determined reference pixel.
[0019] Optionally, when the intra-frame prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel above the intra-frame prediction unit, the step of selecting a linear interpolation filter for each row of pixels of the intra-frame prediction unit may include: when the width of the intra-frame prediction unit is less than or equal to a first threshold, selecting a linear interpolation filter with an index value of a first index value M1 for all pixels in the intra-frame prediction unit; when the width of the intra-frame prediction unit is greater than the first threshold, selecting a linear interpolation filter with an index value of a second index value M2 for the first number of rows of pixels in the intra-frame prediction unit that are sequentially arranged from top to bottom, and selecting a linear interpolation filter with an index value of M2+x for the second number of rows of pixels that follow. 1The linear interpolation filter selects the index value M2+y for the pixel points in the subsequent rows 1 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 1 ≥x 1 >0, I≥M1>M2≥0.
[0020] Optionally, when the intra-frame prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel on the left of the intra-frame prediction unit, the step of selecting a linear interpolation filter for each column of pixel points of the intra-frame prediction unit may include: when the height of the intra-frame prediction unit is less than or equal to the second threshold, selecting a linear interpolation filter with an index value of a third index value M3 for all pixel points in the intra-frame prediction unit; when the height of the intra-frame prediction unit is greater than the second threshold, selecting a linear interpolation filter with an index value of a fourth index value M4 for the pixel points of the third number of columns in the intra-frame prediction unit that are ordered from left to right, and selecting a linear interpolation filter with an index value of M4+x for the pixel points of the fourth number of columns that follow. 2 The linear interpolation filter selects the index value M4+y for the pixel points in the subsequent columns 2 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 2 ≥x 2 >0, I≥M3>M4≥0.
[0021] Optionally, when the intra-frame prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel above the intra-frame prediction unit, the step of selecting a linear interpolation filter for each row of pixels of the intra-frame prediction unit may include: when the width of the intra-frame prediction unit is less than or equal to a third threshold, selecting a linear interpolation filter with an index value of a fifth index value M5 for all pixels in the intra-frame prediction unit; when the width of the intra-frame prediction unit is greater than the third threshold, selecting a linear interpolation filter with an index value of a sixth index value M6 for the pixel points of the fifth number of rows in the intra-frame prediction unit that are sequentially arranged from top to bottom, and selecting a linear interpolation filter with an index value of M6+x for the pixel points of the subsequent rows. 3 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 3 >0, I≥M5>M6≥0.
[0022] Optionally, when the intra-frame prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel on the left of the intra-frame prediction unit, the step of selecting a linear interpolation filter for each column of pixels of the intra-frame prediction unit may include: when the height of the intra-frame prediction unit is less than or equal to a fourth threshold, selecting a linear interpolation filter with an index value of a seventh index value M7 for all pixels in the intra-frame prediction unit; when the height of the intra-frame prediction unit is greater than the fourth threshold, selecting a linear interpolation filter with an index value of an eighth index value M8 for the pixel points of the sixth number of columns in the intra-frame prediction unit ordered from left to right, and selecting a linear interpolation filter with an index value of M8+x for the pixel points of the subsequent columns. 4 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 4 >0, I≥M7>M8≥0.
[0023] Optionally, the step of selecting a linear interpolation filter from a set of candidate linear interpolation filters as a linear interpolation filter for intra-frame prediction may also include: calculating the texture complexity of the intra-frame prediction unit, determining whether the texture of the intra-frame prediction unit is complex or smooth; and selecting a linear interpolation filter for intra-frame prediction based on whether the texture of the intra-frame prediction unit is complex or smooth.
[0024] Optionally, the step of selecting a linear interpolation filter for intra-frame prediction according to whether the texture of the intra-frame prediction unit is complex or smooth may further include: when the intra-frame prediction unit is a luminance component prediction unit and the texture is smooth, selecting a linear interpolation filter with an index value of the ninth index value M9; when the intra-frame prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, selecting a linear interpolation filter with an index value of the tenth index value M10 for the seventh number of rows of pixels in the intra-frame prediction unit from top to bottom, and selecting a linear interpolation filter with an index value of M10+x for the eighth number of rows of pixels thereafter. 5 The linear interpolation filter selects the index value M10+y for the pixel points in the subsequent rows. 5 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 5 ≥x 5 >0, I≥M9>M10≥0; when the intra prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the ninth number of columns in the intra prediction unit from left to right, select the linear interpolation filter with the index value of the eleventh index value M11, and for the pixel points of the tenth number of columns after that, select the linear interpolation filter with the index value of M11+x 6The linear interpolation filter selects the index value M11+y for the pixel points in the subsequent columns 6 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 6 ≥x 6 >0, I≥M9>M11≥0.
[0025] Optionally, the step of selecting a linear interpolation filter for intra-frame prediction according to whether the texture of the intra-frame prediction unit is complex or smooth may further include: when the intra-frame prediction unit is a chrominance component prediction unit and the texture is smooth, selecting a linear interpolation filter with an index value of the twelfth index value M12; when the intra-frame prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, for the pixel points of the eleventh number of rows in the intra-frame prediction unit that are sequentially arranged from top to bottom, selecting a linear interpolation filter with an index value of the thirteenth index value M13, and for the pixel points of the subsequent rows, selecting a linear interpolation filter with an index value of M13+x. 7 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 7 >0, I≥M12>M13≥0; when the intra prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the twelfth column of the intra prediction unit in order from left to right, select the linear interpolation filter with the index value of the fourteenth index value M14, and for the pixel points of the subsequent columns, select the linear interpolation filter with the index value of M14+x 8 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 8 >0, I≥M12>M14≥0.
[0026] According to an exemplary embodiment of the present disclosure, a coding method is provided, comprising: determining an intra-frame prediction unit in a current coding unit, obtaining intra-frame prediction unit information of the intra-frame prediction unit, wherein the intra-frame prediction unit information includes at least intra-frame prediction mode information, reference pixel information and color component information; determining a linear interpolation filter for intra-frame prediction according to the color component information, reference pixel information and intra-frame prediction mode information; calculating a prediction value of each pixel point in the intra-frame prediction unit under the intra-frame prediction mode according to the reference pixel information and the determined linear interpolation filter; and selecting a prediction mode for encoding according to the prediction value.
[0027] According to an exemplary embodiment of the present disclosure, a decoding method is provided, comprising: determining an intra-frame prediction unit in a current decoding unit, obtaining intra-frame prediction unit information of the intra-frame prediction unit, wherein the intra-frame prediction unit information includes at least intra-frame prediction mode information, reference pixel information and color component information; determining a linear interpolation filter for intra-frame prediction according to the color component information, reference pixel information and intra-frame prediction mode information; calculating a prediction value of each pixel point in the intra-frame prediction unit under the intra-frame prediction mode according to the reference pixel information and the determined linear interpolation filter; and calculating a reconstruction value of the current decoding unit according to the prediction value.
[0028] Optionally, the color component information is information about whether the color component of the intra prediction unit is a luminance component or a chrominance component.
[0029] Optionally, the step of determining a linear interpolation filter for intra-frame prediction based on color component information, reference pixel information and intra-frame prediction mode information may include: determining whether the intra-frame prediction mode of the intra-frame prediction unit is an intra-frame angle prediction mode based on the intra-frame prediction mode information; when the intra-frame prediction mode is the intra-frame angle prediction mode, determining whether the intra-frame prediction unit is a luminance component prediction unit or a chrominance component prediction unit based on the color component information; and selecting a linear interpolation filter as the linear interpolation filter for intra-frame prediction from a set of candidate linear interpolation filters based on the reference pixel information of the intra-frame prediction unit and the determination result of whether the intra-frame prediction unit is a luminance component prediction unit or a chrominance component prediction unit, wherein the index value of the linear interpolation filter in the set of candidate linear interpolation filters is 0 to I, and I is a positive integer.
[0030] Optionally, the intra-frame prediction unit information may also include width and height information of the intra-frame prediction unit, and the step of selecting a linear interpolation filter from a set of candidate linear interpolation filters as a linear interpolation filter for intra-frame prediction may include: determining the reference pixel of the intra-frame prediction unit according to the reference pixel information; and selecting a linear interpolation filter for each row of pixels or each column of pixels of the intra-frame prediction unit according to the width and height information of the intra-frame prediction unit and the determined reference pixel.
[0031] Optionally, when the intra-frame prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel above the intra-frame prediction unit, the step of selecting a linear interpolation filter for each row of pixels of the intra-frame prediction unit may include: when the width of the intra-frame prediction unit is less than or equal to a first threshold, selecting a linear interpolation filter with an index value of a first index value M1 for all pixels in the intra-frame prediction unit; when the width of the intra-frame prediction unit is greater than the first threshold, selecting a linear interpolation filter with an index value of a second index value M2 for the first number of rows of pixels in the intra-frame prediction unit that are sequentially arranged from top to bottom, and selecting a linear interpolation filter with an index value of M2+x for the second number of rows of pixels that follow. 1The linear interpolation filter selects the index value M2+y for the pixel points in the subsequent rows 1 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 1 ≥x 1 >0, I≥M1>M2≥0.
[0032] Optionally, when the intra-frame prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel on the left of the intra-frame prediction unit, the step of selecting a linear interpolation filter for each column of pixel points of the intra-frame prediction unit may include: when the height of the intra-frame prediction unit is less than or equal to the second threshold, selecting a linear interpolation filter with an index value of a third index value M3 for all pixel points in the intra-frame prediction unit; when the height of the intra-frame prediction unit is greater than the second threshold, selecting a linear interpolation filter with an index value of a fourth index value M4 for the pixel points of the third number of columns in the intra-frame prediction unit that are ordered from left to right, and selecting a linear interpolation filter with an index value of M4+x for the pixel points of the fourth number of columns that follow. 2 The linear interpolation filter selects the index value M4+y for the pixel points in the subsequent columns 2 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 2 ≥x 2 >0, I≥M3>M4≥0.
[0033] Optionally, when the intra-frame prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel above the intra-frame prediction unit, the step of selecting a linear interpolation filter for each row of pixels of the intra-frame prediction unit may include: when the width of the intra-frame prediction unit is less than or equal to a third threshold, selecting a linear interpolation filter with an index value of a fifth index value M5 for all pixels in the intra-frame prediction unit; when the width of the intra-frame prediction unit is greater than the third threshold, selecting a linear interpolation filter with an index value of a sixth index value M6 for the pixel points of the fifth number of rows in the intra-frame prediction unit that are sequentially arranged from top to bottom, and selecting a linear interpolation filter with an index value of M6+x for the pixel points of the subsequent rows. 3 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 3 >0, I≥M5>M6≥0.
[0034] Optionally, when the intra-frame prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel on the left of the intra-frame prediction unit, the step of selecting a linear interpolation filter for each column of pixels of the intra-frame prediction unit may include: when the height of the intra-frame prediction unit is less than or equal to a fourth threshold, selecting a linear interpolation filter with an index value of a seventh index value M7 for all pixels in the intra-frame prediction unit; when the height of the intra-frame prediction unit is greater than the fourth threshold, selecting a linear interpolation filter with an index value of an eighth index value M8 for the pixel points of the sixth number of columns in the intra-frame prediction unit ordered from left to right, and selecting a linear interpolation filter with an index value of M8+x for the pixel points of the subsequent columns. 4 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 4 >0, I≥M7>M8≥0.
[0035] Optionally, the step of selecting a linear interpolation filter from a set of candidate linear interpolation filters as a linear interpolation filter for intra-frame prediction may also include: calculating the texture complexity of the intra-frame prediction unit, determining whether the texture of the intra-frame prediction unit is complex or smooth; and selecting a linear interpolation filter for intra-frame prediction based on whether the texture of the intra-frame prediction unit is complex or smooth.
[0036] Optionally, the step of selecting a linear interpolation filter for intra-frame prediction according to whether the texture of the intra-frame prediction unit is complex or smooth may further include: when the intra-frame prediction unit is a luminance component prediction unit and the texture is smooth, selecting a linear interpolation filter with an index value of the ninth index value M9; when the intra-frame prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, selecting a linear interpolation filter with an index value of the tenth index value M10 for the seventh number of rows of pixels in the intra-frame prediction unit from top to bottom, and selecting a linear interpolation filter with an index value of M10+x for the eighth number of rows of pixels thereafter. 5 The linear interpolation filter selects the index value M10+y for the pixel points in the subsequent rows. 5 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 5 ≥x 5 >0, I≥M9>M10≥0; when the intra prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the ninth number of columns in the intra prediction unit from left to right, select the linear interpolation filter with the index value of the eleventh index value M11, and for the pixel points of the tenth number of columns after that, select the linear interpolation filter with the index value of M11+x 6The linear interpolation filter selects the index value M11+y for the pixel points in the subsequent columns 6 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 6 ≥x 6 >0, I≥M9>M11≥0.
[0037] Optionally, the step of selecting a linear interpolation filter for intra-frame prediction according to whether the texture of the intra-frame prediction unit is complex or smooth may further include: when the intra-frame prediction unit is a chrominance component prediction unit and the texture is smooth, selecting a linear interpolation filter with an index value of the twelfth index value M12; when the intra-frame prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, for the pixel points of the eleventh number of rows in the intra-frame prediction unit that are sequentially arranged from top to bottom, selecting a linear interpolation filter with an index value of the thirteenth index value M13, and for the pixel points of the subsequent rows, selecting a linear interpolation filter with an index value of M13+x. 7 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 7 >0, I≥M12>M13≥0; when the intra prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the twelfth column of the intra prediction unit in order from left to right, select the linear interpolation filter with the index value of the fourteenth index value M14, and for the pixel points of the subsequent columns, select the linear interpolation filter with the index value of M14+x 8 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 8 >0, I≥M12>M14≥0.
[0038] According to an exemplary embodiment of the present disclosure, an intra-frame prediction device is provided, including: an information acquisition unit, configured to determine an intra-frame prediction unit, and acquire intra-frame prediction unit information of the intra-frame prediction unit, wherein the intra-frame prediction unit information includes at least intra-frame prediction mode information, reference pixel information and color component information; a filter determination unit, configured to determine a linear interpolation filter for intra-frame prediction based on the color component information, the reference pixel information and the intra-frame prediction mode information; a prediction value calculation unit, configured to calculate the prediction value of each pixel point in the intra-frame prediction unit under the intra-frame prediction mode based on the reference pixel information and the determined linear interpolation filter.
[0039] Optionally, the color component information is information about whether the color component of the intra prediction unit is a luminance component or a chrominance component.
[0040] Optionally, the filter determination unit may be configured to: determine whether the intra-frame prediction mode of the intra-frame prediction unit is an intra-frame angle prediction mode according to the intra-frame prediction mode information; when the intra-frame prediction mode is the intra-frame angle prediction mode, determine whether the intra-frame prediction unit is a luminance component prediction unit or a chrominance component prediction unit according to the color component information; and select a linear interpolation filter from a set of candidate linear interpolation filters as a linear interpolation filter for intra-frame prediction according to the reference pixel information of the intra-frame prediction unit and the determination result of whether the intra-frame prediction unit is a luminance component prediction unit or a chrominance component prediction unit, wherein the index value of the linear interpolation filter in the set of candidate linear interpolation filters is 0 to I, and I is a positive integer.
[0041] Optionally, the intra-frame prediction unit information may also include width and height information of the intra-frame prediction unit, and the filter determination unit is further configured to: determine the reference pixels of the intra-frame prediction unit according to the reference pixel information; and select a linear interpolation filter for each row of pixels or each column of pixels of the intra-frame prediction unit according to the width and height information of the intra-frame prediction unit and the determined reference pixels.
[0042] Optionally, the filter determination unit may be further configured as follows: when the intra-frame prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel above the intra-frame prediction unit, when the width of the intra-frame prediction unit is less than or equal to a first threshold, a linear interpolation filter with an index value of the first index value M1 is selected for all pixel points in the intra-frame prediction unit; when the width of the intra-frame prediction unit is greater than the first threshold, a linear interpolation filter with an index value of the second index value M2 is selected for the pixel points of the first number of rows in the intra-frame prediction unit that are sequentially arranged from top to bottom, and a linear interpolation filter with an index value of M2+x is selected for the pixel points of the second number of rows that follow. 1 The linear interpolation filter selects the index value M2+y for the pixel points in the subsequent rows 1 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 1 ≥x 1 >0, I≥M1>M2≥0.
[0043] Optionally, the filter determination unit may be further configured as follows: when the intra-frame prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel on the left side of the intra-frame prediction unit, when the height of the intra-frame prediction unit is less than or equal to the second threshold, a linear interpolation filter with an index value of a third index value M3 is selected for all pixel points in the intra-frame prediction unit; when the height of the intra-frame prediction unit is greater than the second threshold, a linear interpolation filter with an index value of a fourth index value M4 is selected for the pixel points of the third number of columns in the intra-frame prediction unit that are ordered from left to right, and a linear interpolation filter with an index value of M4+x is selected for the pixel points of the fourth number of columns that are ordered from left to right. 2 The linear interpolation filter selects the index value M4+y for the pixel points in the subsequent columns 2 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 2 ≥x 2 >0, I≥M3>M4≥0.
[0044] Optionally, the filter determination unit may be further configured as follows: when the intra-frame prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel above the intra-frame prediction unit, when the width of the intra-frame prediction unit is less than or equal to a third threshold, a linear interpolation filter with an index value of a fifth index value M5 is selected for all pixel points in the intra-frame prediction unit; when the width of the intra-frame prediction unit is greater than the third threshold, a linear interpolation filter with an index value of a sixth index value M6 is selected for the pixel points of the fifth number of rows in the order from top to bottom of the intra-frame prediction unit, and a linear interpolation filter with an index value of M6+x is selected for the pixel points of the subsequent rows. 3 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 3 >0, I≥M5>M6≥0.
[0045] Optionally, the filter determination unit may be further configured as follows: when the intra-frame prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel on the left side of the intra-frame prediction unit, when the height of the intra-frame prediction unit is less than or equal to the fourth threshold, a linear interpolation filter with an index value of the seventh index value M7 is selected for all pixel points in the intra-frame prediction unit; when the height of the intra-frame prediction unit is greater than the fourth threshold, a linear interpolation filter with an index value of the eighth index value M8 is selected for the pixel points of the sixth number of columns in the sequence from left to right of the intra-frame prediction unit, and a linear interpolation filter with an index value of M8+x is selected for the pixel points of the subsequent columns. 4 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 4>0, I≥M7>M8≥0.
[0046] Optionally, the filter determination unit may be further configured to: calculate the texture complexity of the intra prediction unit to determine whether the texture of the intra prediction unit is complex or smooth; and select a linear interpolation filter for intra prediction according to whether the texture of the intra prediction unit is complex or smooth.
[0047] Optionally, the filter determination unit may be further configured to: when the intra-frame prediction unit is a luminance component prediction unit and the texture is smooth, select a linear interpolation filter with an index value of the ninth index value M9; when the intra-frame prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, select a linear interpolation filter with an index value of the tenth index value M10 for the seventh number of rows of pixels in the intra-frame prediction unit from top to bottom, and select a linear interpolation filter with an index value of M10+x for the eighth number of rows of pixels thereafter. 5 The linear interpolation filter selects the index value M10+y for the pixel points in the subsequent rows. 5 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 5 ≥x 5 >0, I≥M9>M10≥0; when the intra prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the ninth number of columns in the intra prediction unit from left to right, select the linear interpolation filter with the index value of the eleventh index value M11, and for the pixel points of the tenth number of columns after that, select the linear interpolation filter with the index value of M11+x 6 The linear interpolation filter selects the index value M11+y for the pixel points in the subsequent columns 6 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 6 ≥x 6 >0, I≥M9>M11≥0.
[0048] Optionally, the filter determination unit may be further configured to: when the intra-frame prediction unit is a chroma component prediction unit and the texture is smooth, select a linear interpolation filter with an index value of the twelfth index value M12; when the intra-frame prediction unit is a chroma component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, select a linear interpolation filter with an index value of the thirteenth index value M13 for the pixel points of the eleventh number of rows in the order from top to bottom of the intra-frame prediction unit, and select a linear interpolation filter with an index value of M13+x for the pixel points of the subsequent rows. 7wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 7 >0, I≥M12>M13≥0; when the intra prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the twelfth column of the intra prediction unit in order from left to right, select the linear interpolation filter with the index value of the fourteenth index value M14, and for the pixel points of the subsequent columns, select the linear interpolation filter with the index value of M14+x 8 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 8 >0, I≥M12>M14≥0.
[0049] According to an exemplary embodiment of the present disclosure, there is provided an encoding device, comprising: an information acquisition unit, configured to determine an intra-prediction unit in a current encoding unit, and acquire intra-prediction unit information of the intra-prediction unit, wherein the intra-prediction unit information includes at least intra-prediction mode information, reference pixel information and color component information; a filter determination unit, configured to determine a linear interpolation filter for intra-prediction based on the color component information, the reference pixel information and the intra-prediction mode information; a prediction value calculation unit, configured to calculate a prediction value of each pixel in the intra-prediction unit under the intra-prediction mode based on the reference pixel information and the determined linear interpolation filter; and an encoding unit, configured to select a prediction mode for encoding based on the prediction value.
[0050] According to an exemplary embodiment of the present disclosure, a decoding device is provided, including: an information acquisition unit, configured to determine an intra-frame prediction unit in a current decoding unit, and acquire intra-frame prediction unit information of the intra-frame prediction unit, wherein the intra-frame prediction unit information includes at least intra-frame prediction mode information, reference pixel information and color component information; a filter determination unit, configured to determine a linear interpolation filter for intra-frame prediction based on the color component information, the reference pixel information and the intra-frame prediction mode information; a prediction value calculation unit, configured to calculate the prediction value of each pixel point in the intra-frame prediction unit under the intra-frame prediction mode based on the reference pixel information and the determined linear interpolation filter; and a reconstruction value calculation unit, configured to calculate the reconstruction value of the current decoding unit based on the prediction value.
[0051] Optionally, the color component information is information about whether the color component of the intra prediction unit is a luminance component or a chrominance component.
[0052] Optionally, the filter determination unit may be configured to: determine whether the intra-frame prediction mode of the intra-frame prediction unit is an intra-frame angle prediction mode according to the intra-frame prediction mode information; when the intra-frame prediction mode is the intra-frame angle prediction mode, determine whether the intra-frame prediction unit is a luminance component prediction unit or a chrominance component prediction unit according to the color component information; and select a linear interpolation filter from a set of candidate linear interpolation filters as a linear interpolation filter for intra-frame prediction according to the reference pixel information of the intra-frame prediction unit and the determination result of whether the intra-frame prediction unit is a luminance component prediction unit or a chrominance component prediction unit, wherein the index value of the linear interpolation filter in the set of candidate linear interpolation filters is 0 to I, and I is a positive integer.
[0053] Optionally, the intra-frame prediction unit information may also include width and height information of the intra-frame prediction unit, and the filter determination unit is further configured to: determine the reference pixels of the intra-frame prediction unit according to the reference pixel information; and select a linear interpolation filter for each row of pixels or each column of pixels of the intra-frame prediction unit according to the width and height information of the intra-frame prediction unit and the determined reference pixels.
[0054] Optionally, the filter determination unit may be further configured as follows: when the intra-frame prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel above the intra-frame prediction unit, when the width of the intra-frame prediction unit is less than or equal to a first threshold, a linear interpolation filter with an index value of the first index value M1 is selected for all pixel points in the intra-frame prediction unit; when the width of the intra-frame prediction unit is greater than the first threshold, a linear interpolation filter with an index value of the second index value M2 is selected for the pixel points of the first number of rows in the intra-frame prediction unit that are sequentially arranged from top to bottom, and a linear interpolation filter with an index value of M2+x is selected for the pixel points of the second number of rows that follow. 1 The linear interpolation filter selects the index value M2+y for the pixel points in the subsequent rows 1 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 1 ≥x 1 >0, I≥M1>M2≥0.
[0055] Optionally, the filter determination unit may be further configured as follows: when the intra-frame prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel on the left side of the intra-frame prediction unit, when the height of the intra-frame prediction unit is less than or equal to the second threshold, a linear interpolation filter with an index value of a third index value M3 is selected for all pixel points in the intra-frame prediction unit; when the height of the intra-frame prediction unit is greater than the second threshold, a linear interpolation filter with an index value of a fourth index value M4 is selected for the pixel points of the third number of columns in the intra-frame prediction unit that are ordered from left to right, and a linear interpolation filter with an index value of M4+x is selected for the pixel points of the fourth number of columns that are ordered from left to right.2 The linear interpolation filter selects the index value M4+y for the pixel points in the subsequent columns 2 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 2 ≥x 2 >0, I≥M3>M4≥0.
[0056] Optionally, the filter determination unit may be further configured as follows: when the intra-frame prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel above the intra-frame prediction unit, when the width of the intra-frame prediction unit is less than or equal to a third threshold, a linear interpolation filter with an index value of a fifth index value M5 is selected for all pixel points in the intra-frame prediction unit; when the width of the intra-frame prediction unit is greater than the third threshold, a linear interpolation filter with an index value of a sixth index value M6 is selected for the pixel points of the fifth number of rows in the order from top to bottom of the intra-frame prediction unit, and a linear interpolation filter with an index value of M6+x is selected for the pixel points of the subsequent rows. 3 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 3 >0, I≥M5>M6≥0.
[0057] Optionally, the filter determination unit may be further configured as follows: when the intra-frame prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel on the left side of the intra-frame prediction unit, when the height of the intra-frame prediction unit is less than or equal to the fourth threshold, a linear interpolation filter with an index value of the seventh index value M7 is selected for all pixel points in the intra-frame prediction unit; when the height of the intra-frame prediction unit is greater than the fourth threshold, a linear interpolation filter with an index value of the eighth index value M8 is selected for the pixel points of the sixth number of columns in the sequence from left to right of the intra-frame prediction unit, and a linear interpolation filter with an index value of M8+x is selected for the pixel points of the subsequent columns. 4 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 4 >0, I≥M7>M8≥0.
[0058] Optionally, the filter determination unit may be further configured to: calculate the texture complexity of the intra prediction unit to determine whether the texture of the intra prediction unit is complex or smooth; and select a linear interpolation filter for intra prediction according to whether the texture of the intra prediction unit is complex or smooth.
[0059] Optionally, the filter determination unit may be further configured to: when the intra-frame prediction unit is a luminance component prediction unit and the texture is smooth, select a linear interpolation filter with an index value of the ninth index value M9; when the intra-frame prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, select a linear interpolation filter with an index value of the tenth index value M10 for the seventh number of rows of pixels in the intra-frame prediction unit from top to bottom, and select a linear interpolation filter with an index value of M10+x for the eighth number of rows of pixels thereafter. 5 The linear interpolation filter selects the index value M10+y for the pixel points in the subsequent rows. 5 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 5 ≥x 5 >0, I≥M9>M10≥0; when the intra prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the ninth number of columns in the intra prediction unit from left to right, select the linear interpolation filter with the index value of the eleventh index value M11, and for the pixel points of the tenth number of columns after that, select the linear interpolation filter with the index value of M11+x 6 The linear interpolation filter selects the index value M11+y for the pixel points in the subsequent columns 6 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 6 ≥x 6 >0, I≥M9>M11≥0.
[0060] Optionally, the filter determination unit may be further configured to: when the intra-frame prediction unit is a chroma component prediction unit and the texture is smooth, select a linear interpolation filter with an index value of the twelfth index value M12; when the intra-frame prediction unit is a chroma component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, select a linear interpolation filter with an index value of the thirteenth index value M13 for the pixel points of the eleventh number of rows in the order from top to bottom of the intra-frame prediction unit, and select a linear interpolation filter with an index value of M13+x for the pixel points of the subsequent rows. 7 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 7>0, I≥M12>M13≥0; when the intra prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the twelfth column of the intra prediction unit in order from left to right, select the linear interpolation filter with the index value of the fourteenth index value M14, and for the pixel points of the subsequent columns, select the linear interpolation filter with the index value of M14+x 8 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 8 >0, I≥M12>M14≥0.
[0061] According to an exemplary embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the encoding method according to the exemplary embodiment of the present disclosure is implemented.
[0062] According to an exemplary embodiment of the present disclosure, there is provided a computing device, including: a processor; and a memory storing a computer program, wherein when the computer program is executed by the processor, the encoding method according to the exemplary embodiment of the present disclosure is implemented.
[0063] According to the intra-frame prediction method and device, and the coding and decoding method and device based on intra-frame prediction of the exemplary embodiments of the present disclosure, by using different intra-frame prediction linear interpolation filter selection methods for the intra-frame prediction units of the luminance component and the chrominance component according to the color component information and the intra-frame prediction mode information, the difference in texture characteristics between the chrominance component prediction unit and the luminance component prediction unit, that is, the fact that the chrominance component contains less texture details and high-frequency information than the luminance component, is fully considered, thereby improving the accuracy of intra-frame prediction, making the internal texture of the prediction unit more natural, and further making the energy of the image after encoding more concentrated, thereby improving the encoding efficiency.
[0064] Additional aspects and / or advantages of the present general inventive concept will be set forth in part in the following description and in part will be apparent from the description or may be learned through practice of the present general inventive concept. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The above and other objects and features of the exemplary embodiments of the present disclosure will become more apparent through the following description in conjunction with the accompanying drawings which exemplarily illustrate the embodiments, in which:
[0066] Figures 1A to 1G A schematic diagram showing seven intra prediction units;
[0067] Figure 2 A schematic diagram showing an intra prediction mode of a luma intra prediction unit;
[0068] Figure 3 A schematic diagram showing a vertical prediction model for a 4×4 block;
[0069] Figure 4 A schematic diagram showing an angle prediction model;
[0070] Figure 5 A schematic diagram showing multi-filter intra prediction;
[0071] Figure 6 A flowchart showing an intra-frame prediction method according to an exemplary embodiment of the present disclosure is shown;
[0072] Figure 7 A schematic diagram showing a method of calculating a difference value between reference pixels according to an exemplary embodiment of the present disclosure;
[0073] Figure 8 A schematic diagram showing a method of calculating a difference value between reference pixels according to another exemplary embodiment of the present disclosure;
[0074] Fig. 9 A schematic diagram showing a method of calculating a difference value between reference pixels according to another exemplary embodiment of the present disclosure;
[0075] Fig.10 A flowchart showing an encoding method according to an exemplary embodiment of the present disclosure;
[0076] Fig.11 A flowchart showing a decoding method according to an exemplary embodiment of the present disclosure;
[0077] Fig.12 A block diagram showing an intra-frame prediction apparatus according to an exemplary embodiment of the present disclosure;
[0078] Fig.13 A block diagram showing an encoding device according to an exemplary embodiment of the present disclosure;
[0079] Fig.14 A block diagram showing a decoding device according to an exemplary embodiment of the present disclosure; and
[0080] Fig.15 A schematic diagram showing a computing device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0081] Reference will now be made in detail to exemplary embodiments of the present disclosure, examples of which are shown in the accompanying drawings, wherein like reference numerals refer to like parts throughout. The embodiments will be described below with reference to the drawings in order to explain the present disclosure.
[0082] Figure 6 A flowchart of an intra prediction method according to an exemplary embodiment of the present disclosure is shown.
[0083] Reference Figure 6 In step S601, an intra prediction unit is determined, and intra prediction unit information of the intra prediction unit is obtained. Here, the intra prediction unit information includes at least intra prediction mode information, reference pixel information, and color component information.
[0084] In an exemplary embodiment of the present disclosure, the color component information is information about whether the color component of the intra prediction unit is a luminance component or a chrominance component. Specifically, the color component may include an R component, a G component, a B component, etc. in addition to the luminance component and the chrominance component, and the present disclosure does not limit this. The intra prediction mode information is information for indicating the intra prediction mode. The reference pixel information is information for indicating the reference pixel of the intra prediction unit.
[0085] In an exemplary embodiment of the present disclosure, specifically, the encoded reconstructed pixels in a row above and a column to the left of the intra-frame prediction unit may be used as reference pixels, or the reconstructed pixels in several rows above and several columns to the left may be used, and the present disclosure does not limit this. In an exemplary embodiment of the present disclosure, for the convenience of description, the encoded reconstructed pixels in a row above and a column to the left of the intra-frame prediction unit are used as reference pixels.
[0086] In step S602, a linear interpolation filter for intra prediction is determined according to the color component information, the reference pixel information and the intra prediction mode information.
[0087] In an exemplary embodiment of the present disclosure, when determining a linear interpolation filter for intra-frame prediction according to color component information, reference pixel information, and intra-frame prediction mode information, it is possible to first determine whether the intra-frame prediction mode of the intra-frame prediction unit is an intra-frame angle prediction mode according to the intra-frame prediction mode information, and when the intra-frame prediction mode is an intra-frame angle prediction mode, determine whether the intra-frame prediction unit is a luminance component prediction unit or a chrominance component prediction unit according to the color component information, and select a linear interpolation filter from a candidate linear interpolation filter set as a linear interpolation filter for intra-frame prediction according to the reference pixel information of the intra-frame prediction unit and the determination result of whether the intra-frame prediction unit is a luminance component prediction unit or a chrominance component prediction unit. Here, the candidate linear interpolation filter set is pre-defined consistently at the encoding end and the decoding end, and the index value of the linear interpolation filter in the candidate linear interpolation filter set can be 0 to I, where I is a positive integer. For example, the candidate interpolation filter set may include 3 linear interpolation filters, and the index values are 0, 1, and 2 respectively according to the degree of smoothing filtering from weak to strong. For example, the candidate interpolation filter set may include 5 linear interpolation filters, and the index values are 0, 1, 2, 3, and 4 respectively according to the degree of smoothing filtering from weak to strong. It should be understood that the number of filters in the candidate interpolation filter set can be any number, and the present disclosure does not limit this. The strength of the filter smoothing filtering is determined by the coefficient of the filter, and the present disclosure does not limit the specific value of the coefficient of the filter.
[0088] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter from a set of candidate linear interpolation filters as a linear interpolation filter for intra-frame prediction, a possible implementation method is: selecting the linear interpolation filter for intra-frame prediction based on the distance between a pixel point in an intra-frame prediction unit and a reference pixel point.
[0089] In an exemplary embodiment of the present disclosure, specifically, a reference pixel may be first obtained according to an intra-frame prediction mode, and there are two possibilities for the obtained reference pixel: the reference pixel is a row of encoded reconstructed pixels above the intra-frame prediction unit, or the reference pixel is a column of encoded reconstructed pixels to the left of the intra-frame prediction unit.
[0090] In one example, the candidate interpolation filter set includes three linear interpolation filters, and the index values of the three linear interpolation filters are 0, 1, and 2 respectively according to the degree of smoothing filtering from weak to strong.
[0091] In an exemplary embodiment of the present disclosure, when the intra-frame prediction unit is a luminance component prediction unit, when the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 0 is selected for the pixels of the first N1 rows in the intra-frame prediction unit from top to bottom, a linear interpolation filter with an index value of 1 is selected for the pixels of the next N2 rows, and a linear interpolation filter with an index value of 2 is selected for the pixels of the next rows. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 0 is selected for the pixels of the first N3 columns in the intra-frame prediction unit from left to right, a linear interpolation filter with an index value of 1 is selected for the pixels of the next N4 columns, and a linear interpolation filter with an index value of 2 is selected for the pixels of the next columns. When the intra-frame prediction unit is a chrominance component prediction unit, a linear interpolation filter with an index value of 2 is selected for all pixels in the intra-frame prediction unit.
[0092] In this case, for example, when the intra prediction unit is a luminance component prediction unit, when the reference pixel is an upper reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first row of pixels in the intra prediction unit from top to bottom, a linear interpolation filter with an index value of 1 may be selected for the second row of pixels, and a linear interpolation filter with an index value of 2 may be selected for the other rows of pixels. When the reference pixel is a left reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first column of pixels in the intra prediction unit from left to right, a linear interpolation filter with an index value of 1 may be selected for the second column of pixels, and a linear interpolation filter with an index value of 2 may be selected for the other columns of pixels.
[0093] It should be understood that, in addition to the first row or column using one linear interpolation filter, the second row or column using one linear interpolation filter, and the other rows or columns using one linear interpolation filter, it can also be, for example, the first and second rows or columns using one linear interpolation filter, the third and fourth rows or columns using one linear interpolation filter, and the other rows or columns using one linear interpolation filter. That is, N1≥1, N2≥1, N3≥1, N4≥1 and N1, N2, N3, N4 are positive integers.
[0094] In an exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance component prediction unit, a linear interpolation filter with an index value of 2 is selected for all pixels in the intra prediction unit.
[0095] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance component prediction unit, a linear interpolation filter with an index value of 0 is selected for all pixels in the intra prediction unit.
[0096] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chroma component prediction unit, when the reference pixel is an upper reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first and second rows of pixels in the intra prediction unit from top to bottom, and a linear interpolation filter with an index value of 1 may be selected for the other rows of pixels. When the reference pixel is a left reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first and second columns of pixels in the intra prediction unit from left to right, and a linear interpolation filter with an index value of 1 may be selected for the other columns of pixels.
[0097] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chroma component prediction unit, when the reference pixel is an upper reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first row of pixels in the intra prediction unit from top to bottom, and a linear interpolation filter with an index value of 1 may be selected for the other rows of pixels. When the reference pixel is a left reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first column of pixels in the intra prediction unit from left to right, and a linear interpolation filter with an index value of 1 may be selected for the other columns of pixels.
[0098] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chroma component prediction unit, when the reference pixel is an upper reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first row of pixels in the intra prediction unit from top to bottom, a linear interpolation filter with an index value of 1 may be selected for the second row of pixels, and a linear interpolation filter with an index value of 2 may be selected for the other rows of pixels. When the reference pixel is a left reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first column of pixels in the intra prediction unit from left to right, a linear interpolation filter with an index value of 1 may be selected for the second column of pixels, and a linear interpolation filter with an index value of 2 may be selected for the other columns of pixels.
[0099] In another example, the candidate linear interpolation filter set includes 5 filters, and the index values are 0, 1, 2, 3, and 4 from weak to strong according to the degree of smoothing filtering.
[0100] In this case, for example, when the intra-frame prediction unit is a luminance component prediction unit, when the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 0 may be selected for the first row of pixels in the intra-frame prediction unit from top to bottom, a linear interpolation filter with an index value of 2 may be selected for the second row of pixels, and a linear interpolation filter with an index value of 4 may be selected for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 0 may be selected for the first column of pixels in the intra-frame prediction unit from left to right, a linear interpolation filter with an index value of 2 may be selected for the second column of pixels, and a linear interpolation filter with an index value of 4 may be selected for the other columns of pixels.
[0101] For example, when the intra prediction unit is a chroma component prediction unit, when the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 1 may be selected for the first row of pixels in the intra prediction unit from top to bottom, a linear interpolation filter with an index value of 3 may be selected for the second row of pixels, and a linear interpolation filter with an index value of 4 may be selected for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 1 may be selected for the first column of pixels in the intra prediction unit from left to right, a linear interpolation filter with an index value of 3 may be selected for the second column of pixels, and a linear interpolation filter with an index value of 4 may be selected for the other columns of pixels.
[0102] For example, when the intra prediction unit is a luminance component prediction unit, when the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 0 may be selected for the first and second rows of pixels in the intra prediction unit from top to bottom, and a linear interpolation filter with an index value of 4 may be selected for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 0 may be selected for the first and second columns of pixels in the intra prediction unit from left to right, and a linear interpolation filter with an index value of 4 may be selected for the other columns of pixels.
[0103] For example, when the intra prediction unit is a chroma component prediction unit, when the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 3 may be selected for the first row of pixels in the intra prediction unit from top to bottom, and a linear interpolation filter with an index value of 4 may be selected for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 3 may be selected for the first column of pixels in the intra prediction unit from left to right, and a linear interpolation filter with an index value of 4 may be selected for the other columns of pixels.
[0104] The specific distance value between the pixel point in the intra prediction unit and the reference pixel point (i.e., the row / column), as well as the index value of the selected filter, are not limited here. However, the principle to be followed is that the smoothness of the filter selected for the predicted pixel closer to the reference pixel is weaker, and the smoothness of the filter selected for the predicted pixel farther from the reference pixel is stronger. It is possible that the luminance component prediction unit and the chrominance component prediction unit select the same filter.
[0105] In an exemplary embodiment of the present disclosure, the intra prediction unit information may further include width and height information of the intra prediction unit. Therefore, when selecting a linear interpolation filter from a set of candidate linear interpolation filters as a linear interpolation filter for intra prediction, another possible implementation method is to select a linear interpolation filter for intra prediction based on reference pixel information and width and height information of the intra prediction unit.
[0106] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter as a linear interpolation filter for intra-frame prediction from a set of candidate linear interpolation filters, the reference pixels of the intra-frame prediction unit can be first determined based on reference pixel information, and then a linear interpolation filter can be selected for each row of pixels or each column of pixels of the intra-frame prediction unit based on the width and height information of the intra-frame prediction unit and the determined reference pixels.
[0107] In an exemplary embodiment of the present disclosure, when the intra prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel above the intra prediction unit, when a linear interpolation filter is selected for each row of pixels of the intra prediction unit, when the width of the intra prediction unit is less than or equal to a first threshold, a linear interpolation filter having an index value of the first index value M1 is selected for all pixels in the intra prediction unit, and the first threshold value ∈[2 2 ,2 7 ], and is an exponential multiple of 2; when the width of the intra-frame prediction unit is greater than the first threshold, for the pixel points of the first number of rows in the intra-frame prediction unit that are sequentially arranged from top to bottom, a linear interpolation filter with an index value of the second index value M2 is selected, and for the pixel points of the second number of rows that follow, a linear interpolation filter with an index value of M2+x is selected. 1 The linear interpolation filter selects the index value M2+y for the pixel points in the subsequent rows 1 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 1 ≥x 1 >0, I≥M1>M2≥0.
[0108] In an exemplary embodiment of the present disclosure, when the intra prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel on the left of the intra prediction unit, when a linear interpolation filter is selected for each column of pixels of the intra prediction unit, when the height of the intra prediction unit is less than or equal to the second threshold, a linear interpolation filter having an index value of the third index value M3 is selected for all pixels in the intra prediction unit, and the second threshold ∈[2 2 ,2 7 ], and is an exponential multiple of 2; when the height of the intra-frame prediction unit is greater than the second threshold, for the pixel points of the third number of columns in the intra-frame prediction unit that are ordered from left to right, a linear interpolation filter with an index value of the fourth index value M4 is selected, and for the pixel points of the fourth number of columns after that, an index value of M4+x is selected. 2 The linear interpolation filter selects the index value M4+y for the pixel points in the subsequent columns 2 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 2 ≥x 2 >0, I≥M3>M4≥0.
[0109] In an exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel above the intra prediction unit, when a linear interpolation filter is selected for each row of pixels of the intra prediction unit, when the width of the intra prediction unit is less than or equal to a third threshold, a linear interpolation filter having an index value of a fifth index value M5 is selected for all pixels in the intra prediction unit, and the third threshold ∈[2 1 ,2 6 ], and is an exponential multiple of 2; when the width of the intra-frame prediction unit is greater than the third threshold, for the pixel points of the fifth number of rows in the intra-frame prediction unit in order from top to bottom, a linear interpolation filter with an index value of the sixth index value M6 is selected, and for the pixel points of the subsequent rows, an index value of M6+x is selected. 3 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 3 >0, I≥M5>M6≥0.
[0110] In an exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel on the left of the intra prediction unit, when a linear interpolation filter is selected for each column of pixels of the intra prediction unit, when the height of the intra prediction unit is less than or equal to the fourth threshold, a linear interpolation filter having an index value of the seventh index value M7 is selected for all pixels in the intra prediction unit, and the fourth threshold ∈[2 1 ,26 ], and is an exponential multiple of 2; when the height of the intra-frame prediction unit is greater than the fourth threshold, for the pixel points of the sixth number of columns in the intra-frame prediction unit that are ordered from left to right, a linear interpolation filter with an index value of the eighth index value M8 is selected, and for the pixel points of the subsequent columns, an index value of M8+x is selected. 4 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 4 >0, I≥M7>M8≥0.
[0111] For example, in one example, the candidate interpolation filter set includes three linear interpolation filters, and the index values of the three linear interpolation filters are 0, 1, and 2 respectively according to the degree of smoothing filtering from weak to strong.
[0112] In this case, when the intra-frame prediction unit is a luminance component prediction unit, when the reference pixel is the reconstructed pixel above, if the width of the intra-frame prediction unit is less than or equal to 8 (it may also be other thresholds, for example, 4, which is not limited here), a linear interpolation filter with an index value of 2 is selected for all pixels in the intra-frame prediction unit. If the width of the intra-frame prediction unit is greater than 8, a linear interpolation filter with an index value of 0 is selected for the first row of pixels in the intra-frame prediction unit from top to bottom, a linear interpolation filter with an index value of 1 is selected for the second row of pixels, and a linear interpolation filter with an index value of 2 is selected for the other rows of pixels. Alternatively, if the width of the intra-frame prediction unit is greater than 8, a linear interpolation filter with an index value of 0 is selected for the first row of pixels in the intra-frame prediction unit from top to bottom, and a linear interpolation filter with an index value of 1 or 2 is selected for the other rows of pixels. Alternatively, if the width of the intra-frame prediction unit is greater than 8, a linear interpolation filter with an index value of 0 is selected for the first row to, for example, the third row of pixels in the intra-frame prediction unit from top to bottom, and a linear interpolation filter with an index value of 1 or 2 is selected for the pixels in other rows. When the reference pixel is the reconstructed pixel on the left, if the height of the intra-frame prediction unit is less than or equal to 8 (it can also be other thresholds, such as 4, which is not limited here), a linear interpolation filter with an index value of 2 is selected for all pixels in the intra-frame prediction unit. If the height of the intra-frame prediction unit is greater than 8, a linear interpolation filter with an index value of 0 is selected for the first column of pixels in the intra-frame prediction unit from left to right, a linear interpolation filter with an index value of 1 is selected for the second column of pixels, and a linear interpolation filter with an index value of 2 is selected for the pixels in other columns. Alternatively, if the height of the intra-frame prediction unit is greater than 8, a linear interpolation filter with an index value of 0 is selected for the first column of pixels in the intra-frame prediction unit from left to right, and a linear interpolation filter with an index value of 1 or 2 is selected for the pixels in other columns. Alternatively, if the height of the intra-frame prediction unit is greater than 8, a linear interpolation filter with an index value of 0 is selected for the first column to, for example, the third column of pixels in the intra-frame prediction unit from left to right, and a linear interpolation filter with an index value of 1 or 2 is selected for the other columns of pixels.
[0113] When the intra prediction unit is a chroma component prediction unit, when the reference pixel is the reconstructed pixel above, if the width of the intra prediction unit is less than or equal to 4 (it can also be other thresholds, such as 2, which is not limited here), a linear interpolation filter with an index value of 2 is selected for all pixels in the intra prediction unit. If the width of the intra prediction unit is greater than 4, a linear interpolation filter with an index value of 1 is selected for the first row of pixels in the intra prediction unit from top to bottom, and a linear interpolation filter with an index value of 2 is selected for the other rows of pixels. Alternatively, if the width of the intra prediction unit is greater than 4, a linear interpolation filter with an index value of 1 is selected for the first row to, for example, the third row of pixels in the intra prediction unit from top to bottom, and a linear interpolation filter with an index value of 2 is selected for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, if the height of the intra prediction unit is less than or equal to 4 (it can also be other thresholds, such as 2, which is not limited here), a linear interpolation filter with an index value of 2 is selected for all pixels in the intra prediction unit. If the height of the intra prediction unit is greater than 4, a linear interpolation filter with an index value of 1 is selected for the first column of pixels in the intra prediction unit from left to right, and a linear interpolation filter with an index value of 2 is selected for the other columns of pixels. Alternatively, if the height of the intra prediction unit is greater than 4, a linear interpolation filter with an index value of 1 is selected for the first column to, for example, the third column of pixels in the intra prediction unit from left to right, and a linear interpolation filter with an index value of 2 is selected for the other columns of pixels.
[0114] It should be understood that, in addition to the first row or column using a linear interpolation filter, the second row or column using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, it can also be, for example, the first and second rows or columns using a linear interpolation filter, the third and fourth rows or columns using a linear interpolation filter, and the other rows or columns using a linear interpolation filter. In addition to the first row or column using a linear interpolation filter, the second row or column using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, it can also be, for example, the first and second rows or columns using a linear interpolation filter, the third and fourth rows or columns using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, it can also be, for example, the first to third rows or columns using a linear interpolation filter, the fourth to sixth rows or columns using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, etc.
[0115] In an exemplary embodiment of the present disclosure, when a linear interpolation filter is selected from a candidate linear interpolation filter set as a linear interpolation filter for intra-frame prediction, another possible implementation method is: selecting the linear interpolation filter for intra-frame prediction according to texture complexity.
[0116] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter as a linear interpolation filter for intra-frame prediction from a set of candidate linear interpolation filters, the texture complexity of the intra-frame prediction unit can be first calculated to determine whether the texture of the intra-frame prediction unit is complex or smooth, and then the linear interpolation filter for intra-frame prediction is selected based on whether the texture of the intra-frame prediction unit is complex or smooth.
[0117] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter for intra-frame prediction according to whether the texture of the intra-frame prediction unit is complex or smooth, when the intra-frame prediction unit is a luminance component prediction unit and the texture is smooth, a linear interpolation filter with an index value of the ninth index value M9 is selected; when the intra-frame prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, a linear interpolation filter with an index value of the tenth index value M10 is selected for the pixel points of the seventh number of rows in the order from top to bottom of the intra-frame prediction unit, and a linear interpolation filter with an index value of M10+x is selected for the pixel points of the eighth number of rows thereafter. 5 The linear interpolation filter selects the index value M10+y for the pixel points in the subsequent rows. 5 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 5 ≥x 5 >0, I≥M9>M10≥0; when the intra prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the ninth number of columns in the intra prediction unit from left to right, select the linear interpolation filter with the index value of the eleventh index value M11, and for the pixel points of the tenth number of columns after that, select the linear interpolation filter with the index value of M11+x 6 The linear interpolation filter selects the index value M11+y for the pixel points in the subsequent columns 6 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 6 ≥x 6 >0, I≥M9>M11≥0.
[0118] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter for intra-frame prediction according to whether the texture of the intra-frame prediction unit is complex or smooth, when the intra-frame prediction unit is a chrominance component prediction unit and the texture is smooth, a linear interpolation filter with an index value of the twelfth index value M12 is selected; when the intra-frame prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, a linear interpolation filter with an index value of the thirteenth index value M13 is selected for the pixel points of the eleventh number of rows in the order from top to bottom of the intra-frame prediction unit, and a linear interpolation filter with an index value of M13+x is selected for the pixel points of the subsequent rows. 7 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 7 >0, I≥M12>M13≥0; when the intra prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the twelfth column of the intra prediction unit in order from left to right, select the linear interpolation filter with the index value of the fourteenth index value M14, and for the pixel points of the subsequent columns, select the linear interpolation filter with the index value of M14+x 8 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 8 >0, I≥M12>M14≥0.
[0119] For example, in one example, the candidate interpolation filter set includes three linear interpolation filters, and the index values of the three linear interpolation filters are 0, 1, and 2 respectively according to the degree of smoothing filtering from weak to strong.
[0120] In this case, when the intra-frame prediction unit is a luminance component prediction unit, the texture complexity of the intra-frame prediction unit is first calculated. Texture complexity can also be called texture smoothness, or other metric terms that represent texture characteristics. The texture complexity (smoothness) can be determined by calculating the difference value of the reference pixel and comparing it with the set threshold. It can also be obtained by calculating other values, which are not limited here. The method for calculating the reference pixel difference value can be any of the following three methods, or other methods, which are not limited here:
[0121] Method 1: Figure 7 As shown, using the formula Calculate the difference value v between the w reference pixels above and the h reference pixels on the left. Here, ai is the reference pixel value, avg is the average value of the reference pixel values, and w and h are the width and height of the intra prediction unit, respectively.
[0122] Method 2: Figure 8As shown, using the formula Calculate the difference value v between the w reference pixels above and the h reference pixels on the left. That is, take the reference pixels in the left column and the upper row as a group of pixels, use the (-1, 0, 1) template to subtract the absolute value of each pixel, and then calculate the average value.
[0123] Method three, such as Fig. 9 As shown, using the formula Sample and calculate the difference value v between the 3 reference pixels above (U0, Uw / 2, Uw) and the 3 reference pixels on the left (L0, Lh / 2, Lh). Here, ai is the value of the reference pixel (U0, Uw / 2, Uw, L0, Lh / 2, Lh), avg is the average value of the reference pixel value, and w and h are the width and height of the intra prediction unit respectively.
[0124] After calculating the difference value v of the reference pixel, it is compared with the set threshold. If v is less than the threshold, the intra-frame prediction unit is a texture smooth unit. If v is greater than or equal to the threshold, the intra-frame prediction unit is a texture complex unit.
[0125] For the intra prediction unit with smooth texture, directly select the linear interpolation filter with index value 2. For the intra prediction unit with complex texture, when the reference pixel is the reconstructed pixel above, select the linear interpolation filter with index value 0 for the first row of pixels in the intra prediction unit from top to bottom, select the linear interpolation filter with index value 1 for the second row of pixels, and select the linear interpolation filter with index value 2 for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, select the linear interpolation filter with index value 0 for the first column of pixels in the intra prediction unit from left to right, select the linear interpolation filter with index value 1 for the second column of pixels, and select the linear interpolation filter with index value 2 for the other columns of pixels.
[0126] When the intra prediction unit is a chrominance component prediction unit, the texture complexity of the intra prediction unit is first calculated in the same way as the luminance component prediction unit, except that the reference pixel is the corresponding chrominance reconstruction pixel.
[0127] After calculating the difference value v of the reference pixel, it is compared with the set threshold. If v is less than the threshold, the intra-frame prediction unit is a texture smooth unit; if v is greater than or equal to the threshold, the intra-frame prediction unit is a texture complex unit.
[0128] For the smooth texture intra prediction unit, directly select the linear interpolation filter with an index value of 2. For the complex texture intra prediction unit, when the reference pixel is the reconstructed pixel above, select the linear interpolation filter with an index value of 1 for the first row of pixels in the intra prediction unit from top to bottom, and select the linear interpolation filter with an index value of 2 for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, select the linear interpolation filter with an index value of 1 for the first column of pixels in the intra prediction unit from left to right, and select the linear interpolation filter with an index value of 2 for the other columns of pixels.
[0129] It should be understood that, in addition to the first row or column using a linear interpolation filter, the second row or column using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, it can also be, for example, the first and second rows or columns using a linear interpolation filter, the third and fourth rows or columns using a linear interpolation filter, and the other rows or columns using a linear interpolation filter. In addition to the first row or column using a linear interpolation filter, the second row or column using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, it can also be, for example, the first and second rows or columns using a linear interpolation filter, the third and fourth rows or columns using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, it can also be, for example, the first to third rows or columns using a linear interpolation filter, the fourth to sixth rows or columns using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, etc.
[0130] In step S603, the prediction value of each pixel point in the intra prediction unit in the intra prediction mode is calculated according to the reference pixel information and the determined linear interpolation filter.
[0131] After the linear interpolation filter for intra-frame prediction is determined in step S602, in step S603, the linear interpolation filter and reference pixel information obtained in step S602 are used to obtain the linear interpolation filter according to the formula p x,y =f k,0 ×a -1 +f k,1 ×a 0 +f k,2 ×a 1 +f k,3 ×a 2 , 0≤i≤3 calculates the predicted value of each pixel in the intra prediction unit in the intra prediction mode. Here, p x,y is the predicted value of the pixel to be predicted, x and y are the row and column coordinates of the pixel, k is the index value of the linear interpolation filter, and f k,i is the linear interpolation filter coefficient, i=0-3, and in other implementation methods, i may also be in other ranges, which is not limited here. iis the reference pixel value at the integer pixel position. When the reference pixel is the reconstructed pixel above, a 0 For x,y The reference pixel located at the integer pixel position in the same column (column x), a -1 is the reference pixel at the integer pixel position (column x-1), 1 is the reference pixel at the integer pixel position of (column x+1), a 2 is the reference pixel at the integer pixel position of (column x+2). When the reference pixel is the reconstructed pixel on the left, a 0 For x,y The reference pixel located at the integer pixel position in the same row (row x), a -1 is the reference pixel at the integer pixel position (row x-1), a 1 is the reference pixel at the integer pixel position of (row x+1), a 2 is the reference pixel located at the integer pixel position of (row x+2).
[0132] In an exemplary embodiment of the present disclosure, specifically, when the color component of the intra prediction unit is a luminance component, the prediction value here may be a luminance prediction value. When the color component of the intra prediction unit is a chrominance component, the prediction value here may be a chrominance prediction value. It should be understood that the prediction value here may also be a prediction value of R, G, B color components, etc.
[0133] Fig.10 A flowchart of an encoding method according to an exemplary embodiment of the present disclosure is shown.
[0134] Reference Fig.10 In step S1001, an intra prediction unit in a current coding unit is determined, and intra prediction unit information of the intra prediction unit is obtained. Here, the intra prediction unit information includes at least intra prediction mode information, reference pixel information, and color component information.
[0135] In an exemplary embodiment of the present disclosure, the color component information is information about whether the color component of the intra prediction unit of the current coding unit is a luminance component or a chrominance component. Specifically, the color component may include an R component, a G component, a B component, etc. in addition to the luminance component and the chrominance component, and the present disclosure does not limit this. The intra prediction mode information is information for indicating the intra prediction mode. The reference pixel information is information for indicating the reference pixel of the intra prediction unit.
[0136] In an exemplary embodiment of the present disclosure, specifically, the encoded reconstructed pixels in the upper row and left column immediately adjacent to the intra-frame prediction unit can be used as reference pixels, or the reconstructed pixels in the upper rows and left columns can be used, and the present disclosure does not limit this.
[0137] In step S1002, a linear interpolation filter for intra prediction is determined according to color component information, reference pixel information, and intra prediction mode information.
[0138] It should be noted that the decoding end and the encoding end should adopt the same method to select the linear interpolation filter for intra-frame prediction. When determining the linear interpolation filter for intra-frame prediction, the linear interpolation filter can be selected from a set of candidate linear interpolation filters. Here, the index value of the linear interpolation filter in the set of candidate linear interpolation filters can be 0 to I, where I is a positive integer.
[0139] In step S1003, the prediction value of each pixel point in the intra prediction unit in the intra prediction mode is calculated according to the reference pixel information and the determined linear interpolation filter.
[0140] In an exemplary embodiment of the present disclosure, specifically, when the color component of the intra prediction unit is a luminance component, the prediction value here may be a luminance prediction value. When the color component of the intra prediction unit is a chrominance component, the prediction value here may be a chrominance prediction value. It should be understood that the prediction value here may also be a prediction value of the R, G, B color components.
[0141] In step S1004, a prediction mode is selected for encoding according to the prediction value.
[0142] In an exemplary embodiment of the present disclosure, specifically, when a prediction mode is selected for encoding based on a prediction value, the residual value between the predicted value of each pixel point in the intra-frame prediction unit in the intra-frame prediction mode and the original value of each pixel point in the intra-frame prediction unit can be first calculated, and the residual value can be transformed and quantized to obtain residual information, and then all intra-frame prediction modes of each intra-frame prediction unit and all inter-frame prediction modes of each inter-frame prediction unit of the current coding unit are traversed, and the prediction mode with the smallest rate-distortion cost is selected as the final prediction mode. Thereafter, the final prediction mode information and the residual information are encoded.
[0143] Fig.11 A flowchart of a decoding method according to an exemplary embodiment of the present disclosure is shown.
[0144] Reference Fig.11 In step S1101, an intra prediction unit in a current decoding unit is determined, and intra prediction unit information of the intra prediction unit is obtained. Here, the intra prediction unit information includes at least intra prediction mode information, reference pixel information, and color component information.
[0145] In an exemplary embodiment of the present disclosure, the color component information is information about whether the color component of the intra prediction unit of the current coding unit is a luminance component or a chrominance component. Specifically, the color component may include an R component, a G component, a B component, etc. in addition to the luminance component and the chrominance component, and the present disclosure does not limit this. The intra prediction mode information is information for indicating the intra prediction mode. The reference pixel information is information for indicating the reference pixel of the intra prediction unit.
[0146] In an exemplary embodiment of the present disclosure, specifically, the decoded reconstructed pixels in the upper row and left column immediately adjacent to the intra-frame prediction unit can be used as reference pixels, or the reconstructed pixels in the upper rows and left columns can be used, and the present disclosure does not limit this.
[0147] In step S1102, a linear interpolation filter for intra prediction is determined according to color component information, reference pixel information, and intra prediction mode information.
[0148] It should be noted that the decoding end and the encoding end should adopt the same method to select the linear interpolation filter for intra-frame prediction.
[0149] In an exemplary embodiment of the present disclosure, when determining a linear interpolation filter for intra-frame prediction according to color component information, reference pixel information, and intra-frame prediction mode information, it is possible to first determine whether the intra-frame prediction mode of the intra-frame prediction unit is an intra-frame angle prediction mode according to the intra-frame prediction mode information, and when the intra-frame prediction mode is an intra-frame angle prediction mode, determine whether the intra-frame prediction unit is a luminance component prediction unit or a chrominance component prediction unit according to the color component information, and select a linear interpolation filter from a candidate linear interpolation filter set as a linear interpolation filter for intra-frame prediction according to the reference pixel information of the intra-frame prediction unit and the determination result of whether the intra-frame prediction unit is a luminance component prediction unit or a chrominance component prediction unit. Here, the candidate linear interpolation filter set is pre-defined consistently at the encoding end and the decoding end, and the index value of the linear interpolation filter in the candidate linear interpolation filter set can be 0 to I, where I is a positive integer. For example, the candidate interpolation filter set may include 3 linear interpolation filters, and the index values are 0, 1, and 2 respectively according to the degree of smoothing filtering from weak to strong. For example, the candidate interpolation filter set may include 5 linear interpolation filters, and the index values are 0, 1, 2, 3, and 4 respectively according to the degree of smoothing filtering from weak to strong. It should be understood that the number of filters in the candidate interpolation filter set can be any number, and the present disclosure does not limit this. The strength of the filter smoothing filtering is determined by the coefficient of the filter, and the present disclosure does not limit the specific value of the coefficient of the filter.
[0150] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter from a set of candidate linear interpolation filters as a linear interpolation filter for intra-frame prediction, a possible implementation method is: selecting the linear interpolation filter for intra-frame prediction based on the distance between a pixel point in an intra-frame prediction unit and a reference pixel point.
[0151] In an exemplary embodiment of the present disclosure, specifically, a reference pixel may be first obtained according to an intra-frame prediction mode, and there are two possibilities for the obtained reference pixel: the reference pixel is a row of encoded reconstructed pixels above the intra-frame prediction unit, or the reference pixel is a column of encoded reconstructed pixels to the left of the intra-frame prediction unit.
[0152] In one example, the candidate interpolation filter set includes three linear interpolation filters, and the index values of the three linear interpolation filters are 0, 1, and 2 respectively according to the degree of smoothing filtering from weak to strong.
[0153] In an exemplary embodiment of the present disclosure, when the intra-frame prediction unit is a luminance component prediction unit, when the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 0 is selected for the pixels of the first N1 rows in the intra-frame prediction unit from top to bottom, a linear interpolation filter with an index value of 1 is selected for the pixels of the next N2 rows, and a linear interpolation filter with an index value of 2 is selected for the pixels of the next rows. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 0 is selected for the pixels of the first N3 columns in the intra-frame prediction unit from left to right, a linear interpolation filter with an index value of 1 is selected for the pixels of the next N4 columns, and a linear interpolation filter with an index value of 2 is selected for the pixels of the next columns. When the intra-frame prediction unit is a chrominance component prediction unit, a linear interpolation filter with an index value of 2 is selected for all pixels in the intra-frame prediction unit.
[0154] In this case, for example, when the intra prediction unit is a luminance component prediction unit, when the reference pixel is an upper reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first row of pixels in the intra prediction unit from top to bottom, a linear interpolation filter with an index value of 1 may be selected for the second row of pixels, and a linear interpolation filter with an index value of 2 may be selected for the other rows of pixels. When the reference pixel is a left reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first column of pixels in the intra prediction unit from left to right, a linear interpolation filter with an index value of 1 may be selected for the second column of pixels, and a linear interpolation filter with an index value of 2 may be selected for the other columns of pixels.
[0155] It should be understood that, in addition to the first row or column using one linear interpolation filter, the second row or column using one linear interpolation filter, and the other rows or columns using one linear interpolation filter, it can also be, for example, the first and second rows or columns using one linear interpolation filter, the third and fourth rows or columns using one linear interpolation filter, and the other rows or columns using one linear interpolation filter. That is, N1≥1, N2≥1, N3≥1, N4≥1 and N1, N2, N3, N4 are positive integers.
[0156] In an exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance component prediction unit, a linear interpolation filter with an index value of 2 is selected for all pixels in the intra prediction unit.
[0157] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance component prediction unit, a linear interpolation filter with an index value of 0 is selected for all pixels in the intra prediction unit.
[0158] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chroma component prediction unit, when the reference pixel is an upper reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first and second rows of pixels in the intra prediction unit from top to bottom, and a linear interpolation filter with an index value of 1 may be selected for the other rows of pixels. When the reference pixel is a left reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first and second columns of pixels in the intra prediction unit from left to right, and a linear interpolation filter with an index value of 1 may be selected for the other columns of pixels.
[0159] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chroma component prediction unit, when the reference pixel is an upper reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first row of pixels in the intra prediction unit from top to bottom, and a linear interpolation filter with an index value of 1 may be selected for the other rows of pixels. When the reference pixel is a left reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first column of pixels in the intra prediction unit from left to right, and a linear interpolation filter with an index value of 1 may be selected for the other columns of pixels.
[0160] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chroma component prediction unit, when the reference pixel is an upper reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first row of pixels in the intra prediction unit from top to bottom, a linear interpolation filter with an index value of 1 may be selected for the second row of pixels, and a linear interpolation filter with an index value of 2 may be selected for the other rows of pixels. When the reference pixel is a left reconstructed pixel, a linear interpolation filter with an index value of 0 may be selected for the first column of pixels in the intra prediction unit from left to right, a linear interpolation filter with an index value of 1 may be selected for the second column of pixels, and a linear interpolation filter with an index value of 2 may be selected for the other columns of pixels.
[0161] In another example, the candidate linear interpolation filter set includes 5 filters, and the index values are 0, 1, 2, 3, and 4 from weak to strong according to the degree of smoothing filtering.
[0162] In this case, for example, when the intra-frame prediction unit is a luminance component prediction unit, when the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 0 may be selected for the first row of pixels in the intra-frame prediction unit from top to bottom, a linear interpolation filter with an index value of 2 may be selected for the second row of pixels, and a linear interpolation filter with an index value of 4 may be selected for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 0 may be selected for the first column of pixels in the intra-frame prediction unit from left to right, a linear interpolation filter with an index value of 2 may be selected for the second column of pixels, and a linear interpolation filter with an index value of 4 may be selected for the other columns of pixels.
[0163] For example, when the intra prediction unit is a chroma component prediction unit, when the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 1 may be selected for the first row of pixels in the intra prediction unit from top to bottom, a linear interpolation filter with an index value of 3 may be selected for the second row of pixels, and a linear interpolation filter with an index value of 4 may be selected for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 1 may be selected for the first column of pixels in the intra prediction unit from left to right, a linear interpolation filter with an index value of 3 may be selected for the second column of pixels, and a linear interpolation filter with an index value of 4 may be selected for the other columns of pixels.
[0164] For example, when the intra prediction unit is a luminance component prediction unit, when the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 0 may be selected for the first and second rows of pixels in the intra prediction unit from top to bottom, and a linear interpolation filter with an index value of 4 may be selected for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 0 may be selected for the first and second columns of pixels in the intra prediction unit from left to right, and a linear interpolation filter with an index value of 4 may be selected for the other columns of pixels.
[0165] When the intra prediction unit is a chroma component prediction unit, when the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 3 may be selected for the first row of pixels in the intra prediction unit from top to bottom, and a linear interpolation filter with an index value of 4 may be selected for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 3 may be selected for the first column of pixels in the intra prediction unit from left to right, and a linear interpolation filter with an index value of 4 may be selected for the other columns of pixels.
[0166] The specific distance value between the pixel point in the intra prediction unit and the reference pixel point (i.e., the row / column), as well as the index value of the selected filter, are not limited here. However, the principle to be followed is that the smoothness of the filter selected for the predicted pixel closer to the reference pixel is weaker, and the smoothness of the filter selected for the predicted pixel farther from the reference pixel is stronger. It is possible that the luminance component prediction unit and the chrominance component prediction unit select the same filter.
[0167] In an exemplary embodiment of the present disclosure, the intra prediction unit information may further include width and height information of the intra prediction unit. Therefore, when selecting a linear interpolation filter from a set of candidate linear interpolation filters as a linear interpolation filter for intra prediction, another possible implementation method is to select a linear interpolation filter for intra prediction based on reference pixel information and width and height information of the intra prediction unit.
[0168] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter as a linear interpolation filter for intra-frame prediction from a set of candidate linear interpolation filters, the reference pixels of the intra-frame prediction unit can be first determined based on reference pixel information, and then a linear interpolation filter can be selected for each row of pixels or each column of pixels of the intra-frame prediction unit based on the width and height information of the intra-frame prediction unit and the determined reference pixels.
[0169] In an exemplary embodiment of the present disclosure, when the intra prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel above the intra prediction unit, when a linear interpolation filter is selected for each row of pixels of the intra prediction unit, when the width of the intra prediction unit is less than or equal to a first threshold, a linear interpolation filter having an index value of the first index value M1 is selected for all pixels in the intra prediction unit, and the first threshold value ∈[2 2 ,2 7 ], and is an exponential multiple of 2; when the width of the intra-frame prediction unit is greater than the first threshold, for the pixel points of the first number of rows in the intra-frame prediction unit that are sequentially arranged from top to bottom, a linear interpolation filter with an index value of the second index value M2 is selected, and for the pixel points of the second number of rows that follow, a linear interpolation filter with an index value of M2+x is selected. 1 The linear interpolation filter selects the index value M2+y for the pixel points in the subsequent rows 1 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 1 ≥x 1 >0, I≥M1>M2≥0.
[0170] In an exemplary embodiment of the present disclosure, when the intra prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel on the left of the intra prediction unit, when a linear interpolation filter is selected for each column of pixels of the intra prediction unit, when the height of the intra prediction unit is less than or equal to the second threshold, a linear interpolation filter having an index value of the third index value M3 is selected for all pixels in the intra prediction unit, and the second threshold ∈[2 2 ,2 7 ], and is an exponential multiple of 2; when the height of the intra-frame prediction unit is greater than the second threshold, for the pixel points of the third number of columns in the intra-frame prediction unit that are ordered from left to right, a linear interpolation filter with an index value of the fourth index value M4 is selected, and for the pixel points of the fourth number of columns after that, an index value of M4+x is selected. 2 The linear interpolation filter selects the index value M4+y for the pixel points in the subsequent columns 2 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 2 ≥x 2 >0, I≥M3>M4≥0.
[0171] In an exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel above the intra prediction unit, when a linear interpolation filter is selected for each row of pixels of the intra prediction unit, when the width of the intra prediction unit is less than or equal to a third threshold, a linear interpolation filter having an index value of a fifth index value M5 is selected for all pixels in the intra prediction unit, and the third threshold ∈[2 1 ,2 6 ], and is an exponential multiple of 2; when the width of the intra-frame prediction unit is greater than the third threshold, for the pixel points of the fifth number of rows in the intra-frame prediction unit in order from top to bottom, a linear interpolation filter with an index value of the sixth index value M6 is selected, and for the pixel points of the subsequent rows, an index value of M6+x is selected. 3 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 3 >0, I≥M5>M6≥0.
[0172] In an exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel on the left of the intra prediction unit, when a linear interpolation filter is selected for each column of pixels of the intra prediction unit, when the height of the intra prediction unit is less than or equal to the fourth threshold, a linear interpolation filter having an index value of the seventh index value M7 is selected for all pixels in the intra prediction unit, and the fourth threshold ∈[2 1 ,2 6 ], and is an exponential multiple of 2; when the height of the intra-frame prediction unit is greater than the fourth threshold, for the pixel points of the sixth number of columns in the intra-frame prediction unit that are ordered from left to right, a linear interpolation filter with an index value of the eighth index value M8 is selected, and for the pixel points of the subsequent columns, an index value of M8+x is selected. 4 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 4 >0, I≥M7>M8≥0.
[0173] For example, in one example, the candidate interpolation filter set includes three linear interpolation filters, and the index values of the three linear interpolation filters are 0, 1, and 2 respectively according to the degree of smoothing filtering from weak to strong.
[0174] In this case, when the intra-frame prediction unit is a luminance component prediction unit, when the reference pixel is the reconstructed pixel above, if the width of the intra-frame prediction unit is less than or equal to 8 (it may also be other thresholds, for example, 4, which is not limited here), a linear interpolation filter with an index value of 2 is selected for all pixels in the intra-frame prediction unit. If the width of the intra-frame prediction unit is greater than 8, a linear interpolation filter with an index value of 0 is selected for the first row of pixels in the intra-frame prediction unit from top to bottom, a linear interpolation filter with an index value of 1 is selected for the second row of pixels, and a linear interpolation filter with an index value of 2 is selected for the other rows of pixels. Alternatively, if the width of the intra-frame prediction unit is greater than 8, a linear interpolation filter with an index value of 0 is selected for the first row of pixels in the intra-frame prediction unit from top to bottom, and a linear interpolation filter with an index value of 1 or 2 is selected for the other rows of pixels. Alternatively, if the width of the intra-frame prediction unit is greater than 8, a linear interpolation filter with an index value of 0 is selected for the first row to, for example, the third row of pixels in the intra-frame prediction unit from top to bottom, and a linear interpolation filter with an index value of 1 or 2 is selected for the pixels in other rows. When the reference pixel is the reconstructed pixel on the left, if the height of the intra-frame prediction unit is less than or equal to 8 (it can also be other thresholds, such as 4, which is not limited here), a linear interpolation filter with an index value of 2 is selected for all pixels in the intra-frame prediction unit. If the height of the intra-frame prediction unit is greater than 8, a linear interpolation filter with an index value of 0 is selected for the first column of pixels in the intra-frame prediction unit from left to right, a linear interpolation filter with an index value of 1 is selected for the second column of pixels, and a linear interpolation filter with an index value of 2 is selected for the pixels in other columns. Alternatively, if the height of the intra-frame prediction unit is greater than 8, a linear interpolation filter with an index value of 0 is selected for the first column of pixels in the intra-frame prediction unit from left to right, and a linear interpolation filter with an index value of 1 or 2 is selected for the pixels in other columns. Alternatively, if the height of the intra-frame prediction unit is greater than 8, a linear interpolation filter with an index value of 0 is selected for the first column to, for example, the third column of pixels in the intra-frame prediction unit from left to right, and a linear interpolation filter with an index value of 1 or 2 is selected for the other columns of pixels.
[0175] When the intra prediction unit is a chroma component prediction unit, when the reference pixel is the reconstructed pixel above, if the width of the intra prediction unit is less than or equal to 4 (it can also be other thresholds, such as 2, which is not limited here), a linear interpolation filter with an index value of 2 is selected for all pixels in the intra prediction unit. If the width of the intra prediction unit is greater than 4, a linear interpolation filter with an index value of 1 is selected for the first row of pixels in the intra prediction unit from top to bottom, and a linear interpolation filter with an index value of 2 is selected for the other rows of pixels. Alternatively, if the width of the intra prediction unit is greater than 4, a linear interpolation filter with an index value of 1 is selected for the first row to, for example, the third row of pixels in the intra prediction unit from top to bottom, and a linear interpolation filter with an index value of 2 is selected for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, if the height of the intra prediction unit is less than or equal to 4 (it can also be other thresholds, such as 2, which is not limited here), a linear interpolation filter with an index value of 2 is selected for all pixels in the intra prediction unit. If the height of the intra prediction unit is greater than 4, a linear interpolation filter with an index value of 1 is selected for the first column of pixels in the intra prediction unit from left to right, and a linear interpolation filter with an index value of 2 is selected for the other columns of pixels. Alternatively, if the height of the intra prediction unit is greater than 4, a linear interpolation filter with an index value of 1 is selected for the first column to, for example, the third column of pixels in the intra prediction unit from left to right, and a linear interpolation filter with an index value of 2 is selected for the other columns of pixels.
[0176] It should be understood that, in addition to the first row or column using a linear interpolation filter, the second row or column using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, it can also be, for example, the first and second rows or columns using a linear interpolation filter, the third and fourth rows or columns using a linear interpolation filter, and the other rows or columns using a linear interpolation filter. In addition to the first row or column using a linear interpolation filter, the second row or column using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, it can also be, for example, the first and second rows or columns using a linear interpolation filter, the third and fourth rows or columns using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, it can also be, for example, the first to third rows or columns using a linear interpolation filter, the fourth to sixth rows or columns using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, etc.
[0177] In an exemplary embodiment of the present disclosure, when a linear interpolation filter is selected from a candidate linear interpolation filter set as a linear interpolation filter for intra-frame prediction, another possible implementation method is: selecting the linear interpolation filter for intra-frame prediction according to texture complexity.
[0178] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter as a linear interpolation filter for intra-frame prediction from a set of candidate linear interpolation filters, the texture complexity of the intra-frame prediction unit can be first calculated to determine whether the texture of the intra-frame prediction unit is complex or smooth, and then the linear interpolation filter for intra-frame prediction is selected based on whether the texture of the intra-frame prediction unit is complex or smooth.
[0179] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter for intra-frame prediction according to whether the texture of the intra-frame prediction unit is complex or smooth, when the intra-frame prediction unit is a luminance component prediction unit and the texture is smooth, a linear interpolation filter with an index value of the ninth index value M9 is selected; when the intra-frame prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, a linear interpolation filter with an index value of the tenth index value M10 is selected for the pixel points of the seventh number of rows in the order from top to bottom of the intra-frame prediction unit, and a linear interpolation filter with an index value of M10+x is selected for the pixel points of the eighth number of rows thereafter. 5 The linear interpolation filter selects the index value M10+y for the pixel points in the subsequent rows. 5 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 5 ≥x 5 >0, I≥M9>M10≥0; when the intra prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the ninth number of columns in the intra prediction unit from left to right, select the linear interpolation filter with the index value of the eleventh index value M11, and for the pixel points of the tenth number of columns after that, select the linear interpolation filter with the index value of M11+x 6 The linear interpolation filter selects the index value M11+y for the pixel points in the subsequent columns 6 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 6 ≥x 6 >0, I≥M9>M11≥0.
[0180] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter for intra-frame prediction according to whether the texture of the intra-frame prediction unit is complex or smooth, when the intra-frame prediction unit is a chrominance component prediction unit and the texture is smooth, a linear interpolation filter with an index value of the twelfth index value M12 is selected; when the intra-frame prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, a linear interpolation filter with an index value of the thirteenth index value M13 is selected for the pixel points of the eleventh number of rows in the order from top to bottom of the intra-frame prediction unit, and a linear interpolation filter with an index value of M13+x is selected for the pixel points of the subsequent rows. 7 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 7 >0, I≥M12>M13≥0; when the intra prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the twelfth column of the intra prediction unit in order from left to right, select the linear interpolation filter with the index value of the fourteenth index value M14, and for the pixel points of the subsequent columns, select the linear interpolation filter with the index value of M14+x 8 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 8 >0, I≥M12>M14≥0.
[0181] For example, in one example, the candidate interpolation filter set includes three linear interpolation filters, and the index values of the three linear interpolation filters are 0, 1, and 2 respectively according to the degree of smoothing filtering from weak to strong.
[0182] In this case, when the intra-frame prediction unit is a luminance component prediction unit, the texture complexity of the intra-frame prediction unit is first calculated. Texture complexity can also be called texture smoothness, or other metric terms that represent texture characteristics. The texture complexity (smoothness) can be determined by calculating the difference value of the reference pixel and comparing it with the set threshold. It can also be obtained by calculating other values, which are not limited here. The method for calculating the reference pixel difference value can be any of the following three methods, or other methods, which are not limited here:
[0183] Method 1: Figure 7 As shown, using the formula Calculate the difference value v between the w reference pixels above and the h reference pixels on the left. Here, ai is the reference pixel value, avg is the average value of the reference pixel values, and w and h are the width and height of the intra prediction unit, respectively.
[0184] Method 2: Figure 8As shown, using the formula Calculate the difference value v between the w reference pixels above and the h reference pixels on the left. That is, take the reference pixels in the left column and the upper row as a group of pixels, use the (-1, 0, 1) template to subtract the absolute value of each pixel, and then calculate the average value.
[0185] Method three, such as Fig. 9 As shown, using the formula Sample and calculate the difference value v between the 3 reference pixels above (U0, Uw / 2, Uw) and the 3 reference pixels on the left (L0, Lh / 2, Lh). Here, ai is the value of the reference pixel (U0, Uw / 2, Uw, L0, Lh / 2, Lh), avg is the average value of the reference pixel value, and w and h are the width and height of the intra prediction unit respectively.
[0186] After calculating the difference value v of the reference pixel, it is compared with the set threshold. If v is less than the threshold, the intra-frame prediction unit is a texture smooth unit. If v is greater than or equal to the threshold, the intra-frame prediction unit is a texture complex unit.
[0187] For the intra prediction unit with smooth texture, directly select the linear interpolation filter with index value 2. For the intra prediction unit with complex texture, when the reference pixel is the reconstructed pixel above, select the linear interpolation filter with index value 0 for the first row of pixels in the intra prediction unit from top to bottom, select the linear interpolation filter with index value 1 for the second row of pixels, and select the linear interpolation filter with index value 2 for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, select the linear interpolation filter with index value 0 for the first column of pixels in the intra prediction unit from left to right, select the linear interpolation filter with index value 1 for the second column of pixels, and select the linear interpolation filter with index value 2 for the other columns of pixels.
[0188] When the intra prediction unit is a chrominance component prediction unit, the texture complexity of the intra prediction unit is first calculated in the same way as the luminance component prediction unit, except that the reference pixel is the corresponding chrominance reconstruction pixel.
[0189] After calculating the difference value v of the reference pixel, it is compared with the set threshold. If v is less than the threshold, the intra-frame prediction unit is a texture smooth unit; if v is greater than or equal to the threshold, the intra-frame prediction unit is a texture complex unit.
[0190] For the smooth texture intra prediction unit, directly select the linear interpolation filter with an index value of 2. For the complex texture intra prediction unit, when the reference pixel is the reconstructed pixel above, select the linear interpolation filter with an index value of 1 for the first row of pixels in the intra prediction unit from top to bottom, and select the linear interpolation filter with an index value of 2 for the other rows of pixels. When the reference pixel is the reconstructed pixel on the left, select the linear interpolation filter with an index value of 1 for the first column of pixels in the intra prediction unit from left to right, and select the linear interpolation filter with an index value of 2 for the other columns of pixels.
[0191] It should be understood that, in addition to the first row or column using a linear interpolation filter, the second row or column using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, it can also be, for example, the first and second rows or columns using a linear interpolation filter, the third and fourth rows or columns using a linear interpolation filter, and the other rows or columns using a linear interpolation filter. In addition to the first row or column using a linear interpolation filter, the second row or column using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, it can also be, for example, the first and second rows or columns using a linear interpolation filter, the third and fourth rows or columns using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, it can also be, for example, the first to third rows or columns using a linear interpolation filter, the fourth to sixth rows or columns using a linear interpolation filter, and the other rows or columns using a linear interpolation filter, etc.
[0192] In step S1103, the prediction value of each pixel point in the intra prediction unit in the intra prediction mode is calculated according to the reference pixel information and the determined linear interpolation filter.
[0193] After the linear interpolation filter for intra-frame prediction is determined in step S1102, in step S1103, the linear interpolation filter and reference pixel information obtained in step S1102 are used to generate a linear interpolation filter according to formula p x,y =f k,0 ×a -1 +f k,1 ×a 0 +f k,2 ×a 1 +f k,3 ×a 2 , 0≤i≤3 calculates the predicted value of each pixel in the intra prediction unit in the intra prediction mode. Here, p x,y is the predicted value of the pixel to be predicted, x and y are the row and column coordinates of the pixel, k is the index value of the linear interpolation filter, and f k,i is the linear interpolation filter coefficient, i=0-3, and in other implementation methods, i may also be in other ranges, which is not limited here. iis the reference pixel value at the integer pixel position. When the reference pixel is the reconstructed pixel above, a 0 For x,y The reference pixel located at the integer pixel position in the same column (column x), a -1 is the reference pixel at the integer pixel position (column x-1), 1 is the reference pixel at the integer pixel position of (column x+1), a 2 is the reference pixel at the integer pixel position of (column x+2). When the reference pixel is the reconstructed pixel on the left, a 0 For x,y The reference pixel located at the integer pixel position in the same row (row x), a -1 is the reference pixel at the integer pixel position (row x-1), a 1 is the reference pixel at the integer pixel position of (row x+1), a 2 is the reference pixel located at the integer pixel position of (row x+2).
[0194] In an exemplary embodiment of the present disclosure, specifically, when the color component of the intra prediction unit is a luminance component, the prediction value here may be a luminance prediction value. When the color component of the intra prediction unit is a chrominance component, the prediction value here may be a chrominance prediction value. It should be understood that the prediction value here may also be a prediction value of the R, G, B color components.
[0195] In step S1104, a reconstructed value of the current decoding unit is calculated according to the predicted value.
[0196] In an exemplary embodiment of the present disclosure, specifically, when calculating the reconstructed value of the current decoding unit according to the predicted value, the residual value between the predicted value of each pixel point in the intra-frame prediction unit in the intra-frame prediction mode and the original value of each pixel point in the intra-frame prediction unit can be first determined according to the residual information of the intra-frame prediction unit (for example, the residual information obtained from the code stream can be dequantized and inversely transformed to obtain the residual value), and then the reconstructed value of the current decoding unit is calculated according to the predicted value of each pixel point in the intra-frame prediction unit in the intra-frame prediction mode and the residual value.
[0197] The above has been combined with Figures 1 to Fig.11 The intra-frame prediction method and the coding and decoding method based on the intra-frame prediction according to the exemplary embodiments of the present disclosure are described. Figure 12 to Figure 14 An intra prediction apparatus, a coding apparatus, and units thereof according to exemplary embodiments of the present disclosure are described.
[0198] Fig.12 A block diagram of an intra prediction apparatus according to an exemplary embodiment of the present disclosure is shown.
[0199] Reference Fig.12 , the intra-frame prediction device includes an information acquisition unit 121, a filter determination unit 122 and a prediction value calculation unit 123.
[0200] The information acquisition unit 121 is configured to determine an intra prediction unit and acquire intra prediction unit information of the intra prediction unit. Here, the intra prediction unit information at least includes intra prediction mode information, reference pixel information and color component information.
[0201] In an exemplary embodiment of the present disclosure, the color component information is information about whether the color component of the intra prediction unit is a luminance component or a chrominance component. Specifically, in addition to the luminance component and the chrominance component, the color component may also include an R component, a G component, a B component, etc., and the present disclosure does not limit this. The intra prediction mode information is information for indicating the intra prediction mode. The reference pixel information is information for indicating the reference pixel of the intra prediction unit.
[0202] The filter determination unit 122 is configured to determine a linear interpolation filter for intra prediction according to color component information, reference pixel information, and intra prediction mode information.
[0203] In an exemplary embodiment of the present disclosure, when determining a linear interpolation filter for intra prediction, a linear interpolation filter may be selected from a candidate linear interpolation filter set. Here, the index value of the linear interpolation filter in the candidate linear interpolation filter set may be 0 to I, where I is a positive integer.
[0204] For example, the candidate interpolation filter set may include 3 linear interpolation filters, and the index values are 0, 1, and 2 respectively according to the degree of smooth filtering from weak to strong. For example, the candidate interpolation filter set may include 5 linear interpolation filters, and the index values are 0, 1, 2, 3, and 4 respectively according to the degree of smooth filtering from weak to strong. It should be understood that the number of filters in the candidate interpolation filter set can be any number, and the present disclosure does not limit this. The strength of the filter smooth filtering is determined by the coefficient of the filter, and the present disclosure does not limit the specific value of the coefficient of the filter.
[0205] In an exemplary embodiment of the present disclosure, the filter determination unit 122 may be configured to: determine whether the intra-prediction mode of the intra-prediction unit is an intra-angle prediction mode according to the intra-prediction mode information; when the intra-prediction mode is the intra-angle prediction mode, determine whether the intra-prediction unit is a luminance component prediction unit or a chrominance component prediction unit according to the color component information; and select a linear interpolation filter from a set of candidate linear interpolation filters as a linear interpolation filter for intra-prediction according to the reference pixel information of the intra-prediction unit and the determination result of whether the intra-prediction unit is a luminance component prediction unit or a chrominance component prediction unit.
[0206] In an exemplary embodiment of the present disclosure, the intra prediction unit information may further include width and height information of the intra prediction unit. The filter determination unit 122 may further be configured to: determine the reference pixel of the intra prediction unit according to the reference pixel information; and select a linear interpolation filter for each row or column of pixels of the intra prediction unit according to the width and height information of the intra prediction unit and the determined reference pixel.
[0207] In an exemplary embodiment of the present disclosure, the filter determination unit 122 may also be configured to: when the intra prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel above the intra prediction unit, when the width of the intra prediction unit is less than or equal to a first threshold, select a linear interpolation filter with an index value of the first index value M1 for all pixels in the intra prediction unit, and the first threshold value ∈[2 2 ,2 7 ], and is an exponential multiple of 2; when the width of the intra-frame prediction unit is greater than the first threshold, for the pixel points of the first number of rows in the intra-frame prediction unit that are sequentially arranged from top to bottom, a linear interpolation filter with an index value of the second index value M2 is selected, and for the pixel points of the second number of rows that follow, a linear interpolation filter with an index value of M2+x is selected. 1 The linear interpolation filter selects the index value M2+y for the pixel points in the subsequent rows 1 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 1 ≥x 1 >0, I≥M1>M2≥0.
[0208] In an exemplary embodiment of the present disclosure, the filter determination unit 122 may also be configured to: when the intra-frame prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel to the left of the intra-frame prediction unit, when the height of the intra-frame prediction unit is less than or equal to the second threshold, select a linear interpolation filter with an index value of the third index value M3 for all pixels in the intra-frame prediction unit, and the second threshold value ∈ [2 2 ,2 7 ], and is an exponential multiple of 2; when the height of the intra-frame prediction unit is greater than the second threshold, for the pixel points of the third number of columns in the intra-frame prediction unit that are ordered from left to right, a linear interpolation filter with an index value of the fourth index value M4 is selected, and for the pixel points of the fourth number of columns after that, an index value of M4+x is selected. 2 The linear interpolation filter selects the index value M4+y for the pixel points in the subsequent columns 2 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 2≥x 2 >0, I≥M3>M4≥0.
[0209] In an exemplary embodiment of the present disclosure, the filter determination unit 122 may be further configured to: when the intra prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel above the intra prediction unit, when the width of the intra prediction unit is less than or equal to the third threshold, select a linear interpolation filter with an index value of the fifth index value M5 for all pixels in the intra prediction unit, and the third threshold ∈[2 1 ,2 6 ], and is an exponential multiple of 2; when the width of the intra-frame prediction unit is greater than the third threshold, for the pixel points of the fifth number of rows in the intra-frame prediction unit in order from top to bottom, a linear interpolation filter with an index value of the sixth index value M6 is selected, and for the pixel points of the subsequent rows, an index value of M6+x is selected. 3 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 3 >0, I≥M5>M6≥0.
[0210] In an exemplary embodiment of the present disclosure, the filter determination unit 122 may be further configured to: when the intra prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel to the left of the intra prediction unit, when the height of the intra prediction unit is less than or equal to the fourth threshold, select a linear interpolation filter with an index value of the seventh index value M7 for all pixels in the intra prediction unit, and the fourth threshold ∈[2 1 ,2 6 ], and is an exponential multiple of 2; when the height of the intra-frame prediction unit is greater than the fourth threshold, for the pixel points of the sixth number of columns in the intra-frame prediction unit that are ordered from left to right, a linear interpolation filter with an index value of the eighth index value M8 is selected, and for the pixel points of the subsequent columns, an index value of M8+x is selected. 4 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 4 >0, I≥M7>M8≥0.
[0211] In an exemplary embodiment of the present disclosure, the filter determination unit 122 may also be configured to: calculate the texture complexity of the intra-frame prediction unit, determine whether the texture of the intra-frame prediction unit is complex or smooth; and select a linear interpolation filter for intra-frame prediction according to whether the texture of the intra-frame prediction unit is complex or smooth.
[0212] In an exemplary embodiment of the present disclosure, the filter determination unit 122 may also be configured to: when the intra-frame prediction unit is a luminance component prediction unit and the texture is smooth, select a linear interpolation filter with an index value of the ninth index value M9; when the intra-frame prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, select a linear interpolation filter with an index value of the tenth index value M10 for the seventh number of rows of pixels in the intra-frame prediction unit from top to bottom, and select a linear interpolation filter with an index value of M10+x for the eighth number of rows of pixels thereafter. 5 The linear interpolation filter selects the index value M10+y for the pixel points in the subsequent rows. 5 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 5 ≥x 5 >0, I≥M9>M10≥0; when the intra prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the ninth number of columns in the intra prediction unit from left to right, select the linear interpolation filter with the index value of the eleventh index value M11, and for the pixel points of the tenth number of columns after that, select the linear interpolation filter with the index value of M11+x 6 The linear interpolation filter selects the index value M11+y for the pixel points in the subsequent columns 6 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 6 ≥x 6 >0, I≥M9>M11≥0.
[0213] In an exemplary embodiment of the present disclosure, the filter determination unit 122 may also be configured to: when the intra-frame prediction unit is a chroma component prediction unit and the texture is smooth, select a linear interpolation filter with an index value of the twelfth index value M12; when the intra-frame prediction unit is a chroma component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, select a linear interpolation filter with an index value of the thirteenth index value M13 for the pixel points of the eleventh number of rows in the intra-frame prediction unit from top to bottom, and select a linear interpolation filter with an index value of M13+x for the pixel points of the subsequent rows. 7 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 7>0, I≥M12>M13≥0; when the intra prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the twelfth column of the intra prediction unit in order from left to right, select the linear interpolation filter with the index value of the fourteenth index value M14, and for the pixel points of the subsequent columns, select the linear interpolation filter with the index value of M14+x 8 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 8 >0, I≥M12>M14≥0.
[0214] The prediction value calculation unit 123 is configured to calculate the prediction value of each pixel point in the intra prediction unit in the intra prediction mode according to the reference pixel information and the determined linear interpolation filter.
[0215] In an exemplary embodiment of the present disclosure, specifically, when the color component of the intra prediction unit is a luminance component, the prediction value here may be a luminance prediction value. When the color component of the intra prediction unit is a chrominance component, the prediction value here may be a chrominance prediction value. It should be understood that the prediction value here may also be a prediction value of the R, G, B color components.
[0216] Fig.13 A block diagram of an encoding device according to an exemplary embodiment of the present disclosure is shown.
[0217] Reference Fig.13 , the encoding device includes an information acquisition unit 131, a filter determination unit 132, a prediction value calculation unit 133 and an encoding unit 134.
[0218] The information acquisition unit 131 is configured to determine the intra prediction unit in the current coding unit and acquire the intra prediction unit information of the intra prediction unit. Here, the intra prediction unit information at least includes intra prediction mode information, reference pixel information and color component information.
[0219] In an exemplary embodiment of the present disclosure, the color component information is information about whether the color component of the intra prediction unit of the current coding unit is a luminance component or a chrominance component. Specifically, the color component may include an R component, a G component, a B component, etc. in addition to the luminance component and the chrominance component, and the present disclosure does not limit this. The intra prediction mode information is information for indicating the intra prediction mode. The reference pixel information is information for indicating the reference pixel of the intra prediction unit.
[0220] In an exemplary embodiment of the present disclosure, specifically, the encoded reconstructed pixels in the upper row and left column immediately adjacent to the intra-frame prediction unit can be used as reference pixels, or the reconstructed pixels in the upper rows and left columns can be used, and the present disclosure does not limit this.
[0221] The filter determination unit 132 is configured to determine a linear interpolation filter for intra prediction according to color component information, reference pixel information, and intra prediction mode information.
[0222] It should be noted that the decoding end and the encoding end should adopt the same method to select the linear interpolation filter for intra-frame prediction. When determining the linear interpolation filter for intra-frame prediction, the linear interpolation filter can be selected from a set of candidate linear interpolation filters. Here, the index value of the linear interpolation filter in the set of candidate linear interpolation filters can be 0 to I, where I is a positive integer.
[0223] For example, the candidate interpolation filter set may include 3 linear interpolation filters, and the index values are 0, 1, and 2 respectively according to the degree of smooth filtering from weak to strong. For example, the candidate interpolation filter set may include 5 linear interpolation filters, and the index values are 0, 1, 2, 3, and 4 respectively according to the degree of smooth filtering from weak to strong. It should be understood that the number of filters in the candidate interpolation filter set can be any number, and the present disclosure does not limit this. The strength of the filter smooth filtering is determined by the coefficient of the filter, and the present disclosure does not limit the specific value of the coefficient of the filter.
[0224] The prediction value calculation unit 133 is configured to calculate the prediction value of each pixel point in the intra prediction unit in the intra prediction mode according to the reference pixel information and the determined linear interpolation filter.
[0225] In an exemplary embodiment of the present disclosure, specifically, when the color component of the intra prediction unit is a luminance component, the prediction value here may be a luminance prediction value. When the color component of the intra prediction unit is a chrominance component, the prediction value here may be a chrominance prediction value. It should be understood that the prediction value here may also be a prediction value of the R, G, B color components.
[0226] The encoding unit 134 is configured to select a prediction mode for encoding according to the prediction value.
[0227] In an exemplary embodiment of the present disclosure, specifically, the encoding unit 134 may first calculate the residual value between the predicted value of each pixel point in the intra-frame prediction unit under the intra-frame prediction mode and the original value of each pixel point in the intra-frame prediction unit, and transform and quantize the residual value to obtain residual information, and then traverse all intra-frame prediction modes of each intra-frame prediction unit and all inter-frame prediction modes of each inter-frame prediction unit of the current coding unit, select the prediction mode with the smallest rate-distortion cost as the final prediction mode, and then encode the final prediction mode information and the residual information.
[0228] Fig.14 A block diagram of a decoding device according to an exemplary embodiment of the present disclosure is shown.
[0229] Reference Fig.14 , the decoding device includes an information acquisition unit 141, a filter determination unit 142, a prediction value calculation unit 143 and a reconstruction value calculation unit 144.
[0230] The information acquisition unit 141 is configured to determine the intra prediction unit in the current decoding unit and acquire the intra prediction unit information of the intra prediction unit. Here, the intra prediction unit information includes at least intra prediction mode information, reference pixel information and color component information.
[0231] In an exemplary embodiment of the present disclosure, the color component information is information about whether the color component of the intra prediction unit of the current coding unit is a luminance component or a chrominance component. Specifically, the color component may include an R component, a G component, a B component, etc. in addition to the luminance component and the chrominance component, and the present disclosure does not limit this. The intra prediction mode information is information for indicating the intra prediction mode. The reference pixel information is information for indicating the reference pixel of the intra prediction unit.
[0232] In an exemplary embodiment of the present disclosure, specifically, the decoded reconstructed pixels in the upper row and left column immediately adjacent to the intra-frame prediction unit can be used as reference pixels, or the reconstructed pixels in the upper rows and left columns can be used, and the present disclosure does not limit this.
[0233] The filter determination unit 142 is configured to determine a linear interpolation filter for intra prediction according to color component information, reference pixel information, and intra prediction mode information.
[0234] It should be noted that the decoding end and the encoding end should adopt the same method to select the linear interpolation filter for intra-frame prediction.
[0235] In an exemplary embodiment of the present disclosure, when determining a linear interpolation filter for intra prediction, a linear interpolation filter may be selected from a candidate linear interpolation filter set. Here, the index value of the linear interpolation filter in the candidate linear interpolation filter set may be 0 to I, where I is a positive integer.
[0236] For example, the candidate interpolation filter set may include 3 linear interpolation filters, and the index values are 0, 1, and 2 respectively according to the degree of smooth filtering from weak to strong. For example, the candidate interpolation filter set may include 5 linear interpolation filters, and the index values are 0, 1, 2, 3, and 4 respectively according to the degree of smooth filtering from weak to strong. It should be understood that the number of filters in the candidate interpolation filter set can be any number, and the present disclosure does not limit this. The strength of the filter smooth filtering is determined by the coefficient of the filter, and the present disclosure does not limit the specific value of the coefficient of the filter.
[0237] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may be configured to: determine whether the intra-prediction mode of the intra-prediction unit is an intra-angle prediction mode according to the intra-prediction mode information; when the intra-prediction mode is the intra-angle prediction mode, determine whether the intra-prediction unit is a luminance component prediction unit or a chrominance component prediction unit according to the color component information; and select a linear interpolation filter from a set of candidate linear interpolation filters as a linear interpolation filter for intra-prediction according to the reference pixel information of the intra-prediction unit and the determination result of whether the intra-prediction unit is a luminance component prediction unit or a chrominance component prediction unit.
[0238] In an exemplary embodiment of the present disclosure, the intra prediction unit information may further include width and height information of the intra prediction unit. The filter determination unit 142 may further be configured to: determine the reference pixel of the intra prediction unit according to the reference pixel information; and select a linear interpolation filter for each row or column of pixels of the intra prediction unit according to the width and height information of the intra prediction unit and the determined reference pixel.
[0239] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may also be configured to: when the intra-frame prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel above the intra-frame prediction unit, when the width of the intra-frame prediction unit is less than or equal to the first threshold, select a linear interpolation filter with an index value of the first index value M1 for all pixels in the intra-frame prediction unit, and the first threshold value ∈ [2 2 ,2 7 ], and is an exponential multiple of 2; when the width of the intra-frame prediction unit is greater than the first threshold, for the pixel points of the first number of rows in the intra-frame prediction unit that are sequentially arranged from top to bottom, a linear interpolation filter with an index value of the second index value M2 is selected, and for the pixel points of the second number of rows that follow, a linear interpolation filter with an index value of M2+x is selected. 1The linear interpolation filter selects the index value M2+y for the pixel points in the subsequent rows 1 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 1 ≥x 1 >0, I≥M1>M2≥0.
[0240] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may also be configured to: when the intra-frame prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel to the left of the intra-frame prediction unit, when the height of the intra-frame prediction unit is less than or equal to the second threshold, select a linear interpolation filter with an index value of the third index value M3 for all pixels in the intra-frame prediction unit, and the second threshold ∈ [2 2 ,2 7 ], and is an exponential multiple of 2; when the height of the intra-frame prediction unit is greater than the second threshold, for the pixel points of the third number of columns in the intra-frame prediction unit that are ordered from left to right, a linear interpolation filter with an index value of the fourth index value M4 is selected, and for the pixel points of the fourth number of columns after that, an index value of M4+x is selected. 2 The linear interpolation filter selects the index value M4+y for the pixel points in the subsequent columns 2 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 2 ≥x 2 >0, I≥M3>M4≥0.
[0241] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may be further configured to: when the intra prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel above the intra prediction unit, when the width of the intra prediction unit is less than or equal to the third threshold, select a linear interpolation filter with an index value of the fifth index value M5 for all pixels in the intra prediction unit, and the third threshold ∈[2 1 ,2 6 ], and is an exponential multiple of 2; when the width of the intra-frame prediction unit is greater than the third threshold, for the pixel points of the fifth number of rows in the intra-frame prediction unit in order from top to bottom, a linear interpolation filter with an index value of the sixth index value M6 is selected, and for the pixel points of the subsequent rows, an index value of M6+x is selected. 3 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 3 >0, I≥M5>M6≥0.
[0242] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may also be configured to: when the intra prediction unit is a chrominance component prediction unit and the reference pixel is a reconstructed pixel to the left of the intra prediction unit, when the height of the intra prediction unit is less than or equal to the fourth threshold, select a linear interpolation filter with an index value of the seventh index value M7 for all pixels in the intra prediction unit, and the fourth threshold ∈ [2 1 ,2 6 ], and is an exponential multiple of 2; when the height of the intra-frame prediction unit is greater than the fourth threshold, for the pixel points of the sixth number of columns in the intra-frame prediction unit that are ordered from left to right, a linear interpolation filter with an index value of the eighth index value M8 is selected, and for the pixel points of the subsequent columns, an index value of M8+x is selected. 4 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 4 >0, I≥M7>M8≥0.
[0243] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may also be configured to: calculate the texture complexity of the intra-frame prediction unit, determine whether the texture of the intra-frame prediction unit is complex or smooth; and select a linear interpolation filter for intra-frame prediction according to whether the texture of the intra-frame prediction unit is complex or smooth.
[0244] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may also be configured to: when the intra-frame prediction unit is a luminance component prediction unit and the texture is smooth, select a linear interpolation filter with an index value of the ninth index value M9; when the intra-frame prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, select a linear interpolation filter with an index value of the tenth index value M10 for the seventh number of rows of pixels in the intra-frame prediction unit from top to bottom, and select a linear interpolation filter with an index value of M10+x for the eighth number of rows of pixels thereafter. 5 The linear interpolation filter selects the index value M10+y for the pixel points in the subsequent rows. 5 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 5 ≥x 5 >0, I≥M9>M10≥0; when the intra prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the ninth number of columns in the intra prediction unit from left to right, select the linear interpolation filter with the index value of the eleventh index value M11, and for the pixel points of the tenth number of columns after that, select the linear interpolation filter with the index value of M11+x 6The linear interpolation filter selects the index value M11+y for the pixel points in the subsequent columns 6 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, y 6 ≥x 6 >0, I≥M9>M11≥0.
[0245] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may also be configured to: when the intra-frame prediction unit is a chroma component prediction unit and the texture is smooth, select a linear interpolation filter with an index value of the twelfth index value M12; when the intra-frame prediction unit is a chroma component prediction unit and the texture is complex and the reference pixel is a reconstructed pixel above, select a linear interpolation filter with an index value of the thirteenth index value M13 for the pixel points of the eleventh number of rows in the intra-frame prediction unit from top to bottom, and select a linear interpolation filter with an index value of M13+x for the pixel points of the subsequent rows. 7 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 7 >0, I≥M12>M13≥0; when the intra prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the twelfth column of the intra prediction unit in order from left to right, select the linear interpolation filter with the index value of the fourteenth index value M14, and for the pixel points of the subsequent columns, select the linear interpolation filter with the index value of M14+x 8 wherein, when the linear interpolation filters in the candidate linear interpolation filter set have index values of 0 to I from weak to strong in terms of smoothing filtering degree, x 8 >0, I≥M12>M14≥0.
[0246] The prediction value calculation unit 143 is configured to calculate the prediction value of each pixel point in the intra prediction unit in the intra prediction mode according to the reference pixel information and the determined linear interpolation filter.
[0247] In an exemplary embodiment of the present disclosure, specifically, when the color component of the intra prediction unit is a luminance component, the prediction value here may be a luminance prediction value. When the color component of the intra prediction unit is a chrominance component, the prediction value here may be a chrominance prediction value. It should be understood that the prediction value here may also be a prediction value of the R, G, B color components.
[0248] The reconstruction value calculation unit 144 is configured to calculate a reconstruction value of a current decoding unit according to the prediction value.
[0249] In an exemplary embodiment of the present disclosure, specifically, the reconstruction value calculation unit 144 may first determine the residual value between the predicted value of each pixel point in the intra-frame prediction unit in the intra-frame prediction mode and the original value of each pixel point in the intra-frame prediction unit according to the residual information of the intra-frame prediction unit (for example, the residual information obtained from the code stream may be inverse quantized and inverse transformed to obtain the residual value), and then calculate the reconstruction value of the current decoding unit according to the predicted value of each pixel point in the intra-frame prediction unit in the intra-frame prediction mode and the residual value.
[0250] In addition, according to an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium on which a computer program is stored. When the computer program is executed, the encoding method according to the exemplary embodiment of the present disclosure is implemented.
[0251] In an exemplary embodiment of the present disclosure, the computer-readable storage medium may carry one or more programs, and when the computer program is executed, the following steps may be implemented: determining an intra-frame prediction unit, obtaining intra-frame prediction unit information of the intra-frame prediction unit, wherein the intra-frame prediction unit information includes at least intra-frame prediction mode information, reference pixel information and color component information; determining a linear interpolation filter for intra-frame prediction based on the color component information, reference pixel information and intra-frame prediction mode information; and calculating a prediction value of each pixel point in the intra-frame prediction unit under the intra-frame prediction mode based on the reference pixel information and the determined linear interpolation filter.
[0252] In another exemplary embodiment of the present disclosure, the computer-readable storage medium may carry one or more programs, and when the computer program is executed, the following steps can be implemented: determine the intra-frame prediction unit in the current coding unit, obtain the intra-frame prediction unit information of the intra-frame prediction unit, wherein the intra-frame prediction unit information includes at least intra-frame prediction mode information, reference pixel information and color component information; determine the linear interpolation filter for intra-frame prediction according to the color component information, reference pixel information and intra-frame prediction mode information; calculate the prediction value of each pixel point in the intra-frame prediction unit under the intra-frame prediction mode according to the reference pixel information and the determined linear interpolation filter; select the prediction mode for encoding according to the prediction value.
[0253] In another exemplary embodiment of the present disclosure, the computer-readable storage medium may carry one or more programs, and when the computer program is executed, the following steps can be implemented: determine the intra-frame prediction unit in the current decoding unit, obtain the intra-frame prediction unit information of the intra-frame prediction unit, wherein the intra-frame prediction unit information includes at least intra-frame prediction mode information, reference pixel information and color component information; determine the linear interpolation filter for intra-frame prediction according to the color component information, reference pixel information and intra-frame prediction mode information; calculate the predicted value of each pixel point in the intra-frame prediction unit under the intra-frame prediction mode according to the reference pixel information and the determined linear interpolation filter; calculate the reconstructed value of the current decoding unit according to the predicted value.
[0254] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In an embodiment of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a computer program that may be used by or in conjunction with an instruction execution system, device or device. The computer program contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof. The computer-readable storage medium may be contained in any device; it may also exist alone without being assembled into the device.
[0255] The above has been combined Figure 12 to Figure 14 The intra-frame prediction device and the encoding and decoding device according to the exemplary embodiments of the present disclosure are described. Fig.15 A computing device according to an exemplary embodiment of the present disclosure is described.
[0256] Fig.15 A schematic diagram showing a computing device according to an exemplary embodiment of the present disclosure.
[0257] Reference Fig.15 According to the exemplary embodiment of the present disclosure, the computing device 15 includes a memory 151 and a processor 152. The memory 151 stores a computer program. When the computer program is executed by the processor 152, the encoding method according to the exemplary embodiment of the present disclosure is implemented.
[0258] In an exemplary embodiment of the present disclosure, when the computer program is executed by the processor 152, the following steps can be implemented: determining an intra-frame prediction unit, obtaining intra-frame prediction unit information of the intra-frame prediction unit, wherein the intra-frame prediction unit information includes at least intra-frame prediction mode information, reference pixel information and color component information; determining a linear interpolation filter for intra-frame prediction based on the color component information, reference pixel information and intra-frame prediction mode information; and calculating a prediction value of each pixel point in the intra-frame prediction unit under the intra-frame prediction mode based on the reference pixel information and the determined linear interpolation filter.
[0259] In another exemplary embodiment of the present disclosure, when the computer program is executed by the processor 152, the following steps can be implemented: determine the intra-frame prediction unit in the current coding unit, obtain the intra-frame prediction unit information of the intra-frame prediction unit, wherein the intra-frame prediction unit information includes at least intra-frame prediction mode information, reference pixel information and color component information; determine the linear interpolation filter for intra-frame prediction according to the color component information, reference pixel information and intra-frame prediction mode information; calculate the prediction value of each pixel point in the intra-frame prediction unit under the intra-frame prediction mode according to the reference pixel information and the determined linear interpolation filter; and select the prediction mode for encoding according to the prediction value.
[0260] In another exemplary embodiment of the present disclosure, when the computer program is executed by the processor 152, the following steps can be implemented: determine the intra-frame prediction unit in the current decoding unit, obtain the intra-frame prediction unit information of the intra-frame prediction unit, wherein the intra-frame prediction unit information includes at least intra-frame prediction mode information, reference pixel information and color component information; determine the linear interpolation filter for intra-frame prediction according to the color component information, reference pixel information and intra-frame prediction mode information; calculate the predicted value of each pixel point in the intra-frame prediction unit under the intra-frame prediction mode according to the reference pixel information and the determined linear interpolation filter; calculate the reconstructed value of the current decoding unit according to the predicted value.
[0261] Fig.15 The computing device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0262] The above has been referred to Figures 1 to Fig.15 The intra-frame prediction method and device, and the coding and decoding method and device based on intra-frame prediction according to the exemplary embodiments of the present disclosure are described. However, it should be understood that: Figure 12 to Figure 14 The intra-frame prediction device, encoding device and units thereof shown in the figure may be respectively configured as software, hardware, firmware or any combination of the above items to perform specific functions. Fig.15 The computing device shown in is not limited to including the components shown above, but some components may be added or deleted as needed, and the above components may also be combined.
[0263] According to the intra-frame prediction method and device, and the coding and decoding method and device based on intra-frame prediction of the exemplary embodiments of the present disclosure, by using different intra-frame prediction linear interpolation filter selection methods for the intra-frame prediction units of the luminance component and the chrominance component according to the color component information and the intra-frame prediction mode information, the difference in texture characteristics between the chrominance component prediction unit and the luminance component prediction unit, that is, the fact that the chrominance component contains less texture details and high-frequency information than the luminance component, is fully considered, thereby improving the accuracy of intra-frame prediction, making the internal texture of the prediction unit more natural, and further making the energy of the image after encoding more concentrated, thereby improving the encoding efficiency.
[0264] While the present disclosure has been particularly shown and described with reference to exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure as defined by the following claims.
Claims
1. An intra-frame prediction method, comprising: Obtaining intra-frame prediction mode information of a luminance block of a current coding unit and intra-frame prediction mode information of a chrominance block of a current coding unit; When the color component of the current coding unit is the brightness component: Wherein, when the pixels of the upper row adjacent to the luminance block of the current coding unit are used as reference pixels according to the intra-frame prediction mode information of the luminance block, the first distance index indicates the vertical distance between the pixels of the upper row and the first pixel of the luminance block, and the second distance index indicates the vertical distance between the pixels of the upper row and the second pixel of the luminance block, Wherein, when the pixels in the left column adjacent to the luminance block of the current coding unit are used as reference pixels according to the intra-frame prediction mode information of the luminance block, the first distance index indicates the horizontal distance between the pixels in the left column and the first pixel of the luminance block, and the second distance index indicates the horizontal distance between the pixels in the left column and the second pixel of the luminance block, Wherein, the second distance index is greater than the first distance index, Determine a first linear interpolation filter for intra prediction for a first distance index equal to the first distance value, and determine a second linear interpolation filter for intra prediction for a second distance index greater than the first distance value; Obtaining a first predicted pixel corresponding to the first pixel of the luma block by applying a first linear interpolation filter to a first luma reference pixel corresponding to a position of a first pixel of the luma block determined based on intra-prediction mode information of the luma block, the first luma reference pixel being included in an upper row or left column of a first distance index from the first pixel of the luma block; and Obtaining a second predicted pixel corresponding to the second pixel of the luma block by applying a second linear interpolation filter to a second luma reference pixel corresponding to a position of a second pixel of the luma block determined based on the intra prediction mode information of the luma block, the second luma reference pixel being included in an upper row or a left column of a second distance index from the second pixel of the luma block; When the color component of the current coding unit is a chroma component: Wherein, when the pixel of the upper row adjacent to the chroma block of the current coding unit is used as a reference pixel according to the intra-frame prediction mode information of the chroma block, the third distance index indicates the vertical distance between the pixel of the upper row and the third pixel of the chroma block, and the fourth distance index indicates the vertical distance between the pixel of the upper row and the fourth pixel of the chroma block, Wherein, when the pixel in the left column adjacent to the chroma block of the current coding unit is used as a reference pixel according to the intra-frame prediction mode information of the chroma block, the third distance index indicates the horizontal distance between the pixel in the left column and the third pixel of the chroma block, and the fourth distance index indicates the horizontal distance between the pixel in the left column and the fourth pixel of the chroma block, Among them, the fourth distance index is greater than the third distance index, Determine a third linear interpolation filter for intra prediction for a third distance index less than or equal to the second distance value, and determine a fourth linear interpolation filter for intra prediction for a fourth distance index greater than the second distance value; Obtaining a third predicted pixel corresponding to a third pixel of the chroma block by applying a third linear interpolation filter to a first chroma reference pixel corresponding to a position of a third pixel of the chroma block determined based on intra-prediction mode information of the chroma block, the first chroma reference pixel being included in an upper row or left column of a third distance index from the third pixel of the chroma block; and A fourth predicted pixel corresponding to a fourth pixel of the chroma block is obtained by applying a fourth linear interpolation filter to a second chroma reference pixel corresponding to a position of a fourth pixel of the chroma block determined based on intra-prediction mode information of the chroma block, the second chroma reference pixel being included in an upper row or left column of a fourth distance index from the fourth pixel of the chroma block, The second distance value of the chrominance block is greater than the first distance value of the luminance block.
2. The intra-frame prediction method according to claim 1, wherein: The intra prediction mode information of the luma block indicates whether the intra prediction mode of the luma block is an intra angular prediction mode, and The first linear interpolation filter and the second interpolation filter are selected from a set of candidate linear interpolation filters.
3. The intra-frame prediction method according to claim 2, wherein: The first linear interpolation filter and the second linear interpolation filter differ in smoothing filtering degree from weak to strong, and The third linear interpolation filter and the fourth linear interpolation filter differ in degree of smoothing filtering from weak to strong.
4. An intra-frame prediction device, comprising: An information acquisition unit, configured to acquire intra-frame prediction mode information of a luminance block of a current coding unit and intra-frame prediction mode information of a chrominance block of a current coding unit; The filter determination unit is configured to: When the color component of the current coding unit is the brightness component: Wherein, when the pixels of the upper row adjacent to the luminance block of the current coding unit are used as reference pixels according to the intra-frame prediction mode information of the luminance block, the first distance index indicates the vertical distance between the pixels of the upper row and the first pixel of the luminance block, and the second distance index indicates the vertical distance between the pixels of the upper row and the second pixel of the luminance block, Wherein, when the pixels in the left column adjacent to the luminance block of the current coding unit are used as reference pixels according to the intra-frame prediction mode information of the luminance block, the first distance index indicates the horizontal distance between the pixels in the left column and the first pixel of the luminance block, and the second distance index indicates the horizontal distance between the pixels in the left column and the second pixel of the luminance block, Wherein, the second distance index is greater than the first distance index, determining a first linear interpolation filter for intra prediction for a first distance index equal to the first distance value, determining a second linear interpolation filter for intra prediction for a second distance index greater than the first distance value, and When the color component of the current coding unit is a chroma component: Wherein, when the pixel of the upper row adjacent to the chroma block of the current coding unit is used as a reference pixel according to the intra-frame prediction mode information of the chroma block, the third distance index indicates the vertical distance between the pixel of the upper row and the third pixel of the chroma block, and the fourth distance index indicates the vertical distance between the pixel of the upper row and the fourth pixel of the chroma block, Wherein, when the pixel in the left column adjacent to the chroma block of the current coding unit is used as a reference pixel according to the intra-frame prediction mode information of the chroma block, the third distance index indicates the horizontal distance between the pixel in the left column and the third pixel of the chroma block, and the fourth distance index indicates the horizontal distance between the pixel in the left column and the fourth pixel of the chroma block, Among them, the fourth distance index is greater than the third distance index, determining a third linear interpolation filter for intra prediction for a third distance index less than or equal to the second distance value, determining a fourth linear interpolation filter for intra prediction for a fourth distance index greater than the second distance value, Wherein, the second distance value of the chrominance block is greater than the first distance value of the luminance block; The prediction value calculation unit is configured as follows: When the color component of the current coding unit is a luminance component, a first predicted pixel corresponding to the first pixel of the luminance block is obtained by applying a first linear interpolation filter to a first luminance reference pixel corresponding to a position of a first pixel of the luminance block determined based on intra-prediction mode information of the luminance block, the first luminance reference pixel being included in an upper row or a left column of a first distance index from the first pixel of the luminance block, and a second predicted pixel corresponding to a second pixel of the luminance block is obtained by applying a second linear interpolation filter to a second luminance reference pixel corresponding to a position of a second pixel of the luminance block determined based on intra-prediction mode information of the luminance block, the second predicted pixel corresponding to the second pixel of the luminance block being included in an upper row or a left column of a second distance index from the second pixel of the luminance block, and When the color component of the current coding unit is a chroma component, a third predicted pixel corresponding to the third pixel of the chroma block is obtained by applying a third linear interpolation filter to a first chroma reference pixel corresponding to the position of the third pixel of the chroma block determined based on intra-frame prediction mode information of the chroma block, and the first chroma reference pixel is included in an upper row or left column of a third distance index from the third pixel of the chroma block, and a fourth predicted pixel corresponding to a fourth pixel of the chroma block is obtained by applying a fourth linear interpolation filter to a second chroma reference pixel corresponding to the position of the fourth pixel of the chroma block determined based on the intra-frame prediction mode information of the chroma block, and the second chroma reference pixel is included in an upper row or left column of a fourth distance index from the fourth pixel of the chroma block.
Citation Information
Patent Citations
Method and device for performing image decoding on basis of intra prediction in image coding system
WO2018221817A1