The video encoder is configured to encode pictures of a video into coded data by block-based predictive encoding of a plurality of predictive blocks, wherein the block-based predictive encoding includes intra picture prediction. In intra picture prediction, a plurality of nearest reference samples and a plurality of extended reference samples immediately adjacent to the prediction block are used to encode the prediction block of the picture, each extended reference sample among the plurality of extended reference samples Is spaced apart from the prediction block by at least one nearest reference sample among a plurality of reference samples immediately adjacent to the prediction block. The video encoder is further configured to determine availability and unusability of each of the plurality of nearest reference samples, and to replace the nearest reference sample determined to be unusable with a replacement sample. The video encoder is configured to use this replacement sample for intra picture prediction.
展开▼