Intra prediction method and intra prediction device

By selecting an appropriate linear interpolation filter for intra prediction based on color component information and intra prediction mode information, the problems of unnatural texture and low encoding efficiency of the intra prediction unit are solved, and more natural texture and more efficient encoding are achieved.

CN120075448APending Publication Date: 2025-05-30BEIJING SAMSUNG TELECOM R&D CENT +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510245579.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-08-23
Filing Date
2019-11-06
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

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.

Method used

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.

Benefits of technology

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.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075448A_ABST
    Figure CN120075448A_ABST
Patent Text Reader

Abstract

The invention provides an intra prediction method and an intra prediction device. The intra-frame prediction method comprises: determining an intra-frame prediction unit, and obtaining intra-frame prediction unit information of the intra-frame prediction unit, the intra-frame prediction unit information at least comprising 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, the reference pixel information and the intra-frame prediction mode information; and according to the reference pixel information and the determined linear interpolation filter, calculating the predicted value of each pixel point in the intra-frame prediction unit in the intra-frame prediction mode, thereby improving the accuracy of intra-frame prediction, enabling the internal texture of the prediction unit to be more natural, further enabling the energy to be more concentrated after image coding, and improving the coding efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the patent application with the application date of November 6, 2019, application number 201911078110.9, and invention title "Intra Prediction Method and Apparatus, Coding and Decoding Methods and Apparatus Based on Intra Prediction". Technical Field

[0002] The present disclosure relates to the field of video coding and decoding technologies. More specifically, the present disclosure relates to an intra prediction method and apparatus, and coding and decoding methods and apparatus based on intra prediction. Background Art

[0003] In existing video coding, such as AVS2, H.264 / AVC, and HEVC, the intra prediction method is used. That is, by utilizing the spatial correlation of image content, the reconstructed pixel values of adjacent encoded or decoded pixels around the current block to be encoded / intra prediction unit are used as reference pixels, and the predicted values of each pixel point in the current coding block / intra prediction unit are calculated according to a specific intra prediction model. This is to reduce the spatial redundancy of the image and improve the compression ratio. Specifically, at the encoding end, for the intra prediction unit, all intra prediction modes and all inter prediction modes of the inter prediction unit are traversed, and the one with the minimum rate-distortion cost is selected as the final prediction mode. The residual information obtained by transforming and quantizing the difference between the original pixel value and the predicted pixel value, and the final prediction mode information, etc., are entropy encoded to generate a bitstream. At the decoding end, the prediction mode information and the residual information are entropy decoded from the bitstream, the predicted values of each pixel point in the intra prediction unit are obtained according to the prediction mode information, and added to the residual value after inverse quantization and inverse transformation to obtain the decoded reconstructed image.

[0004] In the first-phase standard of AVS3, it is defined that a coding unit can have 7 types of intra prediction units as shown in FIG. 1. Each type of intra prediction unit includes a luminance (component) intra prediction unit and two chrominance (component) intra prediction units (Cb and Cr).

[0005] It is also stipulated in the first-phase standard of AVS3 that: 34 intra prediction modes are defined for the luminance (component) intra prediction unit, and 7 intra prediction models are defined for the chrominance (component) intra prediction unit. As shown in Table 1 and Table 2, the 34 intra prediction modes of the luminance intra prediction unit are as Figure 2 shown.

[0006] Table 1 Intra Prediction Modes of Luminance Intra Prediction Unit

[0007]

[0008] Table 2 Intra Prediction Modes of Chrominance Intra Prediction Unit

[0009]

[0010] For the luminance intra prediction units with index values from 3 to 11, 13 to 23, and 25 to 32, the intra prediction mode is the angular prediction mode. Additionally, in the prediction mode of the chrominance intra prediction unit, for the DM mode, the intra prediction mode selected for the luminance intra prediction unit with the intra prediction unit order of 0 (i.e., the first one to be predicted) in the current coding unit is used as the intra prediction mode of the current chrominance intra prediction unit to calculate the prediction value of the chrominance intra prediction unit. Therefore, when the intra prediction mode selected for the luminance intra prediction unit with the prediction order of 0 (i.e., the first one to be predicted) is the angular prediction mode, the prediction mode of the current chrominance intra prediction unit is also the angular prediction mode.

[0011] When the angular prediction mode is adopted, all pixel points within the current intra prediction unit are mapped to the corresponding reference pixel points on the left or above according to the specified prediction angle, and this reference pixel value is used as the prediction value. Figure 3 Taking the 4×4 - sized intra prediction unit as an example, the reconstructed pixel values of the adjacent upper row (ref_up) and the left - most column (ref_left) are used as its reference pixel values. For example, if the vertical prediction mode (Vertical) is adopted, each column of pixel values within the intra prediction unit uses the reference pixel value of the corresponding column in 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 mapped reference pixel point may not be at an integer - pixel position. For example Figure 4 as shown, if the intra prediction is performed in the direction indicated by the arrow, the position of the corresponding reference pixel point ref(p) obtained by mapping the pixel point p in the prediction direction of the arrow is not an integer - pixel point. At this time, a 4 - tap linear interpolation filter is used to calculate the value of ref(p) using the adjacent 4 integer - pixel reference pixel points (x -1 , x 0 , x 1 , x 2 ). In the 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 point to be predicted, ref(p) is the mapped reference pixel value, which is the prediction value of p, and a is the distance between ref(p) and x 0The horizontal distance between >> is a bitwise right shift operation. This 4-tap linear interpolation filter serves both linear interpolation and smoothing filtering functions. On one hand, smoothing filtering makes the texture of the intra prediction unit more natural, which is beneficial for the concentration of energy after transformation. However, it will cause the loss of some high-frequency texture detail information, especially near the reference pixel points. On the other hand, using the same filter for all pixel points within an intra prediction unit may lead to unnatural texture or inaccurate prediction of the intra prediction unit, resulting in a decline in coding performance.

[0012] In VVC, an intra prediction method with multiple filters is adopted. The formula p = ref(p) = f k,0 ×x -1 +fk,1×x 0 +f k,2 ×x 1 +f k,3 ×x 2 , 0 ≤ k ≤ 4, 0 ≤ i ≤ 3, where p is the pixel point to be predicted, f k is a linear interpolation filter, k is the index value of the linear interpolation filter, f k,i is the coefficient of the linear interpolation filter, x i is the reference pixel value at the integer pixel position. There are 5 different filters (0 ≤ k ≤ 4) according to the smoothness degree. Linear interpolation is performed using filters with gradually increasing smoothness degrees from weak to strong according to the distance from the predicted pixel point to the reference pixel point. For example Figure 5 As shown, when the intra prediction mode is in the direction indicated by the arrow, for the pixels in the 0th row (or 0th column) closest to the upper (or left) reference pixel, the filter f 0 with the weakest smoothness degree is used to calculate the predicted pixel value. For the pixels in the 1st row (or 1st column), the filter f 1 with the second weakest smoothness degree is used to calculate the predicted pixel value. For the pixels in the 2nd row (or 0th column) and 3rd row (or 0th column), the filter f 2 with the medium smoothness degree is used to calculate the predicted pixel value. For the pixel points farthest from the upper (or left) reference pixel, the filter f 4 with the strongest smoothness degree is used to calculate the predicted pixel value.

[0013] In summary, the existing multi-filter intra prediction method makes the texture inside the chrominance intra prediction unit unnatural and the energy not concentrated enough during the encoding and decoding process, resulting in low encoding and decoding efficiency. Summary of the Invention

[0014] An exemplary embodiment of the present disclosure aims to provide an encoding and decoding method and apparatus to solve the problems of unnatural texture inside the intra prediction unit, insufficient energy concentration after image encoding and decoding, and low encoding and decoding efficiency.

[0015] According to an exemplary embodiment of the present disclosure, there is provided an intra prediction method, including: determining an intra prediction unit, and obtaining intra prediction unit information of the intra prediction unit, where the intra prediction unit information at least includes intra prediction mode information, reference pixel information, and color component information; determining a linear interpolation filter for intra prediction according to the color component information, the reference pixel information, and the intra prediction mode information; and calculating prediction values 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.

[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 prediction according to the color component information, the reference pixel information, and the intra prediction mode information may include: determining whether the intra prediction mode of the intra prediction unit is an intra angular prediction mode according to the intra prediction mode information; when the intra prediction mode is an intra angular prediction mode, determining whether the intra prediction unit is a luminance component prediction unit or a chrominance component prediction unit according to the color component information; and selecting a linear interpolation filter from a set of candidate linear interpolation filters as the 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, where 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 prediction unit information may further include width and height information of the intra prediction unit, and the step of selecting a linear interpolation filter from a set of candidate linear interpolation filters as the linear interpolation filter for intra prediction may include: determining the reference pixel of the intra prediction unit according to the reference pixel information; and selecting a linear interpolation filter for each row of pixel points or each column of pixel points of the intra prediction unit according to the width and height information of the intra prediction unit and the determined reference pixel.

[0019] Optionally, when the intra prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel above the intra prediction unit, the step of selecting a linear interpolation filter for each row of pixel points of the intra prediction unit may include: when the width of the intra 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 pixel points in the intra prediction unit; when the width of the intra 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 pixel points of the first number of rows sorted in the order from top to bottom of the intra prediction unit, and selecting a linear interpolation filter with an index value of M2 + x for the pixel points of the subsequent second number of rows 1For the linear interpolation filter, for the pixel points of subsequent rows, the index value M2 + y is selected 1 For the linear interpolation filter, where when the index values of the linear interpolation filters in the set of candidate linear interpolation filters are 0 to I in ascending order of the degree of smoothing filtering, y 1 ≥x 1 >0, I≥M1>M2≥0.

[0020] Optionally, when the intra prediction unit is a luminance component prediction unit and the reference pixel is the reconstructed pixel to the left of the intra prediction unit, the step of selecting a linear interpolation filter for each column of pixel points of the intra prediction unit may include: when the height of the intra prediction unit is less than or equal to the second threshold, selecting a linear interpolation filter with an index value of the third index value M3 for all pixel points within the intra prediction unit; when the height of the intra prediction unit is greater than the second threshold, for the pixel points of the first third number of columns in the order from left to right of the intra prediction unit, selecting a linear interpolation filter with an index value of the fourth index value M4, and for the pixel points of the subsequent fourth number of columns, selecting a linear interpolation filter with an index value of M4 + x 2 For the linear interpolation filter, and for the pixel points of subsequent columns, selecting a linear interpolation filter with an index value of M4 + y 2 For the linear interpolation filter, where when the index values of the linear interpolation filters in the set of candidate linear interpolation filters are 0 to I in ascending order of the degree of smoothing filtering, y 2 ≥x 2 >0, I≥M3>M4≥0.

[0021] Optionally, when the intra prediction unit is a chrominance component prediction unit and the reference pixel is the reconstructed pixel above the intra prediction unit, the step of selecting a linear interpolation filter for each row of pixel points of the intra prediction unit may include: when the width of the intra prediction unit is less than or equal to the third threshold, selecting a linear interpolation filter with an index value of the fifth index value M5 for all pixel points within the intra prediction unit; when the width of the intra prediction unit is greater than the third threshold, for the pixel points of the first fifth number of rows in the order from top to bottom of the intra prediction unit, selecting a linear interpolation filter with an index value of the sixth index value M6, and for the pixel points of the subsequent rows, selecting a linear interpolation filter with an index value of M6 + x 3 For the linear interpolation filter, where when the index values of the linear interpolation filters in the set of candidate linear interpolation filters are 0 to I in ascending order of the degree of smoothing filtering, x 3 >0, I≥M5>M6≥0.

[0022] Optionally, when the intra prediction unit is a chrominance component prediction unit and the reference pixel is the reconstructed pixel to the left of the intra prediction unit, the step of selecting a linear interpolation filter for each column of pixel points of the intra prediction unit may include: when the height of the intra 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 pixel points within the intra prediction unit; when the height of the intra prediction unit is greater than the fourth threshold, for the pixel points of the first sixth number of columns in the order from left to right of the intra prediction unit, selecting a linear interpolation filter with an index value of an eighth index value M8, and for the pixel points of the subsequent columns, selecting a linear interpolation filter with an index value of M8 + x 4 of the linear interpolation filter, where, when the linear interpolation filters in the set of candidate linear interpolation filters are indexed from 0 to I in ascending order of smoothing filtering degree, x 4 > 0, I ≥ M7 > M8 ≥ 0.

[0023] Optionally, the step of selecting a linear interpolation filter from the set of candidate linear interpolation filters as the linear interpolation filter for intra prediction may further include: calculating the texture complexity of the intra prediction unit to determine whether the intra prediction unit is texture-complex or texture-smooth; and selecting the linear interpolation filter for intra prediction based on whether the intra prediction unit is texture-complex or texture-smooth.

[0024] Optionally, the step of selecting the linear interpolation filter for intra prediction based on whether the intra prediction unit is texture-complex or texture-smooth may further include: when the intra prediction unit is a luminance component prediction unit and is texture-smooth, selecting a linear interpolation filter with an index value of a ninth index value M9; when the intra prediction unit is a luminance component prediction unit and is texture-complex and the reference pixel is the reconstructed pixel above, for the pixel points of the first seventh number of rows in the order from top to bottom of the intra prediction unit, selecting a linear interpolation filter with an index value of a tenth index value M10, for the pixel points of the subsequent eighth number of rows, selecting a linear interpolation filter with an index value of M10 + x 5 of the linear interpolation filter, and for the pixel points of the subsequent rows, selecting a linear interpolation filter with an index value of M10 + y 5 of the linear interpolation filter, where, when the linear interpolation filters in the set of candidate linear interpolation filters are indexed from 0 to I in ascending order 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 is texture-complex and the reference pixel is the reconstructed pixel to the left, for the pixel points of the first ninth number of columns in the order from left to right of the intra prediction unit, selecting a linear interpolation filter with an index value of an eleventh index value M11, and for the pixel points of the subsequent tenth number of columns, selecting a linear interpolation filter with an index value of M11 + x 6For the linear interpolation filter, for the pixel points of the subsequent columns, select the index value M11 + y 6 For the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I according to the degree of smoothing filtering from weak to strong, y 6 ≥x 6 >0, I≥M9>M11≥0.

[0025] Optionally, the step of selecting the linear interpolation filter for intra prediction according to whether the intra prediction unit has complex or smooth texture may further include: when the intra prediction unit is a chrominance component prediction unit and has smooth texture, select the linear interpolation filter with the index value of the twelfth index value M12; when the intra prediction unit is a chrominance component prediction unit and has complex texture and the reference pixel is the reconstructed pixel above, for the pixel points of the first eleven rows in the top-down order of the intra prediction unit, select the linear interpolation filter with the index value of the thirteenth index value M13, and for the pixel points of the subsequent rows, select the index value M13 + x 7 For the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I according to the degree of smoothing filtering from weak to strong, x 7 >0, I≥M12>M13≥0; when the intra prediction unit is a chrominance component prediction unit and has complex texture and the reference pixel is the reconstructed pixel on the left, for the pixel points of the first twelve columns in the left-to-right order of the intra prediction unit, 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 index value M14 + x 8 For the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I according to the degree of smoothing filtering from weak to strong, x 8 >0, I≥M12>M14≥0.

[0026] According to an exemplary embodiment of the present disclosure, there is provided an encoding method, including: determining an intra prediction unit in a current encoding unit, and obtaining intra prediction unit information of the intra prediction unit, where the intra prediction unit information at least includes intra prediction mode information, reference pixel information, and color component information; determining a linear interpolation filter for intra prediction according to the color component information, the reference pixel information, and the intra prediction mode information; calculating predicted values 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; and selecting a prediction mode for encoding according to the predicted values.

[0027] According to an exemplary embodiment of the present disclosure, a decoding method is provided, including: determining an intra prediction unit in a current decoding unit, and obtaining intra prediction unit information of the intra prediction unit, where the intra prediction unit information at least includes intra prediction mode information, reference pixel information, and color component information; determining a linear interpolation filter for intra prediction according to the color component information, the reference pixel information, and the intra prediction mode information; calculating prediction values 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; and calculating a reconstruction value of the current decoding unit according to the prediction values.

[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 prediction according to the color component information, the reference pixel information, and the intra prediction mode information may include: determining whether the intra prediction mode of the intra prediction unit is an intra angular prediction mode according to the intra prediction mode information; when the intra prediction mode is an intra angular prediction mode, determining whether the intra prediction unit is a luminance component prediction unit or a chrominance component prediction unit according to the color component information; and selecting a linear interpolation filter from a set of candidate linear interpolation filters as the 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, where the index values of the linear interpolation filters in the set of candidate linear interpolation filters are 0 to I, and I is a positive integer.

[0030] Optionally, the intra prediction unit information may further include width and height information of the intra prediction unit, and the step of selecting a linear interpolation filter from a set of candidate linear interpolation filters as the linear interpolation filter for intra prediction may include: determining the reference pixel of the intra prediction unit according to the reference pixel information; and selecting a linear interpolation filter for each row or each column of pixel points of the intra prediction unit according to the width and height information of the intra prediction unit and the determined reference pixel.

[0031] Optionally, when the intra prediction unit is a luminance component prediction unit and the reference pixel is a reconstructed pixel above the intra prediction unit, the step of selecting a linear interpolation filter for each row of pixel points of the intra prediction unit may include: when the width of the intra 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 pixel points in the intra prediction unit; when the width of the intra 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 pixel points of the first number of rows sorted in the order from top to bottom of the intra prediction unit, and selecting a linear interpolation filter with an index value of M2 + x for the pixel points of the subsequent second number of rows 1For the linear interpolation filter, for the pixel points of subsequent rows, select the index value as M2 + y 1 For the linear interpolation filter, where when the index values of the linear interpolation filters in the set of candidate linear interpolation filters are 0 to I in ascending order of the degree of smoothing filtering, y 1 ≥x 1 >0, I≥M1>M2≥0.

[0032] Optionally, when the intra prediction unit is a luminance component prediction unit and the reference pixel is the reconstructed pixel to the left of the intra prediction unit, the step of selecting a linear interpolation filter for each column of pixel points of the intra prediction unit may include: when the height of the intra 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 pixel points within the intra prediction unit; when the height of the intra prediction unit is greater than the second threshold, for the pixel points of the first third number of columns in the order from left to right of the intra prediction unit, select a linear interpolation filter with an index value of the fourth index value M4, and for the pixel points of the subsequent fourth number of columns, select a linear interpolation filter with an index value of M4 + x 2 For the linear interpolation filter, for the pixel points of subsequent columns, select the index value as M4 + y 2 For the linear interpolation filter, where when the index values of the linear interpolation filters in the set of candidate linear interpolation filters are 0 to I in ascending order of the degree of smoothing filtering, y 2 ≥x 2 >0, I≥M3>M4≥0.

[0033] Optionally, when the intra prediction unit is a chrominance component prediction unit and the reference pixel is the reconstructed pixel above the intra prediction unit, the step of selecting a linear interpolation filter for each row of pixel points of the intra prediction unit may include: 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 pixel points within the intra prediction unit; when the width of the intra prediction unit is greater than the third threshold, for the pixel points of the first fifth number of rows in the order from top to bottom of the intra prediction unit, select a linear interpolation filter with an index value of the sixth index value M6, and for the pixel points of the subsequent rows, select a linear interpolation filter with an index value of M6 + x 3 For the linear interpolation filter, where when the index values of the linear interpolation filters in the set of candidate linear interpolation filters are 0 to I in ascending order of the degree of smoothing filtering, x 3 >0, I≥M5>M6≥0.

[0034] Optionally, when the intra prediction unit is a chrominance component prediction unit and the reference pixel is the reconstructed pixel to the left of the intra prediction unit, the step of selecting a linear interpolation filter for each column of pixel points of the intra prediction unit may include: when the height of the intra prediction unit is less than or equal to the fourth threshold, selecting a linear interpolation filter with an index value of the seventh index value M7 for all pixel points within the intra prediction unit; when the height of the intra prediction unit is greater than the fourth threshold, for the pixel points of the first sixth number of columns in the order from left to right of the intra prediction unit, selecting a linear interpolation filter with an index value of the eighth index value M8, and for the pixel points of the subsequent columns, selecting a linear interpolation filter with an index value of M8+x 4 of the linear interpolation filter, where, when the linear interpolation filters in the set of candidate linear interpolation filters are indexed from 0 to I in ascending order of the degree of smoothing filtering, x 4 >0, I≥M7>M8≥0.

[0035] Optionally, the step of selecting a linear interpolation filter from the set of candidate linear interpolation filters as the linear interpolation filter for intra prediction may further include: calculating the texture complexity of the intra prediction unit to determine whether the intra prediction unit is texture-complex or texture-smooth; and selecting the linear interpolation filter for intra prediction based on whether the intra prediction unit is texture-complex or texture-smooth.

[0036] Optionally, the step of selecting the linear interpolation filter for intra prediction based on whether the intra prediction unit is texture-complex or texture-smooth may further include: when the intra prediction unit is a luminance component prediction unit and is texture-smooth, selecting a linear interpolation filter with an index value of the ninth index value M9; when the intra prediction unit is a luminance component prediction unit and is texture-complex and the reference pixel is the reconstructed pixel above, for the pixel points of the first seventh number of rows in the order from top to bottom of the intra prediction unit, selecting a linear interpolation filter with an index value of the tenth index value M10, for the pixel points of the subsequent eighth number of rows, selecting a linear interpolation filter with an index value of M10+x 5 of the linear interpolation filter, and for the pixel points of the subsequent rows, selecting a linear interpolation filter with an index value of M10+y 5 of the linear interpolation filter, where, when the linear interpolation filters in the set of candidate linear interpolation filters are indexed from 0 to I in ascending order of the degree of smoothing filtering, y 5 ≥x 5 >0, I≥M9>M10≥0; when the intra prediction unit is a luminance component prediction unit and is texture-complex and the reference pixel is the reconstructed pixel to the left, for the pixel points of the first ninth number of columns in the order from left to right of the intra prediction unit, selecting a linear interpolation filter with an index value of the eleventh index value M11, and for the pixel points of the subsequent tenth number of columns, selecting a linear interpolation filter with an index value of M11+x 6For the linear interpolation filter, the index value M11 + y is selected for the pixel points of the subsequent columns 6 For the linear interpolation filter, where when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I according to the degree of smoothing filtering from weak to strong, y 6 ≥x 6 > 0, I≥M9>M11≥0.

[0037] Optionally, the step of selecting the linear interpolation filter for intra prediction according to whether the intra prediction unit has complex or smooth texture may further include: when the intra prediction unit is a chrominance component prediction unit and has smooth texture, select the linear interpolation filter with the index value of the twelfth index value M12; when the intra prediction unit is a chrominance component prediction unit and has complex texture and the reference pixel is the reconstructed pixel above, for the first eleven rows of pixel points in the order from top to bottom of the intra prediction unit, select the linear interpolation filter with the index value of the thirteenth index value M13, and for the subsequent rows of pixel points, select the index value of M13 + x 7 For the linear interpolation filter, where when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I according to the degree of smoothing filtering from weak to strong, x 7 > 0, I≥M12>M13≥0; when the intra prediction unit is a chrominance component prediction unit and has complex texture and the reference pixel is the reconstructed pixel on the left, for the first twelve columns of pixel points in the order from left to right of the intra prediction unit, select the linear interpolation filter with the index value of the fourteenth index value M14, and for the subsequent columns of pixel points, select the index value of M14 + x 8 For the linear interpolation filter, where when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I according to the degree of smoothing filtering from weak to strong, x 8 > 0, I≥M12>M14≥0.

[0038] According to an exemplary embodiment of the present disclosure, there is provided an intra prediction apparatus, including: an information acquisition unit configured to determine an intra prediction unit and acquire intra prediction unit information of the intra prediction unit, where the intra prediction unit information at least includes 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 according to the color component information, the reference pixel information, and the intra prediction mode information; and a prediction value calculation unit 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.

[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 prediction mode of the intra prediction unit is an intra angular prediction mode according to the intra prediction mode information; when the intra prediction mode is an intra angular 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; select a linear interpolation filter from a set of candidate linear interpolation filters as the 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, where 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 prediction unit information may further include the width and height information of the intra prediction unit, and the filter determination unit is further configured to: determine the reference pixels of the intra prediction unit according to the reference pixel information; and select a linear interpolation filter for each row or each column of pixel points of the intra prediction unit according to the width and height information of the intra prediction unit and the determined reference pixels.

[0042] Optionally, the filter determination unit may further 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 a first index value M1 for all pixel points within the intra prediction unit; when the width of the intra prediction unit is greater than the first threshold, select a linear interpolation filter with an index value of a second index value M2 for the pixel points of the first number of rows sorted in the top-down order of the intra prediction unit, select a linear interpolation filter with an index value of M2 + x 1 for the pixel points of the subsequent second number of rows, and select a linear interpolation filter with an index value of M2 + y 1 for the pixel points of the subsequent rows, where, when the index values of the linear interpolation filters in the set of candidate linear interpolation filters are 0 to I in ascending order of the smoothing filtering degree, y 1 ≥ x 1 > 0, and I ≥ M1 > M2 ≥ 0.

[0043] Optionally, the filter determination unit may also be configured to: when the intra prediction unit is a luminance 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 a second threshold, select a linear interpolation filter with an index value of a third index value M3 for all pixel points within the intra prediction unit; when the height of the intra prediction unit is greater than the second threshold, for the pixel points in the first third number of columns in the order from left to right of the intra prediction unit, select a linear interpolation filter with an index value of a fourth index value M4, and for the pixel points in the subsequent fourth number of columns, select a linear interpolation filter with an index value of M4 + x 2 of the linear interpolation filter, and for the pixel points in the subsequent columns, select a linear interpolation filter with an index value of M4 + y 2 of the linear interpolation filter, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are from 0 to I in ascending order of the degree of smoothing filtering, y 2 ≥x 2 >0, I≥M3>M4≥0.

[0044] Optionally, the filter determination unit may also be 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 a third threshold, select a linear interpolation filter with an index value of a fifth index value M5 for all pixel points within the intra prediction unit; when the width of the intra prediction unit is greater than the third threshold, for the pixel points in the first fifth number of rows in the order from top to bottom of the intra prediction unit, select a linear interpolation filter with an index value of a sixth index value M6, and for the pixel points in the subsequent rows, select a linear interpolation filter with an index value of M6 + x 3 of the linear interpolation filter, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are from 0 to I in ascending order of the degree of smoothing filtering, x 3 >0, I≥M5>M6≥0.

[0045] Optionally, the filter determination unit 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 a fourth threshold, select a linear interpolation filter with an index value of a seventh index value M7 for all pixel points within the intra prediction unit; when the height of the intra prediction unit is greater than the fourth threshold, for the pixel points in the first sixth number of columns in the order from left to right of the intra prediction unit, select a linear interpolation filter with an index value of an eighth index value M8, and for the pixel points in the subsequent columns, select a linear interpolation filter with an index value of M8 + x 4 of the linear interpolation filter, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are from 0 to I in ascending order of the degree of smoothing filtering, x 4>0, I ≥ M7 > M8 ≥ 0.

[0046] Optionally, the filter determination unit may also be configured to: calculate the texture complexity of the intra prediction unit, determine whether the intra prediction unit is texture complex or texture smooth; and select a linear interpolation filter for intra prediction according to whether the intra prediction unit is texture complex or texture smooth.

[0047] Optionally, the filter determination unit may also be configured to: when the intra prediction unit is a luminance component prediction unit and is texture smooth, select a linear interpolation filter with an index value of the ninth index value M9; when the intra prediction unit is a luminance component prediction unit and is texture complex and the reference pixel is the reconstructed pixel above, for the pixels of the first seven rows in the top-down order of the intra prediction unit, select a linear interpolation filter with an index value of the tenth index value M10, for the pixels of the subsequent eight rows, select a linear interpolation filter with an index value of M10 + x 5 of the linear interpolation filter, and for the pixels of the subsequent rows, select a linear interpolation filter with an index value of M10 + y 5 of the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order 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 is texture complex and the reference pixel is the reconstructed pixel on the left, for the pixels of the first nine columns in the left-to-right order of the intra prediction unit, select a linear interpolation filter with an index value of the eleventh index value M11, for the pixels of the subsequent ten columns, select a linear interpolation filter with an index value of M11 + x 6 of the linear interpolation filter, and for the pixels of the subsequent columns, select a linear interpolation filter with an index value of M11 + y 6 of the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of smoothing filtering degree, y 6 ≥ x 6 >0, I ≥ M9 > M11 ≥ 0.

[0048] Optionally, the filter determination unit may also be configured to: when the intra prediction unit is a chrominance component prediction unit and is texture smooth, select a linear interpolation filter with an index value of the twelfth index value M12; when the intra prediction unit is a chrominance component prediction unit and is texture complex and the reference pixel is the reconstructed pixel above, for the pixels of the first eleven rows in the top-down order of the intra prediction unit, select a linear interpolation filter with an index value of the thirteenth index value M13, for the pixels of the subsequent rows, select a linear interpolation filter with an index value of M13 + x 7The linear interpolation filter, where when the linear interpolation filters in the set of candidate linear interpolation filters are indexed from 0 to I according to the degree of smoothing filtering from weak to strong, 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 in the twelfth column sorted in the order from left to right of the intra prediction unit, select the linear interpolation filter with the fourteenth index value M14, and for the pixel points in the subsequent columns, select the linear interpolation filter with the index value M14 + x 8 The linear interpolation filter, where when the linear interpolation filters in the set of candidate linear interpolation filters are indexed from 0 to I according to the degree of smoothing filtering from weak to strong, x 8 > 0, I ≥ M12 > M14 ≥ 0.

[0049] According to an exemplary embodiment of the present disclosure, there is provided an encoding device, including: 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, where the intra prediction unit information at least includes 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 according to the color component information, reference pixel information, and intra prediction mode information; a prediction value calculation unit configured to calculate prediction values 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; and an encoding unit configured to select a prediction mode for encoding according to the prediction values.

[0050] According to an exemplary embodiment of the present disclosure, there is provided a decoding device, including: an information acquisition unit configured to determine an intra prediction unit in a current decoding unit and acquire intra prediction unit information of the intra prediction unit, where the intra prediction unit information at least includes 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 according to the color component information, reference pixel information, and intra prediction mode information; a prediction value calculation unit configured to calculate prediction values 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; and a reconstruction value calculation unit configured to calculate a reconstruction value of the current decoding unit according to the prediction values.

[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 prediction mode of the intra prediction unit is an intra angular prediction mode according to the intra prediction mode information; when the intra prediction mode is an intra angular 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 the 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, where the index values of the linear interpolation filters in the set of candidate linear interpolation filters are from 0 to I, and I is a positive integer.

[0053] Optionally, the intra prediction unit information may further include the width and height information of the intra prediction unit, and the filter determination unit is further configured to: determine the reference pixels of the intra prediction unit according to the reference pixel information; and select a linear interpolation filter for each row or each column of pixel points of the intra prediction unit according to the width and height information of the intra prediction unit and the determined reference pixels.

[0054] Optionally, the filter determination unit may further 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 a first index value M1 for all pixel points within the intra prediction unit; when the width of the intra prediction unit is greater than the first threshold, select a linear interpolation filter with an index value of a second index value M2 for the pixel points of the first number of rows sorted in the top-down order of the intra prediction unit, select a linear interpolation filter with an index value of M2 + x 1 for the pixel points of the subsequent second number of rows, and select a linear interpolation filter with an index value of M2 + y 1 for the pixel points of the subsequent rows, where, when the index values of the linear interpolation filters in the set of candidate linear interpolation filters are from 0 to I in ascending order of the smoothing filtering degree, y 1 ≥ x 1 > 0, I ≥ M1 > M2 ≥ 0.

[0055] Optionally, the filter determination unit may further be configured to: when the intra prediction unit is a luminance 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 a second threshold, select a linear interpolation filter with an index value of a third index value M3 for all pixel points within the intra prediction unit; when the height of the intra prediction unit is greater than the second threshold, select a linear interpolation filter with an index value of a fourth index value M4 for the pixel points of the first number of columns sorted in the left-to-right order of the intra prediction unit, and select a linear interpolation filter with an index value of M4 + x2 For the linear interpolation filter, for the pixel points of the subsequent columns, the index value M4 + y is selected 2 For the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the degree of smoothing filtering, y 2 ≥ x 2 >0, I ≥ M3 > M4 ≥ 0.

[0056] Optionally, the filter determination unit may further be 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 a third threshold, select a linear interpolation filter with an index value of a fifth index value M5 for all pixel points within the intra prediction unit; when the width of the intra prediction unit is greater than the third threshold, select a linear interpolation filter with an index value of a sixth index value M6 for the pixel points of the first five rows in the order from top to bottom of the intra prediction unit, and select a linear interpolation filter with an index value of M6 + x for the pixel points of the subsequent rows 3 For the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the degree of smoothing filtering, x 3 >0, I ≥ M5 > M6 ≥ 0.

[0057] Optionally, the filter determination unit may further 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 a fourth threshold, select a linear interpolation filter with an index value of a seventh index value M7 for all pixel points within the intra prediction unit; when the height of the intra prediction unit is greater than the fourth threshold, select a linear interpolation filter with an index value of an eighth index value M8 for the pixel points of the first six columns in the order from left to right of the intra prediction unit, and select a linear interpolation filter with an index value of M8 + x for the pixel points of the subsequent columns 4 For the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the degree of smoothing filtering, x 4 >0, I ≥ M7 > M8 ≥ 0.

[0058] Optionally, the filter determination unit may further be configured to: calculate the texture complexity of the intra prediction unit, determine whether the intra prediction unit is texture - complex or texture - smooth; and select a linear interpolation filter for intra prediction according to whether the intra prediction unit is texture - complex or texture - smooth.

[0059] Optionally, the filter determination unit may also be configured to: when the intra 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 prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel above, for the pixels of the first seven rows in the top-down order of the intra prediction unit, select a linear interpolation filter with an index value of the tenth index value M10, and for the pixels of the subsequent eight rows, select a linear interpolation filter with an index value of M10 + x 5 of the linear interpolation filter, and for the pixels of the subsequent rows, select a linear interpolation filter with an index value of M10 + y 5 of the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the 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 pixels of the first nine columns in the left-to-right order of the intra prediction unit, select a linear interpolation filter with an index value of the eleventh index value M11, and for the pixels of the subsequent ten columns, select a linear interpolation filter with an index value of M11 + x 6 of the linear interpolation filter, and for the pixels of the subsequent columns, select a linear interpolation filter with an index value of M11 + y 6 of the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the smoothing filtering degree, y 6 ≥ x 6 > 0, I ≥ M9 > M11 ≥ 0.

[0060] Optionally, the filter determination unit may also be configured to: when the intra prediction unit is a chrominance 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 prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel above, for the pixels of the first eleven rows in the top-down order of the intra prediction unit, select a linear interpolation filter with an index value of the thirteenth index value M13, and for the pixels of the subsequent rows, select a linear interpolation filter with an index value of M13 + x 7 of the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the 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 in the twelfth column sorted in the order from left to right of the intra prediction unit, a linear interpolation filter with the fourteenth index value M14 is selected, and for the pixel points in the subsequent columns, a linear interpolation filter with the index value of M14 + x 8 is selected, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the smoothing filtering degree, x 8 > 0, I ≥ M12 > M14 ≥ 0.

[0061] According to an exemplary embodiment of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, implements the encoding method according to the exemplary embodiment of the present disclosure.

[0062] According to an exemplary embodiment of the present disclosure, there is provided a computing device, including: a processor; a memory storing a computer program, which when executed by the processor, implements the encoding method according to the exemplary embodiment of the present disclosure.

[0063] According to the intra prediction method and apparatus, and the encoding and decoding method and apparatus based on intra prediction according to the exemplary embodiments of the present disclosure, by using a method of selecting different intra prediction linear interpolation filters for the intra prediction units of the luminance component and the chrominance component according to the color component information and the intra prediction mode information, the differences in the texture characteristics between the chrominance component prediction unit and the luminance component prediction unit are fully considered, that is, the chrominance component contains less texture details and high-frequency information than the luminance component, thereby improving the accuracy of intra prediction, making the texture inside the prediction unit more natural, and further making the energy more concentrated after image encoding, and improving the encoding efficiency.

[0064] Some other aspects and / or advantages of the general concept of the present disclosure will be set forth in part in the following description, and some will be obvious from the description, or can be learned through the implementation of the general concept of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Through the following description with reference to the drawings of exemplary embodiments shown, the above and other objects and features of the exemplary embodiments of the present disclosure will become clearer, wherein:

[0066] Figures 1A to 1G A schematic diagram showing 7 types of intra prediction units;

[0067] Figure 2 A schematic diagram showing the intra prediction mode of the luminance intra prediction unit;

[0068] Figure 3 Schematic diagram showing a vertical prediction model for a 4×4 block;

[0069] Figure 4 Schematic diagram showing an angle prediction model;

[0070] Figure 5 Schematic diagram showing multi-filter intra prediction;

[0071] Figure 6 Flowchart showing an intra prediction method according to an exemplary embodiment of the present disclosure;

[0072] Figure 7 Schematic diagram showing the calculation of the difference value between reference pixel points according to an exemplary embodiment of the present disclosure;

[0073] Figure 8 Schematic diagram showing the calculation of the difference value between reference pixel points according to another exemplary embodiment of the present disclosure;

[0074] Figure 9 Schematic diagram showing the calculation of the difference value between reference pixel points according to another exemplary embodiment of the present disclosure;

[0075] Figure 10 Flowchart showing an encoding method according to an exemplary embodiment of the present disclosure;

[0076] Figure 11 Flowchart showing a decoding method according to an exemplary embodiment of the present disclosure;

[0077] Figure 12 Block diagram showing an intra prediction device according to an exemplary embodiment of the present disclosure;

[0078] Figure 13 Block diagram showing an encoding device according to an exemplary embodiment of the present disclosure;

[0079] Figure 14 Block diagram showing a decoding device according to an exemplary embodiment of the present disclosure; and

[0080] Figure 15 Schematic diagram showing a computing device according to an exemplary embodiment of the present disclosure. Detailed Description of the Invention

[0081] Reference will now be made in detail to the exemplary embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like reference numerals always refer to like elements. The embodiments will be described below with reference to the accompanying drawings in order to explain the present disclosure.

[0082] Figure 6 Flowchart showing an intra prediction method according to an exemplary embodiment of the present disclosure.

[0083] Refer to Figure 6 , in step S601, determine an intra prediction unit and obtain 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.

[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, in addition to including the luminance component and the chrominance component, the color component may further 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 used to indicate the intra prediction mode. The reference pixel information is information used to indicate the reference pixels of the intra prediction unit.

[0085] In an exemplary embodiment of the present disclosure, specifically, the encoded reconstructed pixels in the upper row and the left column adjacent to the intra prediction unit may be used as reference pixels, or the reconstructed pixels in several upper rows and several left columns may be used, and the present disclosure does not limit this. In an exemplary embodiment of the present disclosure, for convenience of description, the encoded reconstructed pixels in the upper row and the left column adjacent to the intra prediction unit are used as reference pixels.

[0086] In step S602, determine a linear interpolation filter for intra prediction 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 prediction according to color component information, reference pixel information, and intra prediction mode information, it is first possible to determine whether the intra prediction mode of the intra prediction unit is an intra angular prediction mode according to the intra prediction mode information. When the intra prediction mode is an intra angular prediction mode, it is determined whether the intra prediction unit is a luminance component prediction unit or a chrominance component prediction unit according to the color component information, and a linear interpolation filter is selected from a candidate linear interpolation filter set as the 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. Here, the candidate linear interpolation filter set is predefined 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 according to the degree of smoothing filtering from weak to strong, the index values are 0, 1, and 2 respectively. For example, the candidate interpolation filter set may include 5 linear interpolation filters, and according to the degree of smoothing filtering from weak to strong, the index values are 0, 1, 2, 3, and 4 respectively. 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 smoothing filtering of the filter is determined by the coefficients of the filter, and the present disclosure does not limit the specific values of the coefficients of the filter.

[0088] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter from a candidate linear interpolation filter set as the linear interpolation filter for intra prediction, a possible implementation method is: selecting the linear interpolation filter for intra prediction according to the distance between the pixel points and the reference pixel points in the intra prediction unit.

[0089] In an exemplary embodiment of the present disclosure, specifically, it is first possible to obtain reference pixels according to the intra prediction mode, and there are two possibilities for the obtained reference pixels: the reference pixels are the reconstructed pixels encoded in the row above the intra prediction unit, or the reference pixels are the reconstructed pixels encoded in the column to the left of the intra prediction unit.

[0090] In one example, the candidate interpolation filter set includes 3 linear interpolation filters, and the index values of these 3 linear interpolation filters according to the degree of smoothing filtering from weak to strong are 0, 1, and 2 respectively.

[0091] In an exemplary embodiment of the present disclosure, when the intra prediction unit is a luminance component prediction unit, when the reference pixel is the reconstructed pixel above, for the pixels of the first N1 rows in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of 0 is selected; for the pixels of the subsequent N2 rows, a linear interpolation filter with an index value of 1 is selected; and for the pixels of the subsequent rows, a linear interpolation filter with an index value of 2 is selected. When the reference pixel is the reconstructed pixel on the left, for the pixels of the first N3 columns in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of 0 is selected; for the pixels of the subsequent N4 columns, a linear interpolation filter with an index value of 1 is selected; and for the pixels of the subsequent columns, a linear interpolation filter with an index value of 2 is selected. 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 within the intra prediction unit.

[0092] In this case, for example, when the intra prediction unit is a luminance component prediction unit and the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 0 can be selected for the pixels of the first row in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of 1 can be selected for the pixels of the second row, and a linear interpolation filter with an index value of 2 can be selected for the pixels of the other rows. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 0 can be selected for the pixels of the first column in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of 1 can be selected for the pixels of the second column, and a linear interpolation filter with an index value of 2 can be selected for the pixels of the other columns.

[0093] It should be understood that in addition to using one linear interpolation filter for the first row or column, another linear interpolation filter for the second row or column, and yet another linear interpolation filter for the other rows or columns, it can also be, for example, using one linear interpolation filter for the first and second rows or columns, another linear interpolation filter for the third and fourth rows or columns, and yet another linear interpolation filter for the other rows or columns. 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 within 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 within the intra prediction unit.

[0096] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance 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 row pixels of the intra prediction unit in the top-down order, and a linear interpolation filter with an index value of 1 may be selected for the other row 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 column pixels of the intra prediction unit in the left-to-right order, and a linear interpolation filter with an index value of 1 may be selected for the other column pixels.

[0097] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance 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 pixel of the intra prediction unit in the top-down order, and a linear interpolation filter with an index value of 1 may be selected for the other row 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 pixel of the intra prediction unit in the left-to-right order, and a linear interpolation filter with an index value of 1 may be selected for the other column pixels.

[0098] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance 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 pixel of the intra prediction unit in the top-down order, a linear interpolation filter with an index value of 1 may be selected for the second row pixel, and a linear interpolation filter with an index value of 2 may be selected for the other row 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 pixel of the intra prediction unit in the left-to-right order, a linear interpolation filter with an index value of 1 may be selected for the second column pixel, and a linear interpolation filter with an index value of 2 may be selected for the other column pixels.

[0099] In another example, the candidate set of linear interpolation filters contains 5 filters, and the index values from weak to strong in terms of smoothing filtering degree are 0, 1, 2, 3, 4.

[0100] In this case, for example, when the intra prediction unit is a luminance component prediction unit and the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 0 can be selected for the first row of pixel points in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of 2 can be selected for the second row of pixel points, and a linear interpolation filter with an index value of 4 can be selected for the other rows of pixel points. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 0 can be selected for the first column of pixel points in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of 2 can be selected for the second column of pixel points, and a linear interpolation filter with an index value of 4 can be selected for the other columns of pixel points.

[0101] For example, when the intra prediction unit is a chrominance component prediction unit and the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 1 can be selected for the first row of pixel points in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of 3 can be selected for the second row of pixel points, and a linear interpolation filter with an index value of 4 can be selected for the other rows of pixel points. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 1 can be selected for the first column of pixel points in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of 3 can be selected for the second column of pixel points, and a linear interpolation filter with an index value of 4 can be selected for the other columns of pixel points.

[0102] For example, when the intra prediction unit is a luminance component prediction unit and the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 0 can be selected for the first and second rows of pixel points in the top-down order of the intra prediction unit, and a linear interpolation filter with an index value of 4 can be selected for the other rows of pixel points. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 0 can be selected for the first and second columns of pixel points in the left-to-right order of the intra prediction unit, and a linear interpolation filter with an index value of 4 can be selected for the other columns of pixel points.

[0103] For example, when the intra prediction unit is a chrominance component prediction unit and the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 3 can be selected for the first row of pixel points in the top-down order of the intra prediction unit, and a linear interpolation filter with an index value of 4 can be selected for the other rows of pixel points. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 3 can be selected for the first column of pixel points in the left-to-right order of the intra prediction unit, and a linear interpolation filter with an index value of 4 can be selected for the other columns of pixel points.

[0104] The specific distance value (i.e., which row / which column) between the pixel points in the intra prediction unit and the reference pixel points, as well as the index value of the selected filter, are not limited herein. However, the principle to be followed is that the smoother the filter selected for the prediction pixel closer to the reference pixel, the stronger the smoother the filter selected for the prediction pixel farther from the reference pixel. There is a possibility 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 the width and height information of the intra prediction unit. Therefore, when selecting a linear interpolation filter from the candidate linear interpolation filter set as the linear interpolation filter for intra prediction, another possible implementation method is: select the linear interpolation filter for intra prediction according to the reference pixel information and the width and height information of the intra prediction unit.

[0106] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter from the candidate linear interpolation filter set as the linear interpolation filter for intra prediction, the reference pixels of the intra prediction unit may be first determined according to the reference pixel information, and then, according to the width and height information of the intra prediction unit and the determined reference pixels, a linear interpolation filter is selected for each row or each column of pixel points of the intra prediction unit.

[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 the reconstructed pixel above the intra prediction unit, when selecting a linear interpolation filter for each row of pixel points of the intra prediction unit, when the width of the intra prediction unit is less than or equal to the 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 prediction unit, and the first threshold ∈ [2 2 , 2 7 , and is an exponential multiple of 2; when the width of the intra prediction unit is greater than the first threshold, for the pixel points of the first number of rows sorted in the order from top to bottom of the intra prediction unit, a linear interpolation filter with an index value of the second index value M2 is selected, and for the pixel points of the subsequent second number of rows, a linear interpolation filter with an index value of M2 + x 1 is selected, and for the pixel points of the subsequent rows, a linear interpolation filter with an index value of M2 + y 1 is selected, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I according to the smooth filtering degree from weak to strong, 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 the reconstructed pixel to the left of the intra prediction unit, when selecting a linear interpolation filter for each column of pixel points of the intra prediction unit, when the height of the intra prediction unit is less than or equal to a second threshold, a linear interpolation filter with an index value of a third index value M3 is selected for all pixel points within the intra prediction unit, where the second threshold ∈ [2 2 , 2 7 , and is an exponent multiple of 2; when the height of the intra prediction unit is greater than the second threshold, for the pixel points of the first third number of columns in the order from left to right of the intra prediction unit, a linear interpolation filter with an index value of a fourth index value M4 is selected, and for the pixel points of the subsequent fourth number of columns, a linear interpolation filter with an index value of M4 + x 2 is selected, and for the pixel points of the subsequent columns, a linear interpolation filter with an index value of M4 + y 2 is selected, where, when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I according to the degree of smoothing filtering from weak to strong, 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 the reconstructed pixel above the intra prediction unit, when selecting a linear interpolation filter for each row of pixel points 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 with an index value of a fifth index value M5 is selected for all pixel points within the intra prediction unit, where the third threshold ∈ [2 1 , 2 6 , and is an exponent multiple of 2; when the width of the intra prediction unit is greater than the third threshold, for the pixel points of the first fifth number of rows in the order from top to bottom of the intra prediction unit, a linear interpolation filter with an index value of a sixth index value M6 is selected, and for the pixel points of the subsequent rows, a linear interpolation filter with an index value of M6 + x 3 is selected, where, when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I according to the degree of smoothing filtering from weak to strong, 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 the reconstructed pixel to the left of the intra prediction unit, when selecting a linear interpolation filter for each column of pixel points of the intra prediction unit, when the height of the intra prediction unit is less than or equal to a fourth threshold, a linear interpolation filter with an index value of a seventh index value M7 is selected for all pixel points within the intra prediction unit, where the fourth threshold ∈ [2 1 , 26 , and is a multiple of 2; when the height of the intra prediction unit is greater than the fourth threshold, for the pixel points in the sixth number of columns sorted in the order from left to right of the intra prediction unit, a linear interpolation filter with an index value of the eighth index value M8 is selected, and for the pixel points in the subsequent columns, a linear interpolation filter with an index value of M8 + x 4 is selected, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the smoothing filtering degree, x 4 > 0, I ≥ M7 > M8 ≥ 0.

[0111] For example, in one example, the candidate interpolation filter set contains 3 linear interpolation filters, and the index values of these 3 linear interpolation filters in ascending order of the smoothing filtering degree are 0, 1, and 2 respectively.

[0112] In this case, when the intra prediction unit is a luminance component prediction unit and the reference pixel is the reconstructed pixel above, if the width of the intra 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 pixel points within the intra prediction unit. If the width of the intra prediction unit is greater than 8, for the first row of pixel points in the intra prediction unit in the top-down order, a linear interpolation filter with an index value of 0 is selected, for the second row of pixel points, a linear interpolation filter with an index value of 1 is selected, and for the other rows of pixel points, a linear interpolation filter with an index value of 2 is selected. Or, if the width of the intra prediction unit is greater than 8, for the first row of pixel points in the intra prediction unit in the top-down order, a linear interpolation filter with an index value of 0 is selected, and for the other rows of pixel points, a linear interpolation filter with an index value of 1 or 2 is selected. Or, if the width of the intra prediction unit is greater than 8, for the first row to, for example, the third row of pixel points in the intra prediction unit in the top-down order, a linear interpolation filter with an index value of 0 is selected, and for the other rows of pixel points, a linear interpolation filter with an index value of 1 or 2 is selected. 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 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 pixel points within the intra prediction unit. If the height of the intra prediction unit is greater than 8, for the first column of pixel points in the intra prediction unit in the left-to-right order, a linear interpolation filter with an index value of 0 is selected, for the second column of pixel points, a linear interpolation filter with an index value of 1 is selected, and for the other columns of pixel points, a linear interpolation filter with an index value of 2 is selected. Or, if the height of the intra prediction unit is greater than 8, for the first column of pixel points in the intra prediction unit in the left-to-right order, a linear interpolation filter with an index value of 0 is selected, and for the other columns of pixel points, a linear interpolation filter with an index value of 1 or 2 is selected. Or, if the height of the intra prediction unit is greater than 8, for the first column to, for example, the third column of pixel points in the intra prediction unit in the left-to-right order, a linear interpolation filter with an index value of 0 is selected, and for the other columns of pixel points, a linear interpolation filter with an index value of 1 or 2 is selected.

[0113] When the intra prediction unit is a chrominance 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, for example, 2, which is not limited here), then a linear interpolation filter with an index value of 2 is selected for all pixel points in the intra prediction unit. If the width of the intra prediction unit is greater than 4, then a linear interpolation filter with an index value of 1 is selected for the first row of pixel points in the intra prediction unit in the top-down order, and a linear interpolation filter with an index value of 2 is selected for other rows of pixel points. Or, if the width of the intra prediction unit is greater than 4, then a linear interpolation filter with an index value of 1 is selected for the first row to, for example, the third row of pixel points in the intra prediction unit in the top-down order, and a linear interpolation filter with an index value of 2 is selected for other rows of pixel points. 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, for example, 2, which is not limited here), then a linear interpolation filter with an index value of 2 is selected for all pixel points in the intra prediction unit. If the height of the intra prediction unit is greater than 4, then a linear interpolation filter with an index value of 1 is selected for the first column of pixel points in the intra prediction unit in the left-to-right order, and a linear interpolation filter with an index value of 2 is selected for other columns of pixel points. Or, if the height of the intra prediction unit is greater than 4, then a linear interpolation filter with an index value of 1 is selected for the first column to, for example, the third column of pixel points in the intra prediction unit in the left-to-right order, and a linear interpolation filter with an index value of 2 is selected for other columns of pixel points.

[0114] It should be understood that in addition to using one linear interpolation filter for the first row or column, one linear interpolation filter for the second row or column, and one linear interpolation filter for other rows or columns, it can also be, for example, using one linear interpolation filter for the first and second rows or columns, one linear interpolation filter for the third and fourth rows or columns, and one linear interpolation filter for other rows or columns. In addition to using one linear interpolation filter for the first row or column, one linear interpolation filter for the second row or column, and one linear interpolation filter for other rows or columns, it can also be, for example, using one linear interpolation filter for the first and second rows or columns, one linear interpolation filter for the third and fourth rows or columns, and one linear interpolation filter for other rows or columns, and it can also be, for example, using one linear interpolation filter for the first to third rows or columns, one linear interpolation filter for the fourth to sixth rows or columns, and one linear interpolation filter for other rows or columns, etc.

[0115] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter from the candidate linear interpolation filter set as the linear interpolation filter for intra prediction, another possible implementation method is: selecting the linear interpolation filter for intra prediction according to the texture complexity.

[0116] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter from a set of candidate linear interpolation filters as the linear interpolation filter for intra prediction, the texture complexity of the intra prediction unit may be calculated first to determine whether the intra prediction unit is texture-complex or texture-smooth, and then the linear interpolation filter for intra prediction may be selected according to whether the intra prediction unit is texture-complex or texture-smooth.

[0117] In an exemplary embodiment of the present disclosure, when selecting the linear interpolation filter for intra prediction according to whether the intra prediction unit is texture-complex or texture-smooth, when the intra prediction unit is a luminance component prediction unit and is texture-smooth, a linear interpolation filter with an index value of the ninth index value M9 is selected; when the intra prediction unit is a luminance component prediction unit and is texture-complex and the reference pixel is the upper reconstructed pixel, for the pixel points in the seventh number of rows sorted in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of the tenth index value M10 is selected, and for the pixel points in the subsequent eighth number of rows, a linear interpolation filter with an index value of M10 + x 5 is selected, and for the pixel points in the subsequent rows, a linear interpolation filter with an index value of M10 + y 5 is selected, where, when the index values of the linear interpolation filters in the set of candidate linear interpolation filters are from 0 to I in ascending order of the smoothing filtering degree, y 5 ≥x 5 > 0, I≥M9>M10≥0; when the intra prediction unit is a luminance component prediction unit and is texture-complex and the reference pixel is the left reconstructed pixel, for the pixel points in the ninth number of columns sorted in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of the eleventh index value M11 is selected, and for the pixel points in the subsequent tenth number of columns, a linear interpolation filter with an index value of M11 + x 6 is selected, and for the pixel points in the subsequent columns, a linear interpolation filter with an index value of M11 + y 6 is selected, where, when the index values of the linear interpolation filters in the set of candidate linear interpolation filters are from 0 to I in ascending order of the 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 prediction based on whether the intra prediction unit is texture-complex or texture-smooth, when the intra prediction unit is a chrominance component prediction unit and is texture-smooth, a linear interpolation filter with an index value of the twelfth index value M12 is selected; when the intra prediction unit is a chrominance component prediction unit and is texture-complex and the reference pixel is the reconstructed pixel above, for the pixels of the first eleven rows in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of the thirteenth index value M13 is selected, and for the pixels of the subsequent rows, a linear interpolation filter with an index value of M13 + x 7 is selected, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the smoothing filtering degree, x 7 > 0, I ≥ M12 > M13 ≥ 0; when the intra prediction unit is a chrominance component prediction unit and is texture-complex and the reference pixel is the reconstructed pixel on the left, for the pixels of the first twelve columns in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of the fourteenth index value M14 is selected, and for the pixels of the subsequent columns, a linear interpolation filter with an index value of M14 + x 8 is selected, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the smoothing filtering degree, x 8 > 0, I ≥ M12 > M14 ≥ 0.

[0119] For example, in one example, the candidate interpolation filter set includes 3 linear interpolation filters, and the index values of these 3 linear interpolation filters in ascending order of the smoothing filtering degree are 0, 1, and 2 respectively.

[0120] In this case, when the intra prediction unit is a luminance component prediction unit, first calculate the texture complexity of the intra prediction unit. The texture complexity can also be referred to as texture smoothness, or other metric terms representing texture characteristics. Whether the texture is complex (smooth) can be determined by calculating the difference value of the reference pixels and comparing it with a set threshold, or it can be obtained by calculating other values, which is not limited herein. The method for calculating the difference value of the reference pixels can be any one of the following three methods, or other methods, which is not limited herein:

[0121] Method 1, as Figure 7 shown, use the formula to calculate the difference value v of 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, as Figure 8As shown, use the formula to calculate the difference value v of the upper w reference pixel points and the left h reference pixel points. That is, take the reference pixels in the left column and the upper row as a group of pixel points, use the template of (-1, 0, 1) to subtract every other point and take the absolute value, and then calculate the average value.

[0123] Method 3, as Figure 9 shown, use the formula to sample and calculate the difference value v of the upper 3 reference pixel points (U0, Uw / 2, Uw) and the left 3 reference pixel points (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 values, 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 pixels, compare it with the set threshold. If v is less than the threshold, the intra prediction unit is a texture smooth unit; if v is greater than or equal to the threshold, the intra prediction unit is a texture complex unit.

[0125] For the texture smooth intra prediction unit, directly select the linear interpolation filter with an index value of 2. For the texture complex intra prediction unit, when the reference pixel is the upper reconstructed pixel, for the first row of pixel points in the order from top to bottom of the intra prediction unit, select the linear interpolation filter with an index value of 0; for the second row of pixel points, select the linear interpolation filter with an index value of 1; for the other row of pixel points, select the linear interpolation filter with an index value of 2. When the reference pixel is the left reconstructed pixel, for the first column of pixel points in the order from left to right of the intra prediction unit, select the linear interpolation filter with an index value of 0; for the second column of pixel points, select the linear interpolation filter with an index value of 1; for the other column of pixel points, select the linear interpolation filter with an index value of 2.

[0126] When the intra prediction unit is a chrominance component prediction unit, first calculate the texture complexity of the intra prediction unit in the same way as the luminance component prediction unit, the difference is that the reference pixel is the corresponding chrominance reconstructed pixel.

[0127] After calculating the difference value v of the reference pixels, compare it with the set threshold. If v is less than the threshold, the intra prediction unit is a texture smooth unit; if v is greater than or equal to the threshold, the intra prediction unit is a texture complex unit.

[0128] For a texture-smooth intra prediction unit, a linear interpolation filter with an index value of 2 is directly selected. For a texture-complex intra prediction unit, when the reference pixel is the reconstructed pixel above, for the first row of pixel points in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of 1 is selected, and for the other row pixel points, a linear interpolation filter with an index value of 2 is selected. When the reference pixel is the reconstructed pixel on the left, for the first column of pixel points in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of 1 is selected, and for the other column pixel points, a linear interpolation filter with an index value of 2 is selected.

[0129] It should be understood that in addition to using one linear interpolation filter for the first row or column, another linear interpolation filter for the second row or column, and another linear interpolation filter for the other rows or columns, it can also be, for example, using one linear interpolation filter for the first and second rows or columns, another linear interpolation filter for the third and fourth rows or columns, and another linear interpolation filter for the other rows or columns. In addition to using one linear interpolation filter for the first row or column, another linear interpolation filter for the second row or column, and another linear interpolation filter for the other rows or columns, it can also be, for example, using one linear interpolation filter for the first and second rows or columns, another linear interpolation filter for the third and fourth rows or columns, and another linear interpolation filter for the other rows or columns, and it can also be, for example, using one linear interpolation filter for the first to third rows or columns, another linear interpolation filter for the fourth to sixth rows or columns, and another linear interpolation filter for the other rows or columns, etc.

[0130] In step S603, according to the reference pixel information and the determined linear interpolation filter, calculate the predicted values of each pixel point in the intra prediction unit in the intra prediction mode.

[0131] After determining the linear interpolation filter for intra prediction in step S602, in step S603, use the linear interpolation filter and the reference pixel information obtained in step S602, and 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, calculate the predicted values of each pixel point in the intra prediction unit in the intra prediction mode. Here, p x,y is the predicted value of the pixel point to be predicted, x and y are the row and column coordinates of the pixel point, k is the index value of the linear interpolation filter, f k,i is the linear interpolation filter coefficient, i = 0 to 3, and in other implementation methods, i can also be in other ranges, which is not limited here. a 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] Figure 10 A flowchart of an encoding method according to an exemplary embodiment of the present disclosure is shown.

[0134] Reference Figure 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 based on 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 use the same method to select the linear interpolation filter for intra prediction. When determining the linear interpolation filter for intra prediction, a linear interpolation filter can be selected from a set of candidate linear interpolation filters. Here, the index value of the linear interpolation filters in the set of candidate linear interpolation filters can be from 0 to I, where I is a positive integer.

[0139] In step S1003, based on the reference pixel information and the determined linear interpolation filter, the predicted values of each pixel point in the intra prediction unit in the intra prediction mode are calculated.

[0140] In an exemplary embodiment of the present disclosure, specifically, when the color component of the intra prediction unit is a luminance component, the predicted value here can be a luminance predicted value. When the color component of the intra prediction unit is a chrominance component, the predicted value here can be a chrominance predicted value. It should be understood that the predicted value here can also be the predicted values of the R, G, and B color components.

[0141] In step S1004, a prediction mode is selected for encoding based on the predicted values.

[0142] In an exemplary embodiment of the present disclosure, specifically, when selecting a prediction mode for encoding based on the predicted values, the residual values between the predicted values of each pixel point in the intra prediction unit in the intra prediction mode and the original values of each pixel point in the intra prediction unit can be calculated first, and the residual values are transformed and quantized to obtain residual information. Then, all the intra prediction modes of each intra prediction unit and all the inter prediction modes of each inter prediction unit in the current coding unit are traversed, and the prediction mode with the minimum rate-distortion cost is selected as the final prediction mode. After that, the final prediction mode information and the residual information are encoded.

[0143] Figure 11 A flowchart showing a decoding method according to an exemplary embodiment of the present disclosure.

[0144] Referring to Figure 11 , in step S1101, the intra prediction units in the current decoding unit are determined, and the intra prediction unit information of the intra prediction units 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 regarding whether the color component of the intra prediction unit of the current coding unit is a luminance component or a chrominance component. Specifically, in addition to the luminance component and the chrominance component, the color component may further 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 used to indicate the intra prediction mode. The reference pixel information is information used to indicate the reference pixels of the intra prediction unit.

[0146] In an exemplary embodiment of the present disclosure, specifically, the decoded reconstructed pixels in the row immediately above and the column immediately to the left of the intra 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.

[0147] In step S1102, determine the linear interpolation filter for intra prediction according to the color component information, the reference pixel information, and the intra prediction mode information.

[0148] It should be noted that the decoding end and the encoding end should use the same method to select the linear interpolation filter for intra prediction.

[0149] In an exemplary embodiment of the present disclosure, when determining the linear interpolation filter for intra prediction according to the color component information, the reference pixel information, and the intra prediction mode information, it may first be determined whether the intra prediction mode of the intra prediction unit is an intra angular prediction mode according to the intra prediction mode information. When the intra prediction mode is an intra angular prediction mode, it is determined whether the intra prediction unit is a luminance component prediction unit or a chrominance component prediction unit according to the color component information, and 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, a linear interpolation filter is selected from the candidate linear interpolation filter set as the linear interpolation filter for intra prediction. Here, the candidate linear interpolation filter set is predefined 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 may be 0 to I, where I is a positive integer. For example, the candidate interpolation filter set may include 3 linear interpolation filters, and in the order of the degree of smoothing filtering from weak to strong, the index values are 0, 1, 2 respectively. For example, the candidate interpolation filter set may include 5 linear interpolation filters, and in the order of the degree of smoothing filtering from weak to strong, the index values are 0, 1, 2, 3, 4 respectively. It should be understood that the number of filters in the candidate interpolation filter set may be any number, and the present disclosure does not limit this. The strength of the smoothing filtering of the filter is determined by the coefficients of the filter, and the present disclosure does not limit the specific values of the coefficients of the filter.

[0150] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter from a candidate set of linear interpolation filters as the linear interpolation filter for intra prediction, a possible implementation method is as follows: select the linear interpolation filter for intra prediction according to the distance between the pixel points in the intra prediction unit and the reference pixel points.

[0151] In an exemplary embodiment of the present disclosure, specifically, the reference pixels can be obtained first according to the intra prediction mode. There are two possibilities for the obtained reference pixels: the reference pixels are the reconstructed pixels encoded in the row above the intra prediction unit, or the reference pixels are the reconstructed pixels encoded in the column to the left of the intra prediction unit.

[0152] In one example, the candidate set of interpolation filters contains 3 linear interpolation filters, and the index values of these 3 linear interpolation filters in ascending order of the degree of smoothing filtering are 0, 1, and 2 respectively.

[0153] In an exemplary embodiment of the present disclosure, when the intra prediction unit is a luminance component prediction unit, when the reference pixel is the reconstructed pixel above, for the pixel points in the first N1 rows in the order from top to bottom of the intra prediction unit, select the linear interpolation filter with an index value of 0; for the pixel points in the subsequent N2 rows, select the linear interpolation filter with an index value of 1; for the pixel points in the subsequent rows, select the linear interpolation filter with an index value of 2. When the reference pixel is the reconstructed pixel on the left, for the pixel points in the first N3 columns in the order from left to right of the intra prediction unit, select the linear interpolation filter with an index value of 0; for the pixel points in the subsequent N4 columns, select the linear interpolation filter with an index value of 1; for the pixel points in the subsequent columns, select the linear interpolation filter with an index value of 2. When the intra prediction unit is a chrominance component prediction unit, select the linear interpolation filter with an index value of 2 for all pixel points in the intra prediction unit.

[0154] In this case, for example, when the intra prediction unit is a luminance component prediction unit and the reference pixel is the reconstructed pixel above, for the pixel points in the first row in the order from top to bottom of the intra prediction unit, select the linear interpolation filter with an index value of 0; for the pixel points in the second row, select the linear interpolation filter with an index value of 1; for the pixel points in the other rows, select the linear interpolation filter with an index value of 2. When the reference pixel is the reconstructed pixel on the left, for the pixel points in the first column in the order from left to right of the intra prediction unit, select the linear interpolation filter with an index value of 0; for the pixel points in the second column, select the linear interpolation filter with an index value of 1; for the pixel points in the other columns, select the linear interpolation filter with an index value of 2.

[0155] It should be understood that, in addition to using a linear interpolation filter for the first row or column, a linear interpolation filter for the second row or column, and a linear interpolation filter for other rows or columns, it may also be, for example, using a linear interpolation filter for the first and second rows or columns, a linear interpolation filter for the third and fourth rows or columns, and a linear interpolation filter for other rows or columns. 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 pixel points within 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 pixel points within the intra prediction unit.

[0158] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance component prediction unit, when the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 0 can be selected for the first and second row pixel points in the order from top to bottom of the intra prediction unit, and a linear interpolation filter with an index value of 1 can be selected for other row pixel points. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 0 can be selected for the first and second column pixel points in the order from left to right of the intra prediction unit, and a linear interpolation filter with an index value of 1 can be selected for other column pixel points.

[0159] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance component prediction unit, when the reference pixel is the reconstructed pixel above, a linear interpolation filter with an index value of 0 can be selected for the first row pixel points in the order from top to bottom of the intra prediction unit, and a linear interpolation filter with an index value of 1 can be selected for other row pixel points. When the reference pixel is the reconstructed pixel on the left, a linear interpolation filter with an index value of 0 can be selected for the first column pixel points in the order from left to right of the intra prediction unit, and a linear interpolation filter with an index value of 1 can be selected for other column pixel points.

[0160] In another exemplary embodiment of the present disclosure, when the intra prediction unit is a chrominance component prediction unit, when the reference pixel is the reconstructed pixel above, for the first row of pixel points in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of 0 may be selected, for the second row of pixel points, a linear interpolation filter with an index value of 1 may be selected, and for the other rows of pixel points, a linear interpolation filter with an index value of 2 may be selected. When the reference pixel is the reconstructed pixel on the left, for the first column of pixel points in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of 0 may be selected, for the second column of pixel points, a linear interpolation filter with an index value of 1 may be selected, and for the other columns of pixel points, a linear interpolation filter with an index value of 2 may be selected.

[0161] In another example, the candidate set of linear interpolation filters contains 5 filters, and the index values from weak to strong in terms of smoothing filtering degree are 0, 1, 2, 3, 4.

[0162] In this case, for example, when the intra prediction unit is a luminance component prediction unit, when the reference pixel is the reconstructed pixel above, for the first row of pixel points in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of 0 may be selected, for the second row of pixel points, a linear interpolation filter with an index value of 2 may be selected, and for the other rows of pixel points, a linear interpolation filter with an index value of 4 may be selected. When the reference pixel is the reconstructed pixel on the left, for the first column of pixel points in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of 0 may be selected, for the second column of pixel points, a linear interpolation filter with an index value of 2 may be selected, and for the other columns of pixel points, a linear interpolation filter with an index value of 4 may be selected.

[0163] For example, when the intra prediction unit is a chrominance component prediction unit, when the reference pixel is the reconstructed pixel above, for the first row of pixel points in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of 1 may be selected, for the second row of pixel points, a linear interpolation filter with an index value of 3 may be selected, and for the other rows of pixel points, a linear interpolation filter with an index value of 4 may be selected. When the reference pixel is the reconstructed pixel on the left, for the first column of pixel points in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of 1 may be selected, for the second column of pixel points, a linear interpolation filter with an index value of 3 may be selected, and for the other columns of pixel points, a linear interpolation filter with an index value of 4 may be selected.

[0164] For example, when the intra prediction unit is a luminance component prediction unit, if the reference pixel is the reconstructed pixel above, for the first and second rows of pixel points in the intra prediction unit in the top-down order, a linear interpolation filter with an index value of 0 can be selected, and for the pixel points in other rows, a linear interpolation filter with an index value of 4 can be selected. If the reference pixel is the reconstructed pixel on the left, for the first and second columns of pixel points in the intra prediction unit in the left-to-right order, a linear interpolation filter with an index value of 0 can be selected, and for the pixel points in other columns, a linear interpolation filter with an index value of 4 can be selected.

[0165] When the intra prediction unit is a chrominance component prediction unit, if the reference pixel is the reconstructed pixel above, for the first row of pixel points in the intra prediction unit in the top-down order, a linear interpolation filter with an index value of 3 can be selected, and for the pixel points in other rows, a linear interpolation filter with an index value of 4 can be selected. If the reference pixel is the reconstructed pixel on the left, for the first column of pixel points in the intra prediction unit in the left-to-right order, a linear interpolation filter with an index value of 3 can be selected, and for the pixel points in other columns, a linear interpolation filter with an index value of 4 can be selected.

[0166] The specific distance value (i.e., which row / which column) between the pixel points in the intra prediction unit and the reference pixel points, and the index value of the selected filter are not limited herein. However, the principle to follow is that the smoother the filter selected by the prediction pixel closer to the reference pixel is, and the stronger the smoother the filter selected by the prediction pixel farther from the reference pixel is. There is a possibility 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 the width and height information of the intra prediction unit. Therefore, when selecting a linear interpolation filter from the candidate linear interpolation filter set as the linear interpolation filter for intra prediction, another possible implementation method is: select the linear interpolation filter for intra prediction according to the reference pixel information and the width and height information of the intra prediction unit.

[0168] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter from the candidate linear interpolation filter set as the linear interpolation filter for intra prediction, the reference pixel of the intra prediction unit can be first determined according to the reference pixel information, and then according to the width and height information of the intra prediction unit and the determined reference pixel, a linear interpolation filter is selected for each row or each column of pixel points in the intra prediction unit.

[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 selecting a linear interpolation filter for each row of pixel points 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 with an index value of a first index value M1 is selected for all pixel points within the intra prediction unit, the first threshold ∈ [2 2 , 2 7 , and is an exponential multiple of 2; when the width of the intra prediction unit is greater than the first threshold, for the pixel points of the first number of rows sorted in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of a second index value M2 is selected, and for the pixel points of the subsequent second number of rows, a linear interpolation filter with an index value of M2 + x 1 is selected, and for the pixel points of the subsequent rows, a linear interpolation filter with an index value of M2 + y 1 is selected, where when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I in ascending order of the 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 to the left of the intra prediction unit, when selecting a linear interpolation filter for each column of pixel points of the intra prediction unit, when the height of the intra prediction unit is less than or equal to a second threshold, a linear interpolation filter with an index value of a third index value M3 is selected for all pixel points within the intra prediction unit, the second threshold ∈ [2 2 , 2 7 , and is an exponential multiple of 2; when the height of the intra prediction unit is greater than the second threshold, for the pixel points of the first number of columns sorted in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of a fourth index value M4 is selected, and for the pixel points of the subsequent fourth number of columns, a linear interpolation filter with an index value of M4 + x 2 is selected, and for the pixel points of the subsequent columns, a linear interpolation filter with an index value of M4 + y 2 is selected, where when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I in ascending order of the 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 the reconstructed pixel above the intra prediction unit, when selecting a linear interpolation filter for each row of pixel points 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 with an index value of a fifth index value M5 is selected for all pixel points within the intra prediction unit, where the third threshold ∈ [2 1 , 2 6 , and is an exponential multiple of 2; when the width of the intra prediction unit is greater than the third threshold, for the pixel points of the first five rows in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of a sixth index value M6 is selected, and for the pixel points of the subsequent rows, a linear interpolation filter with an index value of M6 + x 3 is selected, where when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I in ascending order of the 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 the reconstructed pixel to the left of the intra prediction unit, when selecting a linear interpolation filter for each column of pixel points of the intra prediction unit, when the height of the intra prediction unit is less than or equal to a fourth threshold, a linear interpolation filter with an index value of a seventh index value M7 is selected for all pixel points within the intra prediction unit, where the fourth threshold ∈ [2 1 , 2 6 , and is an exponential multiple of 2; when the height of the intra prediction unit is greater than the fourth threshold, for the pixel points of the first six columns in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of an eighth index value M8 is selected, and for the pixel points of the subsequent columns, a linear interpolation filter with an index value of M8 + x 4 is selected, where when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I in ascending order of the smoothing filtering degree, x 4 > 0, I ≥ M7 > M8 ≥ 0.

[0173] For example, in one example, the candidate interpolation filter set includes 3 linear interpolation filters, and the indexes of these 3 linear interpolation filters in ascending order of the smoothing filtering degree are 0, 1, and 2 respectively.

[0174] In this case, when the intra prediction unit is a luminance component prediction unit and the reference pixel is the reconstructed pixel above, if the width of the intra 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 pixel points within the intra prediction unit. If the width of the intra prediction unit is greater than 8, for the first row of pixel points in the intra prediction unit in the top-down order, a linear interpolation filter with an index value of 0 is selected, for the second row of pixel points, a linear interpolation filter with an index value of 1 is selected, and for the other rows of pixel points, a linear interpolation filter with an index value of 2 is selected. Or, if the width of the intra prediction unit is greater than 8, for the first row of pixel points in the intra prediction unit in the top-down order, a linear interpolation filter with an index value of 0 is selected, and for the other rows of pixel points, a linear interpolation filter with an index value of 1 or 2 is selected. Or, if the width of the intra prediction unit is greater than 8, for the first row to, for example, the third row of pixel points in the intra prediction unit in the top-down order, a linear interpolation filter with an index value of 0 is selected, and for the other rows of pixel points, a linear interpolation filter with an index value of 1 or 2 is selected. 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 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 pixel points within the intra prediction unit. If the height of the intra prediction unit is greater than 8, for the first column of pixel points in the intra prediction unit in the left-to-right order, a linear interpolation filter with an index value of 0 is selected, for the second column of pixel points, a linear interpolation filter with an index value of 1 is selected, and for the other columns of pixel points, a linear interpolation filter with an index value of 2 is selected. Or, if the height of the intra prediction unit is greater than 8, for the first column of pixel points in the intra prediction unit in the left-to-right order, a linear interpolation filter with an index value of 0 is selected, and for the other columns of pixel points, a linear interpolation filter with an index value of 1 or 2 is selected. Or, if the height of the intra prediction unit is greater than 8, for the first column to, for example, the third column of pixel points in the intra prediction unit in the left-to-right order, a linear interpolation filter with an index value of 0 is selected, and for the other columns of pixel points, a linear interpolation filter with an index value of 1 or 2 is selected.

[0175] When the intra prediction unit is a chrominance 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), then a linear interpolation filter with an index value of 2 is selected for all pixel points within the intra prediction unit. If the width of the intra prediction unit is greater than 4, then a linear interpolation filter with an index value of 1 is selected for the first row of pixel points in the order from top to bottom of the intra prediction unit, and a linear interpolation filter with an index value of 2 is selected for the other rows of pixel points. Or, if the width of the intra prediction unit is greater than 4, then a linear interpolation filter with an index value of 1 is selected for the first row to, for example, the third row of pixel points in the order from top to bottom of the intra prediction unit, and a linear interpolation filter with an index value of 2 is selected for the other rows of pixel points. 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), then a linear interpolation filter with an index value of 2 is selected for all pixel points within the intra prediction unit. If the height of the intra prediction unit is greater than 4, then a linear interpolation filter with an index value of 1 is selected for the first column of pixel points in the order from left to right of the intra prediction unit, and a linear interpolation filter with an index value of 2 is selected for the other columns of pixel points. Or, if the height of the intra prediction unit is greater than 4, then a linear interpolation filter with an index value of 1 is selected for the first column to, for example, the third column of pixel points in the order from left to right of the intra prediction unit, and a linear interpolation filter with an index value of 2 is selected for the other columns of pixel points.

[0176] It should be understood that in addition to using one linear interpolation filter for the first row or column, one linear interpolation filter for the second row or column, and one linear interpolation filter for the other rows or columns, it can also be, for example, using one linear interpolation filter for the first and second rows or columns, one linear interpolation filter for the third and fourth rows or columns, and one linear interpolation filter for the other rows or columns. In addition to using one linear interpolation filter for the first row or column, one linear interpolation filter for the second row or column, and one linear interpolation filter for the other rows or columns, it can also be, for example, using one linear interpolation filter for the first and second rows or columns, one linear interpolation filter for the third and fourth rows or columns, and one linear interpolation filter for the other rows or columns, and it can also be, for example, using one linear interpolation filter for the first to third rows or columns, one linear interpolation filter for the fourth to sixth rows or columns, and one linear interpolation filter for the other rows or columns, etc.

[0177] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter from the candidate linear interpolation filter set as the linear interpolation filter for intra prediction, another possible implementation method is: selecting the linear interpolation filter for intra prediction according to the texture complexity.

[0178] In an exemplary embodiment of the present disclosure, when selecting a linear interpolation filter from a set of candidate linear interpolation filters as the linear interpolation filter for intra prediction, the texture complexity of the intra prediction unit may be calculated first to determine whether the intra prediction unit is texture-complex or texture-smooth, and then the linear interpolation filter for intra prediction may be selected according to whether the intra prediction unit is texture-complex or texture-smooth.

[0179] In an exemplary embodiment of the present disclosure, when selecting the linear interpolation filter for intra prediction according to whether the intra prediction unit is texture-complex or texture-smooth, when the intra prediction unit is a luminance component prediction unit and is texture-smooth, a linear interpolation filter with an index value of the ninth index value M9 is selected; when the intra prediction unit is a luminance component prediction unit and is texture-complex and the reference pixel is the reconstructed pixel above, for the pixel points of the seventh number of rows sorted in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of the tenth index value M10 is selected, and for the pixel points of the subsequent eighth number of rows, a linear interpolation filter with an index value of M10 + x 5 is selected, and for the pixel points of the subsequent rows, a linear interpolation filter with an index value of M10 + y 5 is selected, where when the index values of the linear interpolation filters in the set of candidate linear interpolation filters are 0 to I in ascending order of the smoothing filtering degree, y 5 ≥x 5 > 0, I≥M9>M10≥0; when the intra prediction unit is a luminance component prediction unit and is texture-complex and the reference pixel is the reconstructed pixel on the left, for the pixel points of the ninth number of columns sorted in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of the eleventh index value M11 is selected, and for the pixel points of the subsequent tenth number of columns, a linear interpolation filter with an index value of M11 + x 6 is selected, and for the pixel points of the subsequent columns, a linear interpolation filter with an index value of M11 + y 6 is selected, where when the index values of the linear interpolation filters in the set of candidate linear interpolation filters are 0 to I in ascending order of the 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 prediction based on whether the intra prediction unit is texture - complex or texture - smooth, when the intra 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 prediction unit is a chrominance component prediction unit, the texture is complex, and the reference pixel is the reconstructed pixel above, for the pixels of the first eleven rows in the top - down order of the intra prediction unit, a linear interpolation filter with an index value of the thirteenth index value M13 is selected, and for the pixels of the subsequent rows, a linear interpolation filter with an index value of M13 + x 7 is selected, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are from 0 to I in ascending order of the smooth filtering degree, x 7 > 0, I ≥ M12 > M13 ≥ 0; when the intra prediction unit is a chrominance component prediction unit, the texture is complex, and the reference pixel is the reconstructed pixel on the left, for the pixels of the first twelve columns in the left - to - right order of the intra prediction unit, a linear interpolation filter with an index value of the fourteenth index value M14 is selected, and for the pixels of the subsequent columns, a linear interpolation filter with an index value of M14 + x 8 is selected, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are from 0 to I in ascending order of the smooth filtering degree, x 8 > 0, I ≥ M12 > M14 ≥ 0.

[0181] For example, in one example, the candidate interpolation filter set contains 3 linear interpolation filters, and the index values of these 3 linear interpolation filters in ascending order of the smooth filtering degree are 0, 1, and 2 respectively.

[0182] In this case, when the intra prediction unit is a luminance component prediction unit, first calculate the texture complexity of the intra prediction unit. The texture complexity can also be called texture smoothness, or other metric terms representing texture characteristics. It can be determined whether the texture is complex (smooth) by calculating the difference value of the reference pixels and comparing it with a set threshold, or it can be obtained by calculating other values, which is not limited here. The method for calculating the difference value of the reference pixels can be any one of the following three methods, or other methods, which is not limited here:

[0183] Method 1, as Figure 7 shown, use the formula to calculate the difference value v of 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, as Figure 8As shown, use the formula to calculate the difference value v of the upper w reference pixels and the left h reference pixels. That is, take the reference pixels in the left column and the upper row as a group of pixels, use the template of (-1, 0, 1) to subtract every other point and take the absolute value, and then calculate the average value.

[0185] Method 3, as Figure 9 shown, use the formula to sample and calculate the difference value v of the upper 3 reference pixels (U0, Uw / 2, Uw) and the left 3 reference pixels (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 values, 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 pixels, compare it with the set threshold. If v is less than the threshold, the intra prediction unit is a texture smooth unit; if v is greater than or equal to the threshold, the intra prediction unit is a texture complex unit.

[0187] For the texture smooth intra prediction unit, directly select the linear interpolation filter with an index value of 2. For the texture complex intra prediction unit, when the reference pixel is the upper reconstructed pixel, for the first row of pixel points in the order from top to bottom of the intra prediction unit, select the linear interpolation filter with an index value of 0; for the second row of pixel points, select the linear interpolation filter with an index value of 1; for the other row of pixel points, select the linear interpolation filter with an index value of 2. When the reference pixel is the left reconstructed pixel, for the first column of pixel points in the order from left to right of the intra prediction unit, select the linear interpolation filter with an index value of 0; for the second column of pixel points, select the linear interpolation filter with an index value of 1; for the other column of pixel points, select the linear interpolation filter with an index value of 2.

[0188] When the intra prediction unit is a chrominance component prediction unit, first calculate the texture complexity of the intra prediction unit in the same way as the luminance component prediction unit, the difference is that the reference pixel is the corresponding chrominance reconstructed pixel.

[0189] After calculating the difference value v of the reference pixels, compare it with the set threshold. If v is less than the threshold, the intra prediction unit is a texture smooth unit; if v is greater than or equal to the threshold, the intra prediction unit is a texture complex unit.

[0190] For a texture-smooth intra prediction unit, a linear interpolation filter with an index value of 2 is directly selected. For a texture-complex intra prediction unit, when the reference pixel is the reconstructed pixel above, for the first row of pixel points in the top-down order of the intra prediction unit, a linear interpolation filter with an index value of 1 is selected, and for other row pixel points, a linear interpolation filter with an index value of 2 is selected. When the reference pixel is the reconstructed pixel on the left, for the first column of pixel points in the left-to-right order of the intra prediction unit, a linear interpolation filter with an index value of 1 is selected, and for other column pixel points, a linear interpolation filter with an index value of 2 is selected.

[0191] It should be understood that in addition to using one linear interpolation filter for the first row or column, one linear interpolation filter for the second row or column, and one linear interpolation filter for other rows or columns, it can also be, for example, using one linear interpolation filter for the first and second rows or columns, one linear interpolation filter for the third and fourth rows or columns, and one linear interpolation filter for other rows or columns. In addition to using one linear interpolation filter for the first row or column, one linear interpolation filter for the second row or column, and one linear interpolation filter for other rows or columns, it can also be, for example, using one linear interpolation filter for the first and second rows or columns, one linear interpolation filter for the third and fourth rows or columns, and one linear interpolation filter for other rows or columns, and it can also be, for example, using one linear interpolation filter for the first to third rows or columns, one linear interpolation filter for the fourth to sixth rows or columns, and one linear interpolation filter for other rows or columns, etc.

[0192] In step S1103, according to the reference pixel information and the determined linear interpolation filter, calculate the predicted values of each pixel point in the intra prediction unit in the intra prediction mode.

[0193] After determining the linear interpolation filter for intra prediction in step S1102, in step S1103, using the linear interpolation filter obtained in step S1102 and the reference pixel information, 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, calculate the predicted values of each pixel point in the intra prediction unit in the intra prediction mode. Here, p x,y is the predicted value of the pixel point to be predicted, x and y are the row and column coordinates of the pixel point, k is the index value of the linear interpolation filter, f k,i is the linear interpolation filter coefficient, i = 0~3, and in other implementation methods, i can also be in other ranges, which is not limited here. a iis the reference pixel value at the integer pixel position. When the reference pixel is the reconstructed pixel above, a 0 is the reference pixel at the integer pixel position in the same column (column x) as p x,y a -1 is the reference pixel at the integer pixel position in (column x - 1), a 1 is the reference pixel at the integer pixel position in (column x + 1), a 2 is the reference pixel at the integer pixel position in (column x + 2). When the reference pixel is the reconstructed pixel on the left, a 0 is the reference pixel at the integer pixel position in the same row (row x) as p x,y a -1 is the reference pixel at the integer pixel position in (row x - 1), a 1 is the reference pixel at the integer pixel position in (row x + 1), a 2 is the reference pixel at the integer pixel position in (row x + 2).

[0194] In an exemplary embodiment of the present disclosure, specifically, when the color component of the intra prediction unit is the luminance component, the prediction value here may be the luminance prediction value. When the color component of the intra prediction unit is the chrominance component, the prediction value here may be the chrominance prediction value. It should be understood that the prediction value here may also be the prediction value of the R, G, and B color components.

[0195] In step S1104, calculate the reconstruction value of the current decoding unit according to the prediction value.

[0196] In an exemplary embodiment of the present disclosure, specifically, when calculating the reconstruction value of the current decoding unit according to the prediction value, the residual value between the prediction value of each pixel point in the intra prediction mode and the original value of each pixel point in the intra prediction unit in the intra prediction unit may be determined first according to the residual information of the intra prediction unit (for example, the residual value may be obtained by performing inverse quantization and inverse transformation on the residual information obtained from the bitstream), and then the reconstruction value of the current decoding unit is calculated according to the prediction value and the residual value of each pixel point in the intra prediction unit in the intra prediction mode.

[0197] The above has been described in combination with FIGS. 1 to Figure 11 the intra prediction method and the encoding and decoding method based on intra prediction according to the exemplary embodiments of the present disclosure. In the following, reference will be made to Figures 12 to 14 describe the intra prediction device, the encoding and decoding device, and their units according to the exemplary embodiments of the present disclosure.

[0198] Figure 12 The block diagram of the intra prediction device according to the exemplary embodiment of the present disclosure is shown.

[0199] Refer toFigure 12 , the intra 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 includes at least 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 including 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 an intra prediction mode. The reference pixel information is information for indicating reference pixels of the intra prediction unit.

[0202] The filter determination unit 122 is configured to determine a linear interpolation filter for intra prediction according to the color component information, the reference pixel information, and the intra prediction mode information.

[0203] In an exemplary embodiment of the present disclosure, when determining the linear interpolation filter for intra prediction, a linear interpolation filter may be selected from a set of candidate linear interpolation filters. Here, the index value of the linear interpolation filters in the set of candidate linear interpolation filters may be 0 to I, and I is a positive integer.

[0204] For example, the set of candidate interpolation filters may include 3 linear interpolation filters, and in ascending order of the degree of smoothing filtering, the index values are 0, 1, and 2 respectively. For example, the set of candidate interpolation filters may include 5 linear interpolation filters, and in ascending order of the degree of smoothing filtering, the index values are 0, 1, 2, 3, and 4 respectively. It should be understood that the number of filters in the set of candidate interpolation filters may be any number, and the present disclosure does not limit this. The strength of the smoothing filtering of the filter is determined by the coefficients of the filter, and the present disclosure does not limit the specific values of the coefficients 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 angular prediction mode according to the intra prediction mode information; when the intra prediction mode is an intra angular 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 the set of candidate linear interpolation filters as the 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 the width and height information of the intra prediction unit. The filter determination unit 122 may also be configured to: determine the reference pixels of the intra prediction unit according to the reference pixel information; and select a linear interpolation filter for each row or each column of pixel points of the intra prediction unit according to the width and height information of the intra prediction unit and the determined reference pixels.

[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 a first index value M1 for all pixel points within the intra prediction unit, where the first threshold ∈ [2 2 , 2 7 , and is an exponential multiple of 2; when the width of the intra prediction unit is greater than the first threshold, select a linear interpolation filter with an index value of a second index value M2 for the pixel points of the first number of rows sorted in the top-down order of the intra prediction unit, select a linear interpolation filter with an index value of M2 + x 1 for the pixel points of the subsequent second number of rows, and select a linear interpolation filter with an index value of M2 + y 1 for the pixel points of the subsequent rows, where, when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I in ascending order 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 prediction unit is a luminance 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 a second threshold, select a linear interpolation filter with an index value of a third index value M3 for all pixel points within the intra prediction unit, where the second threshold ∈ [2 2 , 2 7 , and is an exponential multiple of 2; when the height of the intra prediction unit is greater than the second threshold, select a linear interpolation filter with an index value of a fourth index value M4 for the pixel points of the first number of columns sorted in the left-to-right order of the intra prediction unit, select a linear interpolation filter with an index value of M4 + x 2 for the pixel points of the subsequent fourth number of columns, and select a linear interpolation filter with an index value of M4 + y 2 for the pixel points of the subsequent columns, where, when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I in ascending order 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 further be 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 a third threshold, select a linear interpolation filter with an index value of a fifth index value M5 for all pixel points within the intra prediction unit, where the third threshold ∈ [2 1 , 2 6 , and is an exponential multiple of 2; when the width of the intra prediction unit is greater than the third threshold, select a linear interpolation filter with an index value of a sixth index value M6 for the pixel points in the first five rows in the top - down order of the intra prediction unit, and select a linear interpolation filter with an index value of M6 + x 3 for the pixel points in the subsequent rows, where, when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I in ascending order of the 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 further 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 a fourth threshold, select a linear interpolation filter with an index value of a seventh index value M7 for all pixel points within the intra prediction unit, where the fourth threshold ∈ [2 1 , 2 6 , and is an exponential multiple of 2; when the height of the intra prediction unit is greater than the fourth threshold, select a linear interpolation filter with an index value of an eighth index value M8 for the pixel points in the first six columns in the left - to - right order of the intra prediction unit, and select a linear interpolation filter with an index value of M8 + x 4 for the pixel points in the subsequent columns, where, when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I in ascending order of the 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 further be configured to: calculate the texture complexity of the intra prediction unit, determine whether the intra prediction unit is texture - complex or texture - smooth; and select a linear interpolation filter for intra prediction according to whether the intra prediction unit is texture - complex or texture - smooth.

[0212] In an exemplary embodiment of the present disclosure, the filter determination unit 122 may further be configured to: when the intra 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 prediction unit is a luminance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel above, for the pixels of the first seven rows in the top-down order of the intra prediction unit, select a linear interpolation filter with an index value of the tenth index value M10, and for the pixels of the subsequent eight rows, select a linear interpolation filter with an index value of M10 + x 5 of the linear interpolation filter, and for the pixels of the subsequent rows, select a linear interpolation filter with an index value of M10 + y 5 of the linear interpolation filter, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the 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 pixels of the first nine columns in the left-to-right order of the intra prediction unit, select a linear interpolation filter with an index value of the eleventh index value M11, and for the pixels of the subsequent ten columns, select a linear interpolation filter with an index value of M11 + x 6 of the linear interpolation filter, and for the pixels of the subsequent columns, select a linear interpolation filter with an index value of M11 + y 6 of the linear interpolation filter, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the 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 further be configured to: when the intra prediction unit is a chrominance 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 prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel above, for the pixels of the first eleven rows in the top-down order of the intra prediction unit, select a linear interpolation filter with an index value of the thirteenth index value M13, and for the pixels of the subsequent rows, select a linear interpolation filter with an index value of M13 + x 7 of the linear interpolation filter, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the 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 in the twelfth column in the order from left to right of the intra prediction unit, a linear interpolation filter with the fourteenth index value M14 is selected, and for the pixel points in the subsequent columns, a linear interpolation filter with the index value of M14 + x 8 is selected, where, when the index values of the linear interpolation filters in the candidate linear interpolation filter set are from 0 to I in ascending order of the smoothing filtering degree, x 8 > 0, I ≥ M12 > M14 ≥ 0.

[0214] The prediction value calculation unit 123 is configured to calculate the prediction values of the pixel points 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 the prediction values of the R, G, and B color components.

[0216] Figure 13 The block diagram of an encoding device according to an exemplary embodiment of the present disclosure is shown.

[0217] Referring to Figure 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 encoding 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 encoding 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.

[0220] In an exemplary embodiment of the present disclosure, specifically, the encoded reconstructed pixels in the row immediately above and the column immediately to the left of the intra 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. The present disclosure places no restrictions thereon.

[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 same method should be used at the decoding end and the encoding end to select the linear interpolation filter for intra prediction. When determining the linear interpolation filter for intra prediction, a linear interpolation filter may be selected from a set of candidate linear interpolation filters. Here, the index value of the linear interpolation filters in the set of candidate linear interpolation filters may be 0 to I, where I is a positive integer.

[0223] For example, the set of candidate interpolation filters may include 3 linear interpolation filters, and in ascending order of the degree of smoothing filtering, the index values are 0, 1, and 2 respectively. For example, the set of candidate interpolation filters may include 5 linear interpolation filters, and in ascending order of the degree of smoothing filtering, the index values are 0, 1, 2, 3, and 4 respectively. It should be understood that the number of filters in the set of candidate interpolation filters may be any number, and the present disclosure places no restrictions thereon. The strength of the smoothing filtering of the filter is determined by the coefficients of the filter, and the present disclosure places no restrictions on the specific values of the coefficients of the filter.

[0224] The prediction value calculation unit 133 is configured to calculate the prediction values 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 the prediction values of the R, G, and 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 values between the predicted values of each pixel point in the intra prediction unit in the intra prediction mode and the original values of each pixel point in the intra prediction unit, and perform transform quantization on the residual values to obtain residual information. Then, it traverses all intra prediction modes of each intra prediction unit of the current encoding unit and all inter prediction modes of each inter prediction unit, selects the prediction mode with the minimum rate-distortion cost as the final prediction mode. After that, it encodes the final prediction mode information and the residual information.

[0228] Figure 14 FIG. shows a block diagram of a decoding device according to an exemplary embodiment of the present disclosure.

[0229] Referring to Figure 14 , the decoding device includes an information acquisition unit 141, a filter determination unit 142, a predicted value calculation unit 143, and a reconstructed 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 at least includes 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 encoding unit is a luminance component or a chrominance component. Specifically, in addition to including the luminance component and the chrominance component, the color component may also include R component, G component, B component, etc., and the present disclosure does not limit this. The intra prediction mode information is information used to indicate the intra prediction mode. The reference pixel information is information used to indicate the reference pixels of the intra prediction unit.

[0232] In an exemplary embodiment of the present disclosure, specifically, the decoded reconstructed pixels in the row immediately above and the column immediately to the left of the intra 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.

[0233] The filter determination unit 142 is configured to determine the linear interpolation filter for intra prediction according to the color component information, the reference pixel information, and the intra prediction mode information.

[0234] It should be noted that the decoding end and the encoding end should use the same method to select the linear interpolation filter for intra 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 set of candidate linear interpolation filters. Here, the index values of the linear interpolation filters in the set of candidate linear interpolation filters may be from 0 to I, where I is a positive integer.

[0236] For example, the set of candidate interpolation filters may include 3 linear interpolation filters, and in ascending order of the degree of smoothing filtering, the index values are 0, 1, and 2 respectively. For example, the set of candidate interpolation filters may include 5 linear interpolation filters, and in ascending order of the degree of smoothing filtering, the index values are 0, 1, 2, 3, and 4 respectively. It should be understood that the number of filters in the set of candidate interpolation filters may be any number, and the present disclosure places no limitation thereon. The strength of the smoothing filtering of the filter is determined by the coefficients of the filter, and the present disclosure places no limitation on the specific values of the coefficients 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 angular prediction mode according to the intra prediction mode information; when the intra prediction mode is an intra angular 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 the set of candidate linear interpolation filters as the 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 the width and height information of the intra prediction unit. The filter determination unit 142 may further be configured to: determine the reference pixels of the intra prediction unit according to the reference pixel information; and select a linear interpolation filter for each row or each column of pixel points of the intra prediction unit according to the width and height information of the intra prediction unit and the determined reference pixels.

[0239] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may further be configured to: when the intra prediction unit is a luminance component prediction unit and the reference pixel is the 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 a first index value M1 for all pixel points within the intra prediction unit, where the first threshold ∈ [2 2 , 2 7 , and is an exponential multiple of 2; when the width of the intra prediction unit is greater than the first threshold, select a linear interpolation filter with an index value of a second index value M2 for the first number of rows of pixel points sorted in the top-down order of the intra prediction unit, and select a linear interpolation filter with an index value of M2 + x for the second number of rows of pixel points thereafter 1For the linear interpolation filter, for the pixel points in the subsequent rows, select the index value M2 + y 1 For the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I according to the degree of smoothing filtering from weak to strong, y 1 ≥x 1 >0, I≥M1>M2≥0.

[0240] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may further be configured to: when the intra prediction unit is a luminance component prediction unit and the reference pixel is the reconstructed pixel on the left of the intra prediction unit, when the height of the intra prediction unit is less than or equal to the second threshold, select a linear interpolation filter with the index value of the third index value M3 for all pixel points in the intra prediction unit, the second threshold ∈ [2 2 , 2 7 , and is an exponent multiple of 2; when the height of the intra prediction unit is greater than the second threshold, for the pixel points in the first third number of columns in the order from left to right of the intra prediction unit, select a linear interpolation filter with the index value of the fourth index value M4, and for the pixel points in the subsequent fourth number of columns, select a linear interpolation filter with the index value of M4 + x 2 For the linear interpolation filter, and for the pixel points in the subsequent columns, select a linear interpolation filter with the index value of M4 + y 2 For the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I according to the degree of smoothing filtering from weak to strong, y 2 ≥x 2 >0, I≥M3>M4≥0.

[0241] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may further be configured to: when the intra prediction unit is a chrominance component prediction unit and the reference pixel is the 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 the index value of the fifth index value M5 for all pixel points in the intra prediction unit, the third threshold ∈ [2 1 , 2 6 , and is an exponent multiple of 2; when the width of the intra prediction unit is greater than the third threshold, for the pixel points in the first fifth number of rows in the order from top to bottom of the intra prediction unit, select a linear interpolation filter with the index value of the sixth index value M6, and for the pixel points in the subsequent rows, select a linear interpolation filter with the index value of M6 + x 3 For the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I according to the degree of smoothing filtering from weak to strong, x 3 >0, I≥M5>M6≥0.

[0242] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may further 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 a fourth threshold, select a linear interpolation filter with an index value of the seventh index value M7 for all pixel points within the intra prediction unit, where the fourth threshold ∈ [2 1 , 2 6 , and is an exponent multiple of 2; when the height of the intra prediction unit is greater than the fourth threshold, select a linear interpolation filter with an index value of the eighth index value M8 for the pixel points in the first six columns in the order from left to right of the intra prediction unit, and select a linear interpolation filter with an index value of M8 + x 4 for the pixel points in the subsequent columns, where, when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I in ascending order 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 further be configured to: calculate the texture complexity of the intra prediction unit, and determine whether the intra prediction unit is texture complex or texture smooth; select a linear interpolation filter for intra prediction according to whether the intra prediction unit is texture complex or texture smooth.

[0244] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may further be configured to: when the intra prediction unit is a luminance component prediction unit and is texture smooth, select a linear interpolation filter with an index value of the ninth index value M9; when the intra prediction unit is a luminance component prediction unit and is texture 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 pixel points in the first seven rows in the order from top to bottom of the intra prediction unit, select a linear interpolation filter with an index value of M10 + x 5 for the pixel points in the subsequent eight rows, and select a linear interpolation filter with an index value of M10 + y 5 for the pixel points in the subsequent rows, where, when the linear interpolation filters in the candidate linear interpolation filter set are indexed from 0 to I in ascending order 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 is texture complex and the reference pixel is a reconstructed pixel to the left, select a linear interpolation filter with an index value of the eleventh index value M11 for the pixel points in the first nine columns in the order from left to right of the intra prediction unit, and select a linear interpolation filter with an index value of M11 + x 6For the pixel points of the subsequent columns, the index value M11 + y is selected for the linear interpolation filter 6 For the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the degree of smoothing filtering, y 6 ≥x 6 >0, I≥M9>M11≥0.

[0245] In an exemplary embodiment of the present disclosure, the filter determination unit 142 may further be configured to: when the intra prediction unit is a chrominance 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 prediction unit is a chrominance component prediction unit and the texture is complex and the reference pixel is the reconstructed pixel above, for the pixel points of the first eleven rows in the order from top to bottom of the intra prediction unit, select a linear interpolation filter with an index value of the thirteenth index value M13, and for the pixel points of the subsequent rows, select a linear interpolation filter with an index value of M13 + x 7 For the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the degree of smoothing filtering, 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 first twelve columns in the order from left to right of the intra prediction unit, select a linear interpolation filter with an index value of the fourteenth index value M14, and for the pixel points of the subsequent columns, select a linear interpolation filter with an index value of M14 + x 8 For the linear interpolation filter, where when the index values of the linear interpolation filters in the candidate linear interpolation filter set are 0 to I in ascending order of the degree of smoothing filtering, x 8 >0, I≥M12>M14≥0.

[0246] The prediction value calculation unit 143 is configured to calculate the prediction values of the pixel points 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 the prediction values of the R, G, and B color components.

[0248] The reconstruction value calculation unit 144 is configured to calculate the reconstruction value of the 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 prediction unit in the intra prediction mode and the original value of each pixel point in the intra prediction unit according to the residual information of the intra prediction unit (for example, the residual value can be obtained by performing inverse quantization and inverse transformation on the residual information obtained from the bitstream), and then calculate the reconstruction value of the current decoding unit according to the predicted value of each pixel point in the intra prediction unit in the intra 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, and when the computer program is executed, an encoding method according to an 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 prediction unit, obtaining intra prediction unit information of the intra prediction unit, where the intra prediction unit information at least includes intra prediction mode information, reference pixel information, and color component information; determining a linear interpolation filter for intra prediction according to the color component information, reference pixel information, and intra prediction mode information; and calculating the predicted 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.

[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 may be implemented: determining an intra prediction unit in the current coding unit, obtaining intra prediction unit information of the intra prediction unit, where the intra prediction unit information at least includes intra prediction mode information, reference pixel information, and color component information; determining a linear interpolation filter for intra prediction according to the color component information, reference pixel information, and intra prediction mode information; calculating the predicted 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; and selecting a prediction mode for encoding according to the predicted 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 programs are executed, the following steps may be implemented: determining an intra prediction unit in a current decoding unit, obtaining intra prediction unit information of the intra prediction unit, where the intra prediction unit information at least includes intra prediction mode information, reference pixel information, and color component information; determining a linear interpolation filter for intra prediction according to the color component information, the reference pixel information, and the intra prediction mode information; calculating predicted values 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; and calculating a reconstruction value of the current decoding unit according to the predicted values.

[0254] A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium 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 of the above. In an embodiment of the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a computer program, and the computer program may be used by or in combination with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable storage medium may be transmitted by any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above. The computer-readable storage medium may be included in any device; it may also exist alone without being assembled into the device.

[0255] The above has been combined with Figures 12 to 14 The intra prediction device and the encoding / decoding device according to the exemplary embodiments of the present disclosure have been described. Next, in combination with Figure 15 A computing device according to an exemplary embodiment of the present disclosure will be described.

[0256] Figure 15 A schematic diagram showing a computing device according to an exemplary embodiment of the present disclosure.

[0257] Referring to Figure 15 , a computing device 15 according to an exemplary embodiment of the present disclosure includes a memory 151 and a processor 152. A computer program is stored on the memory 151, and when the computer program is executed by the processor 152, an encoding method according to an 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 may be implemented: determining an intra prediction unit, obtaining intra prediction unit information of the intra prediction unit, where the intra prediction unit information at least includes intra prediction mode information, reference pixel information, and color component information; determining a linear interpolation filter for intra prediction according to the color component information, the reference pixel information, and the intra prediction mode information; and calculating prediction values 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.

[0259] In another exemplary embodiment of the present disclosure, when the computer program is executed by the processor 152, the following steps may be implemented: determining an intra prediction unit in a current coding unit, obtaining intra prediction unit information of the intra prediction unit, where the intra prediction unit information at least includes intra prediction mode information, reference pixel information, and color component information; determining a linear interpolation filter for intra prediction according to the color component information, the reference pixel information, and the intra prediction mode information; calculating prediction values 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; and selecting a prediction mode for coding according to the prediction values.

[0260] In another exemplary embodiment of the present disclosure, when the computer program is executed by the processor 152, the following steps may be implemented: determining an intra prediction unit in a current decoding unit, obtaining intra prediction unit information of the intra prediction unit, where the intra prediction unit information at least includes intra prediction mode information, reference pixel information, and color component information; determining a linear interpolation filter for intra prediction according to the color component information, the reference pixel information, and the intra prediction mode information; calculating prediction values 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; and calculating a reconstruction value of the current decoding unit according to the prediction values.

[0261] Figure 15 The computing device shown is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.

[0262] The above has been described with reference to FIGS. 1 to Figure 15 the intra prediction method and apparatus, and the encoding and decoding methods and apparatuses based on intra prediction according to the exemplary embodiments of the present disclosure. However, it should be understood that: Figures 12 to 14 the intra prediction apparatus, the encoding apparatus, and their units shown in Figure 15 may be respectively configured as software, hardware, firmware, or any combination of the above items for performing specific functions, and

[0263] The intra prediction method and apparatus according to an exemplary embodiment of the present disclosure, and the encoding and decoding methods and apparatus based on intra prediction. By a selection method of using different intra prediction linear interpolation filters for the intra prediction units of the luminance component and the chrominance component according to the color component information and the intra prediction mode information, the differences in texture features between the chrominance component prediction unit and the luminance component prediction unit are fully considered, that is, the chrominance component contains less texture details and high-frequency information than the luminance component. Thus, the accuracy of intra prediction is improved, the texture inside the prediction unit becomes more natural, and further the energy after image encoding is more concentrated, improving the encoding efficiency.

[0264] Although the present disclosure has been specifically shown and described with reference to its exemplary embodiments, those skilled in the art should understand that various changes in form and details may be made thereto without departing from the spirit and scope of the present disclosure defined by the claims.

Claims

1. An intra prediction method, comprising: obtaining intra prediction mode information of a luminance block of a current coding unit and intra prediction mode information of a chrominance block of the current coding unit; when the color component of the current coding unit is a luminance component: wherein, when pixels in the upper row adjacent to the luminance block of the current coding unit are used as reference pixels according to the intra prediction mode information of the luminance block, a first distance index indicates a vertical distance between the pixels in the upper row and a first pixel of the luminance block, and a second distance index indicates a vertical distance between the pixels in the upper row and a second pixel of the luminance block, wherein, when pixels in the left column adjacent to the luminance block of the current coding unit are used as reference pixels according to the intra prediction mode information of the luminance block, a first distance index indicates a horizontal distance between the pixels in the left column and a first pixel of the luminance block, and a second distance index indicates a horizontal distance between the pixels in the left column and a 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 a first distance value, and determining 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 luminance block by applying the first linear interpolation filter to a first luminance reference pixel corresponding to the position of the first pixel of the luminance block determined based on the intra prediction mode information of the luminance block, the first luminance reference pixel being included in the upper row or the left column at a first distance index from the first pixel of the luminance block; and obtaining a second predicted pixel corresponding to the second pixel of the luminance block by applying the second linear interpolation filter to a second luminance reference pixel corresponding to the position of the second pixel of the luminance block determined based on the intra prediction mode information of the luminance block, the second luminance reference pixel being included in the upper row or the left column at a second distance index from the second pixel of the luminance block; when the color component of the current coding unit is a chrominance component: wherein, when pixels in the upper row adjacent to the chrominance block of the current coding unit are used as reference pixels according to the intra prediction mode information of the chrominance block, a third distance index indicates a vertical distance between the pixels in the upper row and a third pixel of the chrominance block, and a fourth distance index indicates a vertical distance between the pixels in the upper row and a fourth pixel of the chrominance block, wherein, when pixels in the left column adjacent to the chrominance block of the current coding unit are used as reference pixels according to the intra prediction mode information of the chrominance block, a third distance index indicates a horizontal distance between the pixels in the left column and a third pixel of the chrominance block, and a fourth distance index indicates a horizontal distance between the pixels in the left column and a fourth pixel of the chrominance block, wherein 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 a second distance value, and determining a fourth linear interpolation filter for intra prediction for a fourth distance index greater than the second distance value; A third prediction pixel corresponding to the third pixel of the chrominance block is obtained by applying a third linear interpolation filter to a first chrominance reference pixel corresponding to the position of the third pixel of the chrominance block determined based on the intra prediction mode information of the chrominance block. The first chrominance reference pixel is included in the upper row or the left column at a third distance index from the third pixel of the chrominance block; and A fourth prediction pixel corresponding to the fourth pixel of the chrominance block is obtained by applying a fourth linear interpolation filter to a second chrominance reference pixel corresponding to the position of the fourth pixel of the chrominance block determined based on the intra prediction mode information of the chrominance block. The second chrominance reference pixel is included in the upper row or the left column at a fourth distance index from the fourth pixel of the chrominance block, wherein a second distance value of the chrominance block is greater than a first distance value of the luminance block, wherein the intra prediction mode information of the chrominance block includes an intra-derived mode DM.

2. An intra prediction apparatus, comprising: an information acquisition unit configured to acquire intra prediction mode information of a luminance block of a current coding unit and intra prediction mode information of a chrominance block of the current coding unit; a filter determination unit configured to: when a color component of the current coding unit is a luminance component: wherein when a pixel in the upper row adjacent to the luminance block of the current coding unit is used as a reference pixel according to the intra prediction mode information of the luminance block, a first distance index indicates a vertical distance between the pixel in the upper row and a first pixel of the luminance block, and a second distance index indicates a vertical distance between the pixel in the upper row and a second pixel of the luminance block, wherein when a pixel in the left column adjacent to the luminance block of the current coding unit is used as a reference pixel according to the intra prediction mode information of the luminance block, a first distance index indicates a horizontal distance between the pixel in the left column and a first pixel of the luminance block, and a second distance index indicates a horizontal distance between the pixel in the left column and a 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, determine 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 chrominance component: wherein when a pixel in the upper row adjacent to the chrominance block of the current coding unit is used as a reference pixel according to the intra prediction mode information of the chrominance block, a third distance index indicates a vertical distance between the pixel in the upper row and a third pixel of the chrominance block, and a fourth distance index indicates a vertical distance between the pixel in the upper row and a fourth pixel of the chrominance block, wherein when a pixel in the left column adjacent to the chrominance block of the current coding unit is used as a reference pixel according to the intra prediction mode information of the chrominance block, a third distance index indicates a horizontal distance between the pixel in the left column and a third pixel of the chrominance block, and a fourth distance index indicates a horizontal distance between the pixel in the left column and a fourth pixel of the chrominance block, wherein 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 a second distance value, and determine 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; A prediction value calculation unit, configured to: When the color component of the current coding unit is a luminance component, obtain a first predicted pixel corresponding to the first pixel of the luminance block by applying a first linear interpolation filter to a first luminance reference pixel corresponding to the position of the first pixel of the luminance block determined based on the intra prediction mode information of the luminance block. The first luminance reference pixel is included in the upper row or the left column at a first distance index from the first pixel of the luminance block, and obtain a second predicted pixel corresponding to the second pixel of the luminance block by applying a second linear interpolation filter to a second luminance reference pixel corresponding to the position of the second pixel of the luminance block determined based on the intra prediction mode information of the luminance block. The second luminance reference pixel is included in the upper row or the left column at a second distance index from the second pixel of the luminance block, and When the color component of the current coding unit is a chrominance component, obtain a third predicted pixel corresponding to the third pixel of the chrominance block by applying a third linear interpolation filter to a first chrominance reference pixel corresponding to the position of the third pixel of the chrominance block determined based on the intra prediction mode information of the chrominance block. The first chrominance reference pixel is included in the upper row or the left column at a third distance index from the third pixel of the chrominance block, and obtain a fourth predicted pixel corresponding to the fourth pixel of the chrominance block by applying a fourth linear interpolation filter to a second chrominance reference pixel corresponding to the position of the fourth pixel of the chrominance block determined based on the intra prediction mode information of the chrominance block. The second chrominance reference pixel is included in the upper row or the left column at a fourth distance index from the fourth pixel of the chrominance block. Wherein, the intra prediction mode information of the chrominance block includes the intra-derived mode DM.