A speech and/or audio coding apparatus comprising: a coding layer (206, 207, 208, 209) adapted to receive as input a speech and/or audio input signal in a frequency domain X(k) and a low-frequency decoded signal in a frequency domain X1(k) generated using decoding of low-frequency coded information which encodes a low-frequency part of the input signal; generate high-frequency coded information including a plurality of indexes i j and a plurality of first gain parameters α 1 (j), where j=0,..., L-1, L being a number of subbands in a high-frequency part of the frequency domain; generate a high-frequency decoded signal in the high-frequency part of the frequency domain X2 j H (k) according to equation X2 j H (k)=α 1 (j)X1(k-i j); generate a band extension signal by adding the low-frequency decoded signal and the high-frequency decoded signal; and generate a difference signal between the input signal and the band extension signal; and a coding section adapted to encode the difference signal to generate difference coded information, wherein: the coding layer is adapted to set the index i j for the j-th sub-band in the high-frequency part of the frequency domain by searching a number d maximizing S(d), where S d = | ∑ k = 0 n j − 1 X j k X 1 d + k ∑ k = 0 n j − 1 X 1 d + k 2 | where n j is a number of samples in the j-th subband in the high-frequency part of the frequency domain and X j is the input signal in this j-th subband; and is adapted to set α 1 (j) to ∑ k = 0 n j − 1 X j k X 1 d + k ∑ k = 0 n j − 1 X 1 d + k 2 using the found d. a coding layer (206, 207, 208, 209) adapted to receive as input a speech and/or audio input signal in a frequency domain X(k) and a low-frequency decoded signal in a frequency domain X1(k) generated using decoding of low-frequency coded information which encodes a low-frequency part of the input signal; generate high-frequency coded information including a plurality of indexes i j and a plurality of first gain parameters α 1 (j), where j=0,..., L-1, L being a number of subbands in a high-frequency part of the frequency domain; generate a high-frequency decoded signal in the high-frequency part of the frequency domain X2 j H (k) according to equation X2 j H (k)=α 1 (j)X1(k-i j); generate a band extension signal by adding the low-frequency decoded signal and the high-frequency decoded signal; and generate a difference signal between the input signal and the band extension signal; and a coding section adapted to encode the difference signal to generate difference coded information, wherein: the coding layer is adapted to set the index i j for the j-th sub-band in the high-frequency part of the frequency domain by searching a number d maximizing S(d), where S d = | ∑ k = 0 n j − 1 X j k X 1 d + k ∑ k = 0 n j − 1 X 1 d + k 2 | where n j is a number of samples in the j-th subband in the high-frequency part of the frequency domain and X j is the input signal in this j-th subband; and is adapted to set α 1 (j) to ∑ k = 0 n j − 1 X j k X 1 d + k ∑ k = 0 n j − 1 X 1 d + k 2 using the found d. the coding layer is adapted to set the index i j for the j-th sub-band in the high-frequency part of the frequency domain by searching a number d maximizing S(d), where S d = | ∑ k = 0 n j − 1 X j k X 1 d + k ∑ k = 0 n j − 1 X 1 d + k 2 | where n j is a number of samples in the j-th subband in the high-frequency part of the frequency domain and X j is the input signal in this j-th subband; and is adapted to set α 1 (j) to ∑ k = 0 n j − 1 X j k X 1 d + k ∑ k = 0 n j − 1 X 1 d + k 2 using the found d.