Patent ID: 7236530

Claim:
A variable-length decoding apparatus comprising: an input unit which receives encoded data formed from a variable length code made up of reversible code words configured to be decoded in both a forward direction and a backward direction; a forward decoder which decodes the encoded data in each predetermined section in the forward direction; a backward decoder which decodes the encoded data in each predetermined section in the backward direction; and a decode value determination unit which outputs a final decode result from decode results respectively obtained by said forward decoder and said backward decoder, wherein each of said forward and backward decoders includes a detection unit for detecting an error in the encoded data, and said decode value determination unit determines a decode value by using an error detection position in the decoded data in units of syntax which is detected by said forward decoder and indicates an error position in the encoded data, and an error detection position in units of syntax which is detected by said backward decoder and indicates an error position in the encoded data.