Meanwhile, the intra prediction method used for the 4×4 block shown in one of FIGS. 9a to 9d can be adaptively used by indicating which one of the four kinds of methods is used for a current macroblock. For instance, a different method is used for each macroblock by displaying a specific method on a macroblock (MB) layer. Alternatively, it is able use a different method for each slice by displaying a specific method on a slice layer.
FIG. 10 shows a method of predicting a motion vector of a current block in inter prediction of H.264/AVC. Referring to FIG. 10, H.264/AVC uses prediction coding of a median value. Prediction coding of a motion vector uses median values of horizontal and vertical components using motion vectors mvA, mvB and mvC of left, top and right top blocks A, B and C.
The H.264/AVC estimates a motion from a frame which was encoded by dividing a video frame and then uses a motion compensation for predicting a current block. If a block size for the motion compensation is reduced, a precise prediction is possible. Yet, since motion vector information needs to be coded, a coding size for the motion vector information increases. This is why a method of applying an optimal block size among various motion compensation block sizes is used.
FIG. 11 shows a motion compensation block size in H.264/AVC.