Patent ID: 8781001

Claim:
An encoding method for encoding last position information indicating a position of a last non-zero coefficient in a predetermined order in a current block to be encoded, the encoding method comprising: binarizing the last position information to generate (i) a binary signal which includes a first signal having a length smaller than or equal to a predetermined maximum length and does not include a second signal or (ii) a binary signal which includes the first signal having the predetermined maximum length and the second signal; first encoding for arithmetically encoding each of binary symbols included in the first signal using a context switched among a plurality of contexts according lo a bit position of the binary symbol; and second encoding for arithmetically encoding the second signal using a fixed probability when the binary signal includes the second signal, wherein in the first encoding, a binary symbol at a last bit position of the first signal is arithmetically encoded using a context exclusive to the last bit position, when the first signal has the predetermined maximum length, and each of binary symbols at two or more bit positions other than the last bit position of the first signal is arithmetically encoded using a context common to the two or more bit positions.