An apparatus for intra prediction of a current video coding block of a frame of a video signal, the current video coding block comprising a plurality of samples, each sample having a sample value and a position within the frame, the apparatus comprising:
- a processing unit configured to:
- determine a fitting plane based on a plurality of primary reference samples located in a first set of neighboring video coding blocks of the current video coding block, wherein the fitting plane defines a plurality of fitting samples, each fitting sample having a fitting sample value and a position within the frame;
- generate, for a selected directional intra prediction mode, a plurality of secondary reference samples based on the plurality of primary reference samples and the plurality of fitting samples, wherein the plurality of secondary reference samples are located in a second set of neighboring video coding blocks of the current video coding block;
- and
- predict the sample values of the plurality of samples of the current video coding block based on the plurality of primary reference samples and the plurality of secondary reference samples,
- wherein for generating the plurality of secondary reference samples based on the plurality of primary reference samples and the plurality of fitting samples, the processing unit is configured to:
- determine, for each primary reference sample, a respective primary offset value between the primary reference sample value and a corresponding fitting sample value;
- predict a respective secondary offset value at each secondary reference sample position based on at least a subset of the plurality of primary offset values and the selected intra prediction mode;
- and
- generate a respective secondary reference sample value based on the respective secondary offset value and the fitting sample value of the respective fitting sample.