Patent ID: 7075984

Claim:
A code quantity control apparatus employed in equipment comprising: a decoding unit for inputting picture compressed information in accordance with a predetermined format and decoding said picture compressed information in a pixel domain or a frequency domain, wherein said picture compressed information includes at least an intraframe encoded picture, an interframe forward directional prediction encoded picture and a bi-directional prediction encoded picture and has completed an external encoding process based on discrete cosine transformation and motion compensation; and an encoding unit for encoding picture compressed information decoded by said decoding unit, wherein code quantity control is executed in an internal encoding process for each macroblock on the basis of a virtual buffer by using information extracted from said picture compressed information input to said decoding unit; wherein an initial occupation size of said virtual buffer for a first intraframe encoded picture is computed on the basis of information extracted from said picture compressed information input to said decoding unit; and wherein an initial occupation size of said virtual buffer for a first intraframe encoded picture is computed by executing the steps of: multiplying an average quantization scale for said first intraframe encoded picture by a code quantity for said first intraframe encoded picture to result in a first product; dividing said first product by a target code quantity for said first intraframe encoded picture to result in a reference quantization scale for said first intraframe encoded picture; multiplying said reference quantization scale for said first intraframe encoded picture by a parameter for controlling a response speed of a feedback loop determined by said predetermined format to result in a second product; and dividing said second product by a predetermined constant.