The encoding device of the present invention comprises a type
determination unit inputs each bit of the weblet co-efficient in a depth
direction in parallel and determines type information indicating which
the bit is, the first "1" bit when viewed from an MSB side, a bit located
further on the MSB side than the first "1" bit, a bit located further on
an LSB side than the first "1" bit, a buffer unit for buffering the
determined type information of each bit for each bit depth and a pass
determination unit for determining pass information of a type information
to process, of a plurality of pieces of type information, based on the
plurality of pieces of buffered type information of the same depth.