Patent ID: 6950040

Claim:
A coding apparatus for carrying out a context adaptive binary arithmetic coding to a syntax element representing an image signal to be coded, where a size of a range between first data with high appearance probability and second data with low appearance probability is defined by a first data, and a lower limit indicating a boundary between the first and second data is defined by a second data, and performing a shift operation to the first data and the second data in this sequence, in a direction from a least significant bit (LSB) to a most significant bit (MSB) until the shifted first data exceeds a predetermined value, and generating a coded data responsive to the shifted second data immediately before the finish of the shift operation, said coding apparatus comprising: a bit position specifying means for specifying a bit position indicating a first logical value, most close to the MSB in the first data; a shift amount specifying means for specifying a shift amount of the first data immediately before the finish of the shift operation on the basis of the bit position specified by the bit position specifying means; a judging means for judging the existence or not of an empty region having a size exceeding the shift amount specified at the shift amount specifying means, in an expansion data having a predetermined bit length which is added to the MSB of the second data and is carried up a digit of a bit data from the second data by the shift operation; and a coding means for generating the coded data from the data accommodated in the expansion data by the shift operation when not existing of the empty region.