Patent ID: 7751476

Claim:
A method for encoding a moving picture, comprising: supplying the moving picture to a moving picture coding device; generating from the moving picture a plurality of prediction signals of a pixel block in an input picture by performing prediction in accordance with a plurality of prediction modes; generating a plurality of prediction residual signals between the pixel block and each of the plurality of prediction signals; estimating a plurality of first coding costs from the plurality of prediction residual signals and code amounts of prediction mode information, the prediction mode information indicating the plurality of prediction modes, each of the plurality of first coding costs being estimated for each of the plurality of prediction modes; selecting a plurality of prediction mode candidates from the plurality of prediction modes in ascending order of the plurality of first coding costs, the plurality of prediction mode candidates corresponding in number to a quantization step width; obtaining a plurality of coding distortions and a plurality of code amounts for the plurality of prediction mode candidates by coding the plurality of pixel blocks in accordance with the prediction mode candidates; estimating second coding costs for the prediction mode candidates based on the coding distortions and the code amounts for the prediction mode candidates; and selecting a prediction mode from the prediction mode candidates based on the second coding costs, the pixel block being coded in accordance with the selected one prediction mode in order to produce an encoded moving picture from the moving picture coding device, wherein the selecting the prediction mode candidates obtains the number of the prediction mode candidates by a relationship between the number of the prediction mode candidates and the quantization step width on the basis of correlation between the quantization step width and a coincident ratio of the first coding costs and the second coding costs.