An intra-prediction method performed by a decoding device, comprising: acquiring intra-prediction mode information from a bitstream; deriving neighboring samples of a current block; determining an intra-prediction mode for the current block based on the intra-prediction mode information; deriving a prediction sample of the current block based on the intra-prediction mode and the neighboring samples; determining filtering reference samples for the prediction sample based on the intra-prediction mode; and applying filtering to the prediction sample based on the filtering reference samples to derive a filtered prediction sample, characterized in that wherein the determining of the filtering reference samples comprises: determining a category corresponding to the intra-prediction mode; and determining the filtering reference samples based on a relative positional relationship with respect to the prediction sample according to the determined category, wherein the filtering reference samples include a left neighboring sample and a right neighboring sample of the prediction sample when the determined category is a first category, wherein the filtering reference samples include an upper neighboring sample and a lower neighboring sample of the prediction sample when the determined category is a second category, wherein the filtering reference samples include a left lower neighboring sample and a right upper neighboring sample of the prediction sample when the determined category is a third category, wherein the filtering reference samples include a left upper neighboring sample and a right lower neighboring sample of the prediction sample when the determined category is a fourth category, and wherein the filtering reference samples are located in the current block when the prediction sample is not positioned at the boundary of the current block. acquiring intra-prediction mode information from a bitstream; deriving neighboring samples of a current block; determining an intra-prediction mode for the current block based on the intra-prediction mode information; deriving a prediction sample of the current block based on the intra-prediction mode and the neighboring samples; determining filtering reference samples for the prediction sample based on the intra-prediction mode; and applying filtering to the prediction sample based on the filtering reference samples to derive a filtered prediction sample, characterized in that wherein the determining of the filtering reference samples comprises: determining a category corresponding to the intra-prediction mode; and determining the filtering reference samples based on a relative positional relationship with respect to the prediction sample according to the determined category, wherein the filtering reference samples include a left neighboring sample and a right neighboring sample of the prediction sample when the determined category is a first category, wherein the filtering reference samples include an upper neighboring sample and a lower neighboring sample of the prediction sample when the determined category is a second category, wherein the filtering reference samples include a left lower neighboring sample and a right upper neighboring sample of the prediction sample when the determined category is a third category, wherein the filtering reference samples include a left upper neighboring sample and a right lower neighboring sample of the prediction sample when the determined category is a fourth category, and wherein the filtering reference samples are located in the current block when the prediction sample is not positioned at the boundary of the current block. determining a category corresponding to the intra-prediction mode; and determining the filtering reference samples based on a relative positional relationship with respect to the prediction sample according to the determined category, wherein the filtering reference samples include a left neighboring sample and a right neighboring sample of the prediction sample when the determined category is a first category, wherein the filtering reference samples include an upper neighboring sample and a lower neighboring sample of the prediction sample when the determined category is a second category, wherein the filtering reference samples include a left lower neighboring sample and a right upper neighboring sample of the prediction sample when the determined category is a third category, wherein the filtering reference samples include a left upper neighboring sample and a right lower neighboring sample of the prediction sample when the determined category is a fourth category, and wherein the filtering reference samples are located in the current block when the prediction sample is not positioned at the boundary of the current block.