A quantizer scale value is detected with high accuracy. The number of effective
samples of results of which DCT coefficients are quantized with each of quantizer
scale values Q=1 to 31 is counted. In addition, fractional parts of quantized values
are cumulated. When the number of effective samples of a cumulated value does not
satisfy a predetermined value, the cumulated value is not used. When a dip point
of a considered normalized cumulated value [q] quantized with the number of effective
samples corresponding to each of the quantizer scale values Q clearly exists, using
the relation between the normalized cumulated value [q] and normalized cumulated
values [q-;1] and [q+1] whose quantizer scale codes are immediately preceded and
immediately followed by the quantizer scale code of the normalized cumulated value
[q], it is determined whether or not the quantizer scale value Q corresponding
to the normalized cumulated value [q] is a quantizer scale value Q used in the
preceding encoding. Although the dip point of the normalized cumulated value [q]
does not clearly exist, when the reliability of data is high, further using a normalized
cumulated value [q+2] whose quantizer scale code is different by 2 from the quantizer
scale code of the normalized cumulated value [q], it is determined whether or not
the quantizer scale value Q corresponding to the normalized cumulated value [q]
is a quantizer scale value used in the preceding encoding process.