A digital still camera for decoding a code string, the code string including a plurality of entropy codes, the entropy codes being generated by orthogonally transforming, quantizing and entropy coding each pixel of a block, the block including a predetermined number of pixels and being obtained by dividing image data, the digital still camera comprising:
- a first storage unit operable to store the code string;
- an entropy decoding unit operable to extract an entropy code from the first storage unit, entropy decoding the extracted entropy code to generate a coefficient corresponding to the entropy code;
- a coefficient generation unit operable to generate an orthogonal transform coefficient based on the generated coefficient;
- a second storage unit operable to store the generated orthogonal transform coefficient;
- a decoding control unit operable to direct, after the generated coefficient has been processed by the coefficient generation unit and the second storage unit, the entropy decoding unit to extract a next entropy code and perform entropy decoding for the newly extracted entropy code;
- an inverse orthogonal transformation unit operable to read the orthogonal transform coefficient from the second storage unit, and convert the orthogonal transform coefficient to generate a plurality of blocks;
- and
- a display unit operable to generate image data from the newly generated blocks, and display the newly generated image data,
- wherein the entropy decoding unit includes:
- a code string storing subunit operable to store a code string including an entropy code, the entropy code being generated by coding a coefficient relating to the image data;
- a decoding table containing a coefficient corresponding to an entropy code;
- a code specifying table containing entry information showing an entropy code corresponding to a coefficient, the entry information including compressed information and uncompressed information, the compressed information being generated by run-length compressing a part of the entropy code and showing a bit length of the run-length compressed part, and the uncompressed information showing another part of the entropy code aside from the run-length compressed part;
- a run-length obtaining subunit operable to obtain a run-length of a run included in the code string, the run being a bit string of consecutive, same sign bits starting from a predetermined bit location;
- a bit length obtaining subunit operable to obtain from the code specifying table the uncompressed information corresponding to the compressed information showing a same bit length as the obtained run-length;
- a specifying subunit operable to specify, as the entropy code, a bit string that starts from the predetermined bit location and that has a length determined based on the obtained run-length and the length shown by the obtained uncompressed information;
- and
- a decoding subunit operable to obtain from the decoding table a coefficient corresponding to the specified entropy code.