A bit rate by which encoded data is supplied for decoding at the time of
decoding is specified based on the encoded data obtained by encoding.
Further, an encoding difficulty of processed data is detected. Then, a
quantization scale is controlled based on the specified bit rate and the
detected encoding difficulty.