Patent ID: 8918315

Claim:
An encoding apparatus comprising: a first layer encoder that encodes an input signal to acquire first layer encoded data; a first layer decoder that decodes the first layer encoded data to acquire a first layer decoded signal; a first layer error transform coefficient calculator that transforms a first layer error signal that is a difference between the input signal and the first layer decoded data into a frequency domain to calculate a first layer error transform coefficient; and a second layer encoder that encodes the first layer error transform coefficient to acquire second layer encoded data, wherein the second layer encoder comprises: a band determiner that determines a band which is a target to be encoded by the second layer encoder, based on tonality or energy of the input signal; a first shape vector encoder that refers the first layer error transform coefficient included in the band which is determined by the band determiner and has a predetermined first bandwidth, to generate a first shape vector by arranging a predetermined number of pulses in the band, and to generate first shape encoded information from positions of the predetermined number of pulses; a target gain calculator that calculates a target gain per subband having a predetermined second bandwidth, using the first layer error transform coefficient and the first shape vector included in the band; a gain vector generator that generates a gain vector using a plurality of the target gains calculated per subband; and a gain vector encoder that encodes the gain vector to acquire first gain encoded information.