Patent ID: 8005306

Claim:
A decoding apparatus for decoding input code data, the decoding apparatus comprising: an entropy decoding section that decodes the input code data and generates quantization indices; an inverse quantization-value estimating section that estimates inverse quantization values based on the quantization indices; a distribution estimation section, that outputs distribution data, comprising: (a) a significant-digit determination section that determines a significant bit lengths of a bit string indicating a quantization index and classifies, into a plurality of groups, the quantization indices based on the significant bit lengths; (b) a frequency-information generation section that generates histograms of the quantization indices classified by the significant-digit determination section for each group, each group having quantization indices with the same number of truncated bits; and (c) a frequency-information integration section that integrates the histograms generated for each group having quantization indices with the same number of truncated bits to generate a single histogram by dividing a wider quantization interval of a first group of the plurality of groups of the quantization indices by the narrowest quantization interval of a second group other group of the plurality of groups of quantization indices; an expected-value estimating section that calculates expected values based on the distributed data from the distribution estimation section; a random-number generating section that generates a random number in accordance with the distribution data from the distribution estimation section; a correction section that corrects the inverse quantization values from the inverse-quantization-value estimation section in accordance with expected values from the expected-value estimating section; an inverse-quantization-value output section that determines inverse quantization values to be applied using the inverse quantization values from the correction section or the random number from the random-number generating section; and an inverse transform section that generates a decoded image of the input code data based on the inverse quantization values from the inverse-quantization-value output section.