A method of performing intra prediction of a current block of a picture of a video sequence, the method being performed by at least one processor comprising: determining whether a first flag indicates that an intra prediction mode corresponding to the current block is a directional mode; and based on the first flag being determined to indicate that the intra prediction mode corresponding to the current block is the directional mode: determining an index of the intra prediction mode in an allowed intra prediction modes, AIPM, list; and performing the intra prediction of the current block, using the intra prediction mode corresponding to the determined index in the AIPM list, characterized by based on the first flag being determined to indicate that the intra prediction mode corresponding to the current block is the directional mode, determining whether a second flag indicates that the intra prediction mode is a decoder side intra mode derivation, DIMD, mode; based on the second flag being determined to not indicate that the intra prediction mode is the DIMD mode: determining the index of the intra prediction mode in the AIPM list; and performing the intra prediction of the current block, using the intra prediction mode corresponding to the determined index in the AIPM list; and based on the second flag being determined to indicate that the intra prediction mode is in the DIMD mode: performing a DIMD to determine the intra prediction mode; and performing the intra prediction of the current block, using the determined intra prediction mode. determining whether a first flag indicates that an intra prediction mode corresponding to the current block is a directional mode; and based on the first flag being determined to indicate that the intra prediction mode corresponding to the current block is the directional mode: determining an index of the intra prediction mode in an allowed intra prediction modes, AIPM, list; and performing the intra prediction of the current block, using the determining an index of the intra prediction mode in an allowed intra prediction modes, AIPM, list; and performing the intra prediction of the current block, using the intra prediction mode corresponding to the determined index in the AIPM list, characterized by based on the first flag being determined to indicate that the intra prediction mode corresponding to the current block is the directional mode, determining whether a second flag indicates that the intra prediction mode is a decoder side intra mode derivation, DIMD, mode; based on the second flag being determined to not indicate that the intra prediction mode is the DIMD mode: determining the index of the intra prediction mode in the AIPM list; and performing the intra prediction of the current block, using the intra prediction mode corresponding to the determined index in the AIPM list; and determining the index of the intra prediction mode in the AIPM list; and performing the intra prediction of the current block, using the intra prediction mode corresponding to the determined index in the AIPM list; and based on the second flag being determined to indicate that the intra prediction mode is in the DIMD mode: performing a DIMD to determine the intra prediction mode; and performing the intra prediction of the current block, using the determined intra prediction mode. performing a DIMD to determine the intra prediction mode; and performing the intra prediction of the current block, using the determined intra prediction mode. <EOS>