Patent ID: 7330598

Claim:
An image encoding apparatus comprising: filtering means for hierarchically applying a filtering process to an input image to generate a plurality of subbands; code block generation means for dividing the subbands generated by the filtering means to generate a plurality of code blocks each having a specified size; bit plane generation means for generating a plurality of bit planes from the highest bit to the lowest bit in units of the code blocks; bit modeling means for applying bit modeling to the plurality of bit planes generated by the bit plane generation means so as to traverse all code blocks from a bit plane having the highest bit position to a bit plane having the lowest bit position; coding pass generation means for generating a coding pass for each bit plane where the bit modeling is performed; encoding means for arithmetically encoding the coding pass generated by the coding pass generation means; code amount control means for controlling code amounts so as to reach a specified targeted code amount based on an arithmetic code generated by the encoding means; and packet generation means for generating a packet by attaching a header to an encoded code stream whose code amount is controlled by the code amount control means, wherein the code amount control means accumulates code amounts of arithmetic codes generated upon termination of arithmetic coding for each coding pass or a coding pass included in each bit plane and controls the encoding means so as to arithmetically encode the next coding pass when an accumulated value is smaller than or equal to the specified targeted code amount or so as to stop arithmetic coding when the accumulated value exceeds the specified targeted code amount.