Patent attributes
The present invention pertains to an encoding device and method, a decoding device and method, and to a program, with which sound of an appropriate volume level can be obtained with a smaller quantity of codes. A first gain calculation circuit calculates a first gain for volume level correction of an input time series signal, and a second gain calculation circuit calculates a second gain for volume level correction of a downmixed signal obtained by downmixing of the input time series signal. A gain encoding circuit computes the gain differential between the first gain and the second gain, the gain differential between time frames, and the gain differential within time frames, and encodes the first gain and the second gain. The present invention can be applied in encoding devices and decoding devices.