1. A moving picture coding apparatus for dividing a picture into basic blocks including a block to be predicted, a first reference pixel block and a second reference pixel block and generating a prediction image of the block to be predicted by using pixels in the first reference pixel block as reference pixels to perform intra predictive coding of a moving picture, wherein the first reference pixel block and the second reference pixel block are adjacent to the block to be predicted in the picture, wherein when some of the reference pixels of the first reference pixel block are not available, substitute pixel values for said some of the reference pixels are calculated based on pixel values of available pixels in the second reference pixel block and the prediction image of the block to be predicted is generated by using the calculated substitute pixel values, wherein said some of the reference pixels constitute a first pixel line and the available pixels of the second reference pixel block constitute a second pixel line, which is parallel with and closest to the first pixel line, and wherein when said some of the reference pixels are adjacently located at upper side of the block to be predicted, a block adjacently located at left side of the block to be predicted is used as the second reference pixel block, an uppermost horizontal line of the second reference pixel block is used as the second pixel line, each pixel in the second pixel line corresponds to one of pixel of the first pixel line, an average value of the pixel values in the second pixel line and differences between the respective pixel values in the second pixel line and the average value are calculated, the differences are respectively added to a pixel value of a rightmost pixel of the second pixel line to obtain final values to be padded, and the final values are padded to respective pixels in corresponding positions of the first pixel line as the substitute pixel values to thereby generate the prediction image of the block to be predicted.