A prediction method, apparatus, and medium including computer readable
code, for calculating an average of intra-prediction costs or an average
of inter-prediction costs of macroblocks of a received picture by
encoding the received picture using an intra-prediction and/or
inter-prediction in consideration of a type of the received picture,
calculating a threshold value using the calculated average of
intra-predication costs and/or inter-predication costs, and determining
whether to perform intra-prediction on a subsequent picture based on the
calculated threshold value. Accordingly, it is possible to considerably
reduce the amount of computation that conventionally was required to
encode a picture, without any deterioration in the encoding performance,
by considerably reducing the number of macroblocks that need to undergo
intra-prediction.