A moving picture decoding method according to the present invention includes an intra prediction step (S403) of calculating a predicted sample value of the target block by performing intra prediction on a target block, a prediction step of adding a residual sample of the target block to the prediction sample value And a reconstructed sample calculating step (S404) of calculating a reconstructed sample of the target block, wherein in the intra prediction step, validity of each of a plurality of reference samples located on one side of the target block and on the right side of the target block is judged And when the plurality of reference samples include a valid reference sample and an invalid reference sample, the intra prediction is performed using the valid reference sample, the intra prediction reference sample is determined as a valid reference sample, The reference sample is judged as an invalid reference sample.;
展开▼