An encoding system capable of preventing the overflow of a buffer and
performing the encoding of a VOP within a predetermined time period even
where the processing time period necessary for encoding each macroblock
is not constant. In order to provide the encoding system, the maximum
number of bits Tmax is set for each VOP, and the output of encoding unit
and the output of fixed code output unit is switched and outputted so
that the number of bits Sc of the VOP may not exceed the Tmax.