Encoding apparatus and encoding method

Information is encoded into a code with a smaller number of bits. An encoding apparatus encodes an acoustic time series signal such that the acoustic time series signal is split into band signals in predetermined bands and gain adjustment is made on the band signals, at a gain control position by a gain control amount, for each of as many positions as indicated by a gain control number. Although the gain control number can take any one of values from 0 to 7, it has a high probability of taking a particular value (0, for example). The gain control number is encoded such that a code with a small number of bits is assigned to the gain control number equal to a value having a high-occurrence probability. The encoding is also applied to a voice recording apparatus.

TECHNICAL FIELD

The present invention relates to an encoding apparatus and an encoding method, and more particularly, to an encoding apparatus and an encoding method capable of performing encoding with an improved encoding efficiency.

BACKGROUND ART

FIG. 1shows an example of a construction of an encoding apparatus1according to a conventional technique.

A band splitter11, formed of a filter such as a QMF (Quadrature Mirror Filter) or a PQF (Polyphase Quadrature Filter), splits input audio signal into plural (12, in this specific example) frequency bands and outputs resultant signals of respective bands (hereinafter, such signals will be referred to as encoding units) A0to A11(when it is not necessary to distinguish individual encoding units from each other, a simple expression “encoding unit A” will be employed. Similar simple expressions will also be used elsewhere in the present description) to respective spectrum converters12-1to12-12corresponding to the bands.

The band splitter11may split the signal into bands with an equal bandwidth or into critical bands whose bandwidth increases with frequency taking into account the characteristics of human ears.

The spectrum converters12-1to12-12divide the encoding units A0to A11received from the band splitter11into blocks (frames) with a fixed length (a fixed period of time), generate gain control information G0to G11(which will be described in detail later) depending on the amplitudes of the waveform signals of the respective blocks, and control the gains of the waveform signals of the respective blocks in accordance with the gain control information G0to G11. The generated gain control information G0to G11are supplied from the spectrum converters12-1to12-12to a multiplexer16.

After performing the gain control, the spectrum converters12-1to12-12perform spectrum conversions based on DFT (discrete Fourier transformation) or DCT (discrete cosine transformation) on the signals thereby generating spectral component signals S0to S11. The resultant spectral component signals S0to S11are supplied to a quantization step size setting unit14and also to normalizers13-1to13-12of the respective bands.

The normalizers13-1to13-12normalize the spectral component signals S0to S11received from the spectrum converters12-1to12-12.

More specifically, the normalizers13-1to13-12detect a signal component having a greatest absolute value from the spectral component signals S0to S11every unit of time and normalize the spectral component signals S0to S11by employing relative values of coefficients with respect to the detected greatest value as the normalized spectral component signals B0to B11.

The normalizers13-1to13-12supply the calculated normalized coefficients B0to B11to the multiplexer16and supply normalized data C0to C11obtained by normalizing the spectral component signals S0to S11to respective quantizers15-1to15-12corresponding to the respective bands.

On the basis of the spectral component signals S0to S11received from the spectrum converters12-1to12-12, the quantization step size setting unit14determines quantization step sizes to be used in quantization of the normalized data C0to C11, and outputs quantization step size information D0to D11indicating the determined quantization step sizes to the corresponding quantizers15-1to15-12. The quantization step size setting unit14also supplies the quantization step size information D0to D11to the multiplexer16.

The quantizers15-1to15-12quantize the normalized data C0to C11supplied every unit of time from the normalizers13-1to13-12, by employing quantization step sized specified by the quantization step size information D0to D11received from the quantization step size setting unit14. Resultant quantized coefficients F0to F11(quantized coefficients F of one frame) obtained via the quantization are supplied to the multiplexer16.

The multiplexer16encodes the gain control information G0to G11received from the spectrum converter12, the normalized coefficients B0to B11received from the normalizer13, the quantization step size information D0to D11received from the quantization step size setting unit14, and the quantized coefficients F0to F11received from the quantizer15, on a frame-by-frame basis.

For example, as shown inFIG. 2, encoded data of an (L−1)th frame and encoded data of an Lth frame each include encoded gain control information G0to G11, normalized coefficients B0to B11, quantization step size information D0to D11, and quantized coefficients F0to F11.

FIG. 3shows an example of a construction of the spectrum converter12.

A windowing unit21divides an encoding unit A received from the band splitter11into blocks having a fixed length (a fixed period of time) and each blocks is multiplied by a window conversion function. More precisely, the windowing unit21applies the window conversion function for a range including one block and portions of temporally adjacent blocks. As a result, a waveform signal such as that shown inFIG. 4Aor4B is generated. The windowing unit21supplies the resultant waveform signal to a detector22.

The detector22determines whether the waveform signal received from the windowing unit21includes an attack portion AT or a release portion RE, on a block-by-block basis. If it is determined that the waveform signal includes an attack portion AT or a release portion RE, the detector22generates a detection flag indicating that the waveform signal includes an attack portion AT or a release portion RE.

The attack portion AT refers to a portion in which the level of the waveform signal increases abruptly, and the release portion RE refers to a portion in which the level decreases abruptly, as shown inFIG. 4Aor4B.

If an attack portion AT or a release portion RE is detected in a waveform signal of a block, the detector22generates a detection flag indicating that the waveform signal includes an attack portion AT or a release portion RE. In this case, the detector22also generates gain control amount information indicating a gain control amount depending on the level of a low-level signal preceding the attack portion AT (hereinafter, such a low-level signal will be referred to as a semi stationary portion SS) or depending on the level of the release portion RE, gain control position information indicating a position at which gain control is to be performed by the gain control amount, and the number of portions to be subjected to the gain control (hereinafter, such a number of portions will be referred to as a gain control number).

For example, when a waveform signal such as that shown inFIG. 4Aor4B is input, the detector22generates a detection flag indicating that the signal includes an attack portion AT or a release portion RE and also generates first gain control amount information indicating the gain control amount corresponding to the level of the semi stationary portion SS, second gain control amount information indicating the gain control amount corresponding to the level of the release portion, first gain control position information indicating a position at which gain control is to be performed by the gain control amount indicated by the first gain control amount information, second gain control position information indicating a position at which gain control is to be performed by the gain control amount indicated by the second gain control amount information, and a gain control number indicating that gain control is to be performed at two positions.

For example, in a case in which the gain control amount of the release portion RE is set to 1, the gain control amount information associated with the semi stationary portion SS shown inFIG. 4Aindicates a relatively small gain control amount (SSa), as shown inFIG. 4C, because the noise levels of the semi stationary portion SS and the release portion RE are relatively high.

On the other hand the gain control amount information associated with the waveform signal shown inFIG. 4Bindicates a relatively large gain control amount (SSb), as shown inFIG. 4C, because the noise levels of the semi stationary portion SS and the release portion RE are relatively low.

In the case in which the waveform signal of a block includes an attack portion AT or a release portion RE, a detection flag indicating that the waveform signal includes an attack portion AT or a release portion RE, gain control amount information, gain control position information, and a gain control number are generated by the detector22and supplied to a controller23together with the waveform signal output from the windowing unit21. In a case in which a waveform signal of a block includes neither an attack portion AT nor a release portion RE, the detector22outputs to the controller23a detection flag indicating that the waveform signal includes neither attack portion AT nor a release portion RE, together with the waveform signal received from the windowing unit21.

In the case in which the detection flag indicates that the waveform signal includes an attack portion AT or a release portion RE, the controller23controls the gain of the waveform signal of the block in accordance with the gain control number, the gain control amount information, and the gain control position information, which were supplied together with the detection flag. The signal obtained via the gain control process is supplied to a spectrum converter24from the controller23.

For example, in the case of the waveform signal shown inFIG. 4A, the waveform signal is multiplied by a gain control function A shown in FIG.4C. In the case of the waveform signal shown inFIG. 4B, the waveform signal is multiplied by a gain control function B shown in FIG.4C.

In the case in which the detection flag indicates that the waveform signal includes neither an attack portion AT or a release portion RE, the controller23does not substantially perform the gain control on the waveform signal of the block received from the detector22but directly supplies the waveform signal to the spectrum converter24.

When the controller23receives, in addition to a detection flag, a gain control number, gain control amount information, and gain control position information from the detector22, the controller23supplies the received data as gain control information G to the multiplexer16. However, in the case in which a gain control number, gain control amount information, and gain control position information were not supplied, the controller23outputs, to the multiplexer16, gain control information G including only the detection flag indicating that the waveform signal includes neither an attack portion AT nor a release portion RE.

In the case in which the gain control information G received from the controller23of the spectrum converter12includes only a detection flag, the multiplexer16encodes and multiplexes only the detection flag as the gain control information G, as is the case with the encoded data of the (L−1)th frame shown in FIG.2.

However, in the case in which the gain control information G received from the controller23includes not only a detection flag but also a gain control number, gain control amount information, and gain control position information, the multiplexer16encodes and multiplexes the detection flag, the gain control number, the gain control amount information, and the gain control position information, as the gain control information G, as is the case with the encoded data of the Lth frame shown in FIG.2.

Referring again toFIG. 3, the spectrum converter24performs a spectrum conversion based on DFT, DCT, or MDCT on the signal received from the controller23. A resultant spectral component signal S obtained via the spectrum conversion is supplied to the normalizer13.

FIG. 5shows an example of a construction of a decoding apparatus2for decoding the encoded data generated by the encoding apparatus1shown in FIG.1.

A demultiplexer31decodes the encoded data supplied from the encoding apparatus1shown in FIG.1and separates the decoded data into gain control information G0to G11, normalized coefficients B0to B11, quantization step size information D0to D11, and quantized coefficients F0to F11.

The separated normalized coefficients B0to B11, quantization step size information D0to D11, and quantized coefficients F0to F11are supplied from the demultiplexer31to corresponding dequantizers/denormalizers32-1to32-12, while the gain control information G0to G11are supplied to corresponding inverse spectrum converters33-1to33-12.

The dequantizer/denormalizer32dequantizes the quantized coefficients F by employing a quantization step size corresponding to that indicated by the quantization step size information D and multiplies the normalized data C obtained via the dequantization by a value corresponding to the normalized coefficient B (thereby denormalizing the normalized data C). The signal obtained as a result of the above process is supplied to the inverse spectrum converter33.

The inverse spectrum converter33performs an inverse spectrum conversion which is an inverse transformation of the spectrum conversion performed by the encoding apparatus1.

In accordance with the gain control information G, the inverse spectrum converter33performs a gain control adjustment on the signal obtained via the inverse spectrum conversion and the inverse spectrum converter33outputs resultant encoding units A to a band combiner34.

The band combiner34combines the encoding units A received from the inverse spectrum converter33such that overlapped sample data of the block are interfered with each other, thereby reconstructing an audio signal.

FIG. 6shows an example of a construction of the inverse spectrum converter33.

An inverse spectrum converter41performs an inverse spectrum conversion, which is an inverse transformation of the spectrum conversion performed by the encoding apparatus1, on the data output from the dequantizer/denormalizer32.

More specifically, in a case in which the spectrum conversion is performed by the encoding apparatus1on the basis of DFT, the inverse spectrum conversion is performed on the basis of IDFT. In a case in which the spectrum conversion is performed by the encoding apparatus1on the basis of DCT, the inverse spectrum conversion is performed on the basis of IDCT.

The adjusting unit42performs a gain control adjustment on the signal received from the inverse spectrum converter41, in accordance with the gain control information G supplied from the demultiplexer31.

More specifically, when the detection flag included in the gain control information G indicates the presence of an attack portion AT or a release portion RE, the adjusting unit42performs the gain control adjustment on the signal received from the inverse spectrum converter41, in accordance with the gain control number, the gain control position information, and the gain control amount information That is, the signal output from the inverse spectrum converter41is multiplied by the a gain control adjustment function corresponding to the gain control function employed in the encoding process.

For example, in the case of a waveform signal shown inFIG. 4A, when the encoding apparatus1controlled the gain thereof, a gain control function A having relatively small gain control amounts as shown inFIG. 4Cwas employed. Therefore, in the gain control adjustment for the signal obtained by dequantizing and denormalizing the encoded data of the waveform signal shown inFIG. 4A, the signal is multiplied by a gain control adjustment function having relatively small gain control amounts.

Thus, in this case, as can be seen fromFIG. 4D, although noise suppression for the semi stationary portion SS and the release portion RE is relatively low, quantization noise energy is suppressed to a low level over the entire block.

On the other hand, in the case of a waveform signal shown inFIG. 4B, when the encoding apparatus1controlled the gain thereof, a gain control function B having relatively large gain control amounts as shown inFIG. 4Cwas employed. Therefore, in the gain control adjustment for the signal obtained by dequantizing and denormalizing the encoded data of the waveform signal shown inFIG. 4B, the signal is multiplied by a gain control adjustment function having relatively large gain control amounts.

Thus, in this case, as can be seen fromFIG. 4E, although the attack portion AT in the block includes relatively large quantization noise energy, quantization noise is suppressed to low levels for both the semi stationary portion SS and the release portion RE.

Therefore, a pre-echo or post-echo problem in hearing the waveform signal such as that shown inFIG. 4Aor4B is suppressed.

On the other hand, in the case in which the detection flag indicates that there is neither an attack portion AT nor a release portion RE, the adjusting unit42does not substantially perform the signal attenuating process on the signal received from the inverse spectrum converter41.

The manner of encoding and decoding an audio signal has been described above.

In the case in which a waveform signal in a frame includes an attack portion AT or a release portion RE, the encoding apparatus1also encodes gain control information G including gain control number, gain control position information and gain control amount information in addition to a detection flag. In the conventional technique, for example, the gain control number, the gain control position information, and the gain control amount information are encoded into 3-bit, 4-bit, and 5-bit codes, respectively.

Because the total data size of encoded data of a frame is generally fixed, encoding of the gain control number, the gain control position information, and the gain control amount information into such fixed-length codes results in a limitation on the number of bits available for encoding of quantized coefficients F and thus results in a reduction in the encoding efficiency of the quantized coefficients F.

DISCLOSURE OF THE INVENTION

In view of the above, it is an object of the present invention to provide a technique of improving the encoding efficiency.

The present invention provides a first encoding apparatus comprising detection means for detecting a gain control number of a first arbitrary band signal of band signals and a gain control number of a second band signal in a band adjacent to the band of the first band signal; calculation means for calculating the difference value between first gain control number detected by the detection means from the first band signal and second gain control number detected by the detection means from the second band signal; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means; gain control number encoding means for encoding the first gain control number such that a code corresponding to the difference value calculated by the calculation means is retrieved from the table and the retrieved code is employed as the code of the first gain control number; gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation performed by the calculation means. In this case, when a calculated difference value is not found in the table, the gain control number encoding means may encode an escape code and the first gain control number.

The present invention provides a first encoding method comprising a detection step of detecting a gain control number of a first arbitrary band signal of band signals and a gain control number of a second band signal in a band adjacent to the band of the first band signal; a calculation step of calculating the value between a first gain control number detected in the detection step from the first band signal and a second gain control number detected in the detection step from the second band signal; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed in the calculation step; a gain control number encoding step of encoding the first gain control number such that a code corresponding to the difference value calculated in the calculation step is retrieved from the table and the retrieved code is employed as the code of the first gain control number; a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the first encoding apparatus and encoding method according to the present invention, a gain control number of a first arbitrary band signal of band signals and a gain control number of a second band signal in a band adjacent to the band of the first band signal are detected; the difference value between first gain control number detected from the first band signal and second gain control number detected from the second band signal is calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as the result of calculation of the difference value; a code corresponding to the calculated difference value is retrieved from the table and the retrieved code is employed as the code of the first gain control number; gain control amount information indicating a particular value corresponding to a gain control amount is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a second encoding apparatus comprising detection means for detecting a gain control number of a first arbitrary band signal of band signals and a gain control number of a second band signal in a band adjacent to the band of the first band signal; determination means for determining whether a first gain control number detected by the detection means from the first band signal and a second gain control number detected by the detection means from the second band signal are equal to each other; gain control number encoding means for performing encoding such that if the determination made by the determination means is affirmative, only a flag indicating that the first and second gain control numbers are equal to each other is encoded, while, if the determination made by the determination means is negative, both a flag indicating that the first and second gain control numbers are not equal to each other and the second gain control number are encoded; gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The present invention provides a second encoding method comprising a detection step of detecting a gain control number of a first arbitrary band signal of band signals and a gain control number of a second band signal in a band adjacent to the band of the first band signal; a determination step of determining whether a first gain control number detected in the detection step from the first band signal and a second gain control number detected from the second band signal are equal to each other; a gain control number encoding step of performing encoding such that if the determination made in the determination step is affirmative, only a flag indicating that the first and second gain control numbers are equal to each other is encoded, while, if the determination made in the determination step is negative, both a flag indicating that the first and second gain control numbers are not equal to each other and the second gain control number are encoded; a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the second encoding apparatus and encoding method according to the present invention, a gain control number of a first arbitrary band signal of band signals and a gain control number of a second band signal in a band adjacent to the band of the first band signal are detected; it is determined whether a first gain control number detected from the first band signal and a second gain control number detected from the second band signal are equal to each other; if the result of the determination is affirmative, only a flag indicating that the first gain control number and the second gain control number are equal to each other is encoded, while if the result of the determination is negative, a flag indicating that the first gain control number and the second gain control number are not equal to each other and the second gain control number are encoded; gain control amount information indicating a particular value corresponding to a gain control amount is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a third encoding apparatus comprising detection means for detecting a gain control number of a band signal; calculation means for calculating a smallest number of bits which can represent the difference between the maximum and minimum values of the gain control numbers detected by the detection means; gain control number encoding means for encoding the gain control number such that the minimum value determined by the calculation means is encoded, a value obtained by subtracting the minimum value from the gain control number detected by the detection means is expressed by as many bits as the smallest number of bits calculate by the calculation means, and a resultant expression is employed as the code of the gain control number; gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The present invention provides a third encoding method comprising a detection step of detecting gain control numbers of the band signals; a calculation step of calculating a smallest number of bits which can represent the difference between the maximum and minimum values of the gain control numbers detected in the detection step; a gain control number encoding step for encoding the gain control number such that the minimum value determined in the calculation step is encoded, a value obtained by subtracting the minimum value from the gain control number detected in the detection step is expressed by as many bits as the smallest number of bits calculated in the calculation step, and a resultant expression is employed as the code of the gain control number; a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the third encoding apparatus and encoding method according to the present invention, a gain control number of a band signal is detected; the smallest number of bits which can represent the difference between the maximum and minimum values of the detected gain control numbers is calculated; the determined minimum value is encoded and furthermore gain control numbers are encoded such that values obtained by subtracting the minimum value from the detected gain control numbers are expressed by as many bits as the smallest number of bits calculate above, and resultant expressions are employed as the codes of the gain control numbers; gain control amount information indicating a particular value corresponding to a gain control amount is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a fourth encoding apparatus comprising detection means for detecting a gain control number of an arbitrary band signal of the left-channel signal and a gain control number of a band signal of the right-channel signal in the same band as that of the band signal of the left-channel signal; calculation means for calculating the difference value between a first gain control number detected by the detection means from a band signal of the left-channel signal and a second gain control number detected by the detection means from a band signal of the right-channel signal; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means; gain control number encoding means for encoding the first or second gain control number such that a code corresponding to the difference value calculated by the calculation means is retrieved from the table and the retrieved code is employed as the code of the first or second gain control number; gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation performed by the calculation means. In this case, when the correspondence of the calculated difference value is not found in the table, the gain control number encoding means may encode an escape code and the gain control number.

The present invention provides a fourth encoding method comprising a detection step of detecting a gain control number of an arbitrary band signal of a left-channel signal and a gain control number of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; a calculation step of calculating the difference value between first gain control number detected in the detection step from the band signal of the left-channel signal and second gain control number detected in the detection step from the band signal of the right-channel signal; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed in the calculation step; a gain control number encoding step of encoding the first or second gain control number such that a code corresponding to the difference value calculated in the calculation step is retrieved from the table and the retrieved code is employed as the code of the first or second gain control number; a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the fourth encoding apparatus and encoding method according to the present invention, a gain control number of an arbitrary band signal of a left-channel signal and a gain control number of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal are detected; the difference value between a first gain control number detected from a band signal of the left-channel signal and a second gain control number detected from a band signal of the right-channel signal are calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as the result of calculation of the difference value; a code corresponding to the calculated difference value is retrieved from the table and the retrieved code is employed as the code of the first or second gain control number; gain control amount information indicating a particular value corresponding to a gain control amount is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a fifth encoding apparatus comprising detection means for detecting a gain control number of an arbitrary band signal of the left-channel signal and a gain control number of a band signal of the right-channel signal in the same band as that of the band signal of the left-channel signal; determination means for determining whether a first gain control number detected by the detection means from a band signal of the left-channel signal and a second gain control number detected by the detection means from a band signal of the right-channel signal are equal to each other; gain control number encoding means for performing encoding such that if the determination made by the determination means is affirmative, a flag indicating that the first and second gain control numbers are equal to each other and the first or second gain control number are encoded, while, if the determination made by the determination means is negative, a flag indicating that the first and second gain control numbers are not equal to each other and the second and gain control numbers are encoded; gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The present invention provides a fifth encoding method comprising a detection step of detecting a gain control number of an arbitrary band signal of a left-channel signal and a gain control number of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; a determination step of determining whether a first gain control number detected in the detection step from the band signal of the left-channel signal and a second gain control number detected in the detection step from the band signal of the right-channel signal are equal to each other; a gain control number encoding step of performing encoding such that if the determination made in the determination step is affirmative, a flag indicating that the first and second gain control numbers are equal to each other and the first or second gain control number are encoded, while, if the determination made in the determination step is negative, a flag indicating that the first and second gain control numbers are not equal to each other and the second and gain control numbers are encoded; a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the fifth encoding apparatus and encoding method according to the present invention, a gain control number of an arbitrary band signal of a left-channel signal and a gain control number of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal are detected; it is determined whether a first gain control number detected from the band signal of the left-channel signal and a second gain control number detected from the band signal of the right-channel signal are equal to each other; if the result of the determination is affirmative, a flag indicating that the first gain control number and the second gain control number are equal to each other and the first or second gain control number are encoded, while if the result of the determination is negative, a flag indicating that the first gain control number and the second gain control number are not equal to each other and the first and second gain control number are encoded; gain control amount information indicating a particular value corresponding to a gain control amount is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a sixth encoding apparatus comprising detection means for detecting gain control numbers of band signals of the left-channel signal and gain control numbers of band signals of the right-channel signal; determination means for determining whether first gain control numbers detected by the detection means from the band signals of the left-channel signal and second gain control numbers detected by the detection means from the corresponding band signals of the right-channel signal are equal to each other for all bands; gain control number encoding means for performing encoding such that if the determination made by the determination means is affirmative, the first or second gain control numbers are encoded, while, if the determination made by the determination means is negative, the first and second gain control numbers are encoded; gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The present invention provides a sixth encoding method comprising a detection step of detecting a gain control number of a band signal of a left-channel signal and a gain control number of a band signal of a right-channel signal; a determination step of determining whether first gain control numbers detected in the detection step from the band signals of the left-channel signal and second gain control numbers detected in the detection step from the corresponding band signals of the right-channel signal are equal to each other for all bands; a gain control number encoding step of performing encoding such that if the determination made in the determination step is affirmative, the first or second gain control numbers are encoded, while, if the determination made in the determination step is negative, the first and second gain control numbers are encoded; a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the sixth encoding apparatus and encoding method according to the present invention, a gain control number of a band signal of a left-channel signal and a gain control number of a band signal of a right-channel signal are detected; it is determined whether first gain control numbers detected from the band signals of the left-channel signal and second gain control numbers detected from the corresponding band signals of the right-channel signal are equal to each other for all bands; if the result of the determination is affirmative, the first or second gain control numbers are encoded, while if the result of the determination is negative, the first and second gain control numbers are encoded; gain control amount information indicating a particular value corresponding to a gain control amount is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a seventh encoding apparatus comprising detection means for detecting gain control numbers of an arbitrary first band signal, a second band signal, a third band signal, and a fourth band signal, respectively, the first band signal and the second band signal being of band signals of a left-channel signal, the second band signal being of a band adjacent to a band of the first band signal, the third band signal and the fourth band signal being of band signals of a right-channel signal, the third band signal corresponding to the first band signal, the fourth band signal corresponding to the second band signal; first calculation means for calculating the difference value between first gain control number detected by the detection means from the first band signal and second gain control number detected by the detection means from the second band signal; second calculation means for calculating the difference value between third gain control number detected from the third band signal and fourth gain control number detected from the fourth band signal; third calculation means for calculating the difference value between the difference value calculated by the first calculation means and the difference value calculated by the second calculation means; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the third calculation means; gain control number encoding means for encoding the first gain control number such that a code corresponding to the difference value calculated by the third calculation means is retrieved from the table and the retrieved code is employed as the code of the first gain control number; gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation performed by the third calculation means. In this case, when the correspondence of the calculated difference value is not found in the table, the gain control number encoding means may encode an escape code and the first gain control number.

The present invention provides a seventh encoding method comprising a detection step for detecting gain control numbers of an arbitrary first band signal, a second band signal, a third band signal, and a fourth band signal, respectively, the first band signal and the second band signal being of band signals of a left-channel signal, the second band signal being of a band adjacent to a band of the first band signal, the third band signal and the fourth band signal being of band signals of a right-channel signal, the third band signal corresponding to the first band signal, the fourth band signal corresponding to the second band signal; a first calculation step of calculating the difference value between a first gain control number detected in the detection step from the first band signal and a second gain control number detected in the detection step from the second band signal; a second calculation step of calculating the difference value between a third gain control number detected from the third band signal and a fourth gain control number detected from the fourth band signal; a third calculation step of calculating the difference value between the difference value calculated in the first calculation step and the difference value calculated in the second calculation step; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed in the third calculation step; a gain control number encoding step of encoding the first gain control number such that a code corresponding to the difference value calculated in the third calculation step is retrieved from the table and the retrieved code is employed as the code of the first gain control number; a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the seventh encoding apparatus and encoding method according to the present invention, gain control numbers of an arbitrary first band signal, a second band signal, a third band signal, and a fourth band signal are detected, wherein the first band signal and the second band signal are of band signals of a left-channel signal, the second band signal is of a band adjacent to a band of the first band signal, the third band signal and the fourth band signal are of band signals of a right-channel signal, the third band signal corresponds to the first band signal, and the fourth band signal corresponds to the second band signal; the difference value between a first gain control number detected from the first band signal and a second gain control number detected from the second band signal is calculated; the difference value between a third gain control number detected from the third band signal and a fourth gain control number detected from the fourth band signal is calculated; the difference value between the calculated difference values is further calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as the result of calculation of the difference value; a code corresponding to the calculated difference value is retrieved from the table and the retrieved code is employed as the code of the first gain control number; gain control amount information indicating a particular value corresponding to a gain control amount is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides an eighth encoding apparatus comprising detection means for detecting gain control amount information indicating a particular value corresponding to a gain control amount of a band signal; calculation means for calculating the difference value between arbitrary first gain control amount information of one or more pieces of gain control amount information detected by the detection means from one of the band signals and gain control amount information corresponding to a gain control amount of gain adjustment performed on a part adjacent to a part subjected to gain adjustment performed according to the gain control amount corresponding to the first gain control amount information; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means; gain control amount information encoding means for encoding the first gain control amount information such that a code corresponding to the difference value calculated by the calculation means is retrieved from the table and the retrieved code is employed as the code of the first gain control amount information; gain control number encoding means for encoding a gain control number; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The table may indicate the correspondence of only one or more difference values having high probabilities of being obtained as the result of the calculation performed by the calculation means. In this case, when the correspondence of the calculated difference value is not found in the table, the gain control amount information encoding means may encode an escape code and the first gain control amount information.

The present invention provides an eighth encoding method comprising a detection step of detecting gain control amount information indicating a particular value corresponding to a gain control amount of a band signal; a calculation step of calculating the difference value between arbitrary first gain control amount information of one or more pieces of gain control amount information detected in the detection step from one of the band signals and gain control amount information corresponding to a gain control amount of gain adjustment performed on a part adjacent to a part subjected to gain adjustment performed according to the gain control amount corresponding to the first gain control amount information; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed in the calculation step; a gain control amount information encoding step of encoding the first gain control amount information such that a code corresponding to the difference value calculated in the calculation step is retrieved from the table and the retrieved code is employed as the code of the first gain control amount information; a gain control number encoding step of encoding a gain control number; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the eighth encoding apparatus and encoding method according to the present invention, gain control amount information indicating a particular value corresponding to a gain control amount of a band signal is detected; the difference value between arbitrary first gain control amount information of one or more pieces of gain control amount information detected by the detection means from one of the band signals and gain control amount information corresponding to a gain control amount of gain adjustment performed on a part adjacent to a part subjected to gain adjustment performed according to the gain control amount corresponding to the first gain control amount information is calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as the result of calculation of the difference value; a code corresponding to the calculated difference value is retrieved from the table and the retrieved code is employed as the code of the first gain control amount information; the gain control number is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a ninth encoding apparatus comprising detection means for detecting gain control amount information indicating a particular value corresponding to a gain control amount of a first arbitrary band signal of band signals and detecting gain control amount information indicating a particular value corresponding to a gain control amount of a second band signal in a band adjacent to the band of the first band signal; calculation means for calculating the difference value between the first gain control amount information detected by the detection means from the first band signal and the second gain control amount information detected by the detection means from the second band signal; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means; gain control amount information encoding means for encoding the first gain control amount information such that a code corresponding to the difference value calculated by the calculation means is retrieved from the table and the retrieved code is employed as the code of the first gain control amount information; gain control number encoding means for encoding a gain control number; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation performed by the calculation means. In this case, when the correspondence of the calculated difference value is not found in the table, the gain control amount information encoding means may encode an escape code and the gain control amount information.

The present invention provides a ninth encoding method comprising a detection step of detecting gain control amount information indicating a value corresponding to a gain control amount of a first arbitrary band signal of the band signals and detecting gain control amount information indicating a value corresponding to a gain control amount of a second band signal in a band adjacent to the band of the first band signal; a calculation step of calculating the difference value between first gain control amount information detected in the detection step from the first band signal and second gain control amount information detected in the detection step from the second band signal; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed in the calculation step; a gain control amount information encoding step of encoding the first gain control amount information such that a code corresponding to the difference value calculated in the calculation step is retrieved from the table and the retrieved code is employed as the code of the first gain control amount information; a gain control number encoding step of encoding a gain control number; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the ninth encoding apparatus and encoding method according to the present invention, gain control amount information indicating a particular value corresponding to a gain control amount of a first arbitrary band signal of band signals and also gain control amount information indicating a particular value corresponding to a gain control amount of a second band signal in a band adjacent to the band of the first band signal are detected; the difference value between first gain control amount information detected from the first band signal and second gain control amount information detected from the second band signal is calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as the result of calculation of the difference value; a code corresponding to the calculated difference value is retrieved from the table and the retrieved code is employed as the code of the first gain control amount information; the gain control number is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a tenth encoding apparatus comprising detection means for detecting gain control amount information indicating a particular value corresponding to a gain control amount of a first arbitrary band signal of band signals and detecting gain control amount information indicating a particular value corresponding to a gain control amount of a second band signal in a band adjacent to the band of the first band signal; first calculation means for calculating the first difference value between arbitrary first gain control amount information of one or more pieces of gain control amount information detected by the detection means from the first band signal and gain control amount information corresponding to a gain control amount of gain adjustment performed on a part adjacent to a part subjected to gain adjustment performed according to the gain control amount corresponding to the first gain control amount information and also calculating the second difference value between third gain control amount information corresponding to the first gain control amount information and fourth gain control amount information corresponding to the second gain control amount information, the third gain control amount information and the fourth gain control amount information having been detected from the second band signal; second calculation means for calculating the third difference value between the first difference value and the second difference value; retaining means for retaining a table indicating a value-code correspondence in which a code with a small. number of bits is assigned to a value having a high probability of being obtained as the third difference value in the calculation performed by the second calculation means; gain control amount information encoding means for encoding the first gain control amount information such that a code corresponding to the third difference value calculated by the second calculation means is retrieved from the table and the retrieved code is employed as the code of first gain control amount information; gain control number encoding means for encoding a gain control number; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation of the third difference value performed by the calculation means. In this case, when the correspondence of the calculated third difference value is not found in the table, the gain control amount information encoding means may encode an escape code and the first gain control amount information.

The present invention provides a tenth encoding method comprising a detection step of detecting gain control amount information indicating a value corresponding to a gain control amount of a first arbitrary band signal of the band signals and detecting gain control amount information indicating a value corresponding to a gain control amount of a second band signal in a band adjacent to the band of the first band signal; a first calculation step for calculating the first difference value between arbitrary first gain control amount information of one or more pieces of gain control amount information detected in the detection step from the first band signal and gain control amount information corresponding to a gain control amount of gain adjustment performed on a part adjacent to a part subjected to gain adjustment performed according to the gain control amount corresponding to the first gain control amount information and also calculating the second difference value between third gain control amount information corresponding to the first gain control amount information and fourth gain control amount information corresponding to the second gain control amount information, the third gain control amount information and the fourth gain control amount information having been detected from the second band signal; a second calculation step of calculating the third difference value between the first difference value and the second difference value; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the third difference value in the calculation performed in the second calculation step; a gain control amount information encoding step of encoding the first gain control amount information such that a code corresponding to the third difference value calculated in the second calculation step is retrieved from the table and the retrieved code is employed as the code of the first gain control amount information; a gain control number encoding step of encoding a gain control number; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the tenth encoding apparatus and encoding method according to the present invention, gain control amount information indicating a particular value corresponding to a gain control amount of a first arbitrary band signal of band signals and also gain control amount information indicating a particular value corresponding to a gain control amount of a second band signal in a band adjacent to the band of the first band signal are detected; the first difference value between arbitrary first gain control amount information of one or more pieces of gain control amount information detected by the detection means from the first band signal and gain control amount information corresponding to a gain control amount of gain adjustment performed on a part adjacent to a part subjected to gain adjustment performed according to the gain control amount corresponding to the first gain control amount information is calculated, and furthermore, the second difference value between third gain control amount information corresponding to the first gain control amount information and fourth gain control amount information corresponding to the second gain control amount information, the third gain control amount information and the fourth gain control amount information having been detected from the second band signal is calculated; the third difference value between the first difference value and the second difference value is calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as a result of calculation of the third difference value; a code corresponding to the calculated third difference value is retrieved from the table and the retrieved code is employed as the code of the first gain control amount information; the gain control number is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides an eleventh encoding apparatus comprising detection means for detecting gain control amount information indicating a particular value corresponding to gain control amount information of a first arbitrary band signal of band signals and detecting gain control amount information indicating a particular value corresponding to gain control amount information of a second band signal in a band adjacent to the band of the first band signal; determination means for determining whether first gain control amount information detected by the detection means from the first band signal and second gain control amount information detected from the second band signal are equal to each other; gain control amount information encoding means for performing encoding such that if the determination made by the determination means is affirmative, only a flag indicating that the first gain control amount information and second gain control amount information are equal to each other is encoded, while, if the determination made by the determination means is negative, both a flag, indicating that the first gain control amount information and second gain control amount information are not equal to each other, and the second gain control amount information are encoded; gain control number encoding means for encoding a gain control number; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The present invention provides an eleventh encoding method comprising a detection step of detecting gain control amount information indicating a value corresponding to gain control amount information of a first arbitrary band signal of the band signals and detecting gain control amount information indicating a value corresponding to gain control amount information of a second band signal in a band adjacent to the band of the first band signal; a determination step of determining whether first gain control amount information detected in the detection step from the first band signal and second gain control amount information detected in the detection step from the second band signal are equal to each other; a gain control amount information encoding step of performing encoding such that if the determination made in the determination step is affirmative, only a flag indicating that the first gain control amount information and second gain control amount information are equal to each other is encoded, while, if the determination made in the determination step is negative, both a flag, indicating that the first gain control amount information and second gain control amount information are not equal to each other, and the second gain control amount information are encoded; a gain control number encoding step of encoding a gain control number; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the eleventh encoding apparatus and encoding method according to the present invention, gain control amount information indicating a particular value corresponding to gain control amount information of a first arbitrary band signal of band signals and also gain control amount information indicating a particular value corresponding to a gain control amount information of a second band signal in a band adjacent to the band of the first band signal are detected; it is determined whether first gain control amount information detected from the first band signal and second gain control amount information detected from the second band signal are equal to each other; if the result of the determination is affirmative, only a flag indicating that the first gain control amount information and the second gain control amount information are equal to each other is encoded, while if the result of the determination is negative, a flag indicating that the first gain control amount information and the second gain control amount information are not equal to each other and the second gain control amount information are encoded; the gain control number is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a twelfth encoding apparatus comprising detection means for detecting gain control amount information indicating a particular value corresponding to a gain control amount of a band signal; calculation means for calculating a smallest number of bits which can represent the difference between the maximum and minimum values of the gain control amount information detected by the detection means; gain control amount information encoding means for encoding the gain control amount information such that the minimum value determined by the calculation means is encoded, a value obtained by subtracting the minimum value from the gain control amount information detected by the detection means is expressed by as many bits as the number of bits calculate by the calculation means, and a resultant expression is employed as the code of the gain control amount information; gain control number encoding means for encoding a gain control number; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The calculation means may calculate a smallest number of bits which can represent the difference between the maximum and minimum values of one or more pieces of gain control amount information detected by the detection means from one band signal; and the gain control amount information encoding means may encode the gain control amount information such that values obtained by subtracting the minimum value from the one or more pieces of gain control amount information are expressed by as many bits as the number of bits calculate by the calculation means and resultant expressions are employed as the codes of the one or more pieces of gain control amount information.

The present invention provides a twelfth encoding method comprising a detection step of detecting gain control amount information indicating a particular value corresponding to a gain control amount of a band signal; a calculation step of calculating a smallest number of bits which can represent the difference between the maximum and minimum values of the gain control amount information detected in the detection step; a gain control amount information encoding step for encoding the gain control amount information such that the minimum value determined in the calculation step is encoded, a value obtained by subtracting the minimum value from the gain control amount information detected in the detection step is expressed by as many bits as the number of bits calculated in the calculation step, and a resultant expression is employed as the code of the gain control amount information; a gain control number encoding step of encoding a gain control number; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the twelfth encoding apparatus and encoding method according to the present invention, gain control amount information indicating a particular value corresponding to a gain control amount of a band signal is detected; the smallest number of bits which can represent the difference between the maximum and minimum values of the detected gain control amount information is calculated; the determined minimum value is encoded and furthermore gain control amount information is encoded such that values obtained by subtracting the minimum value from the detected pieces of gain control amount information are expressed by as many bits as the smallest number of bits calculate above, and resultant expressions are employed as the codes of the respective pieces of gain control amount information; the gain control number is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a thirteenth encoding apparatus comprising detection means for detecting gain control amount information indicating a particular value corresponding to a gain control amount of a band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; calculation means for calculating the difference value between the first gain control amount information detected by the detection means from the band signal of the left-channel signal and the second gain control amount information detected by the detection means from the band signal of the right-channel signal; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means; gain control amount information encoding means for encoding the first or second gain control amount information such that a code corresponding to the difference value calculated by the calculation means is retrieved from the table and the retrieved code is employed as the code of the first or second gain control amount information; gain control number encoding means for encoding a gain control number; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation performed by the calculation means. In this case, when the correspondence of the calculated difference value is not found in the table, the gain control amount information encoding means may encode an escape code and the gain control amount information.

The present invention provides a thirteenth encoding method comprising a detection step, of detecting gain control amount information indicating a particular value corresponding to a gain control amount of a band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; a calculation step of calculating the difference value between first gain control amount information detected in the detection step from the band signal of the left-channel signal and the second gain control amount information detected in the detection step from the band signal of the right-channel signal; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed in the calculation step; a gain control amount information encoding step of encoding the first or second gain control amount information such that a code corresponding to the difference value calculated in the calculation step is retrieved from the table and the retrieved code is employed as the code of the first or second gain control amount information; a gain control number encoding step of encoding a gain control number; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the thirteenth encoding apparatus and encoding method according to the present invention, gain control amount information indicating a particular value corresponding to a gain control amount of a band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal are detected; the difference value between first gain control amount information detected from the band signal of the left-channel signal and second gain control amount information detected from the band signal of the right-channel signal is calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as the result of calculation of the difference value; a code corresponding to the calculated difference value is retrieved from the table and the retrieved code is employed as the code of the first or second gain control amount information; the gain control number is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a fourteenth encoding apparatus comprising detection means for detecting gain control amount information indicating a particular value corresponding to a gain control amount of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; determination means for determining whether gain control amount information detected by the detection means from a band signal of the left-channel signal and second gain control amount information detected by the detection means from a band signal of the right-channel signal are equal to each other; gain control amount information encoding means for performing encoding such that if the determination made by the determination means is affirmative, a flag indicating that the first gain control amount information and the second gain control amount information are equal to each other and the first or second gain control amount information are encoded, while, if the determination made by the determination means is negative, a flag indicating that the first gain control amount information and the second gain control amount information are not equal to each other, the first gain control amount information, and the second and gain control amount information are encoded; gain control number encoding means for encoding a gain control number; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The present invention provides a fourteenth encoding method comprising a detection step, of detecting gain control amount information indicating a particular value corresponding to a gain control amount of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; a determination step of determining whether first gain control amount information detected in the detection step from the band signal of the left-channel signal and second gain control amount information detected in the detection step from the band signal of the right-channel signal are equal to each other; a gain control amount information encoding step of performing encoding such that if the determination made in the determination step is affirmative, a flag indicating that the first gain control amount information and the second gain control amount information are equal to each other and the first or second gain control amount information are encoded, while, if the determination made in the determination step is negative, a flag indicating that the first gain control amount information and the second gain control amount information are not equal to each other, the first gain control amount information, and the second and gain control amount information are encoded; a gain control number encoding step of encoding a gain control number; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the fourteenth encoding apparatus and encoding method according to the present invention, gain control amount information indicating a particular value corresponding to a gain control amount of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal are detected; it is determined whether gain control amount information detected from a band signal of the left-channel signal and second gain control amount information detected by the detection means from a band signal of the right-channel signal are equal to each other; if the result of the determination is affirmative, a flag indicating that the first gain control amount information and the second gain control amount information are equal to each other and the first or second gain control amount information are encoded, while if the result of the determination is negative, a flag indicating that the first gain control amount information and the second gain control amount information are not equal to each other and the first and second gain control amount information are encoded; the gain control number is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a fifteenth encoding apparatus comprising detection means for detecting gain control amount information indicating a particular value corresponding to a gain control amount of a band signal of a left-channel signal and that of a band signal of a right-channel signal; determination means for determining whether gain control amount information detected by the detection means from the band signals of the left-channel signal and gain control amount information detected by the detection means from the corresponding band signals of the right-channel signal are equal to each other for all bands; gain control amount information encoding means for performing encoding such that if the determination made by the determination means is affirmative, the first or second gain control amount information is encoded, while, if the determination made by the determination means is negative, the first gain control amount information and the second gain control amount information are encoded; gain control number encoding means for encoding a gain control number; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The present invention provides a fifteenth encoding method comprising detection step for detecting gain control amount information indicating a particular value corresponding to a gain control amount of a band signal of a left-channel signal and that of a band signal of a right-channel signal; a determination step of determining whether gain control amount information detected in the detection step from the band signals of the left-channel signal and gain control amount information detected in the detection step from the band signals of the right-channel signal are equal to each other in each of all bands; a gain control amount information encoding step of performing encoding such that if the determination made in the determination step is affirmative, the first or second gain control amount information is encoded, while, if the determination made in the determination step is negative, the first gain control amount information and the second gain control amount information are encoded; a gain control number encoding step of encoding a gain control number; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the fifteenth encoding apparatus and encoding method according to the present invention, gain control amount information indicating a particular value corresponding to a gain control amount of a band signal of a left-channel signal and that of a band signal of a right-channel signal are detected; it is determined whether gain control amount information detected from the band signals of the left-channel signal and gain control amount information detected from the corresponding band signals of the right-channel signal are equal to each other for all bands; if the result of the determination is affirmative, the first or second gain control amount information is encoded, while if the result of the determination is negative, the first gain control amount information and the second gain control amount information are encoded; the gain control number is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a sixteenth encoding apparatus comprising detection means for detecting gain control amount information indicating a particular value corresponding to a gain control amount of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; first calculation means for calculating the first difference value between arbitrary first gain control amount information of one or more pieces of gain control amount information detected by the detection means from the band signal of the left-channel signal and gain control amount information corresponding to a gain control amount of gain adjustment performed on a part adjacent to a part subjected to gain adjustment performed according to the gain control amount corresponding to the first gain control amount information and also calculating the second difference value between third and fourth gain control amount information of one or more pieces of gain control amount information detected from the band signal of the right-channel signal, the third gain control amount information and the fourth gain control amount information corresponding to the first gain control amount information and the second gain control amount information, respectively; second calculation means for calculating the third difference value between the first difference value and the second difference value; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the third difference value in the calculation performed by the second calculation means; gain control amount information encoding means for encoding the first gain control amount information such that a code corresponding to the third difference value calculated by the second calculation means is retrieved from the table and the retrieved code is employed as the code of first gain control amount information; gain control number encoding means for encoding a gain control number; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation performed by the calculation means. In this case, when the correspondence of the calculated third difference value is not found in the table, the gain control amount information encoding means may encode an escape code and the first gain control amount information.

The present invention provides a sixteenth encoding method comprising a detection step, of detecting gain control amount information indicating a particular value corresponding to a gain control amount of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; a first calculation step of calculating the first difference value between arbitrary first gain control amount information of one or more pieces of gain control amount information detected by in detection step from the band signal of the left-channel signal and gain control amount information corresponding to a gain control amount of gain adjustment performed on a part adjacent to a part subjected to gain adjustment performed according to the gain control amount corresponding to the first gain control amount information and also calculating the second difference value between third and fourth gain control amount information of one or more pieces of gain control amount information detected from the band signal of the right-channel signal, the third gain control amount information and the fourth gain control amount information corresponding to the first gain control amount information and the second gain control amount information, respectively; a second calculation step of calculating the third difference value between the first difference value and the second difference value; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the third difference value in the calculation performed in the second calculation step; a gain control amount information encoding step of encoding the first gain control amount information such that a code corresponding to the third difference value calculated in the second calculation step is retrieved from the table and the retrieved code is employed as the code of the first gain control amount information; a gain control number encoding step of encoding a gain control number; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the sixteenth encoding apparatus and encoding method according to the present invention, gain control amount information indicating a particular value corresponding to a gain control amount of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal are detected; the first difference value between arbitrary first gain control amount information of one or more pieces of gain control amount information detected from the band signal of the left-channel signal and gain control amount information corresponding to a gain control amount of gain adjustment performed on a part adjacent to a part subjected to gain adjustment performed according to the gain control amount corresponding to the first gain control amount information is calculated, and furthermore, the second difference value between third and fourth gain control amount information of one or more pieces of gain control amount information detected from the band signal of the right-channel signal is calculated, wherein the third gain control amount information and the fourth gain control amount information correspond to the first gain control amount information and the second gain control amount information, respectively; the third difference value between the first difference value and the second difference value is calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as the result of calculation of the third difference value; a code corresponding to the calculated third difference value is retrieved from the table and the retrieved code is employed as the code of the first gain control amount information; the gain control number is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides a seventh encoding apparatus comprising detection means for detecting gain control amount information indicating values corresponding to gain control amounts of an arbitrary first band signal, a second band signal, a third band signal, and a fourth band signal, respectively, the first band signal and the second band signal being of band signals of a left-channel signal, the second band signal being of a band adjacent to a band of the first band signal, the third band signal and the fourth band signal being of band signals of a right-channel signal, the third band signal corresponding to the first band signal, the fourth band signal corresponding to the second band signal; first calculation means for calculating the difference value between first gain control amount information detected by the detection means from the first band signal and second gain control amount information detected by the detection means from the second band signal; second calculation means for calculating the difference value between third gain control amount information detected from the third band signal and fourth gain control amount information detected from the fourth band signal; third calculation means for calculating the difference value between the difference value calculated by the first calculation means and the difference value calculated by the second calculation means; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to value having a high probability of being obtained as the result of the calculation of the difference value performed by the third calculation means; gain control amount information encoding means for encoding the first gain control amount information such that a code corresponding to the difference value calculated by the third calculation means is retrieved from the table and the retrieved code is employed as the code of the first gain control amount information; gain control number encoding means for encoding a gain control number; and gain control position information encoding means for encoding gain control position information indicating a particular value corresponding to a gain control position.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation performed by the third calculation means. In this case, when the correspondence of the calculated difference value is not found in the table, the gain control amount information encoding means may encode an escape code and the first gain control amount information.

The present invention provides a seventh encoding method comprising a detection step of detecting gain control amount information indicating values corresponding to gain control amounts of an arbitrary first band signal, a second band signal, a third band signal, and a fourth band signal, respectively, the first band signal and the second band signal being of band signals of a left-channel signal, the second band signal being of a band adjacent to a band of the first band signal, the third band signal and the fourth band signal being of band signals of a right-channel signal, the third band signal corresponding to the first band signal, the fourth band signal corresponding to the second band signal; a first calculation step of calculating the difference value between first gain control amount information detected in the detection step from the first band signal and second gain control amount information detected in the detection step from the second band signal; a second calculation step of calculating the difference value between third gain control amount information detected from the third band signal and fourth gain control amount information detected from the fourth band signal; a third calculation step of calculating the difference value between the difference value calculated in the first calculation step and the difference value calculated in the second calculation step; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed in the third calculation step; a gain control amount information encoding step of encoding the first gain control amount information such that a code corresponding to the difference value calculated in the third calculation step is retrieved from the table and the retrieved code is employed as the code of the first gain control amount information; a gain control number encoding step of encoding a gain control number; and a gain control position information encoding step of encoding gain control position information indicating a particular value corresponding to a gain control position.

In the seventh encoding apparatus and encoding method according to the present invention, gain control amount information indicating values corresponding to gain control amounts of an arbitrary first band signal, a second band signal, a third band signal, and a fourth band signal are detected, wherein the first band signal and the second band signal are of band signals of a left-channel signal, the second band signal is of a band adjacent to a band of the first band signal, the third band signal and the fourth band signal are of band signals of a right-channel signal, the third band signal corresponds to the first band signal, and the fourth band signal corresponds to the second band signal; the difference value between first gain control amount information detected from the first band signal and second gain control amount information detected from the second band signal is calculated; the difference value between third gain control amount information detected from the third band signal and fourth gain control amount information detected from the fourth band signal is calculated; the difference value between the calculated difference values is further calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as the result of calculation of the difference value; a code corresponding to the calculated difference value is retrieved from the table and the retrieved code is employed as the code of the first gain control amount information; the gain control number is encoded; and gain control position information indicating a particular value corresponding to a gain control position is encoded.

The present invention provides an eighteenth encoding apparatus comprising detection means for detecting gain control position information indicating a particular value corresponding to a gain control position of a band signal; gain control position information encoding means for encoding gain control position information such that a value represented by a particular number of bits indicating the difference between first gain control position information of one or more pieces of gain control position information detected by the detection means from one of the band signals and gain control position information corresponding to a gain control position of a part adjacent to a part indicated by a gain control position corresponding to the first gain control position information is employed as the code of the first gain control position information; gain control number encoding means for encoding a gain control number; and gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount.

The present invention provides an eighteenth encoding method comprising a detection step, of detecting gain control position information indicating a particular value corresponding to a gain control position of a band signal; a gain control position information encoding step of encoding gain control position information such that a value represented by a particular number of bits indicating the difference between first gain control position information of one or more pieces of gain control position information detected in the detection step from one of the band signals and gain control position information corresponding to a gain control position of a part adjacent to a part indicated by a gain control position corresponding to the first gain control position information is employed as the code of the first gain control position information; a gain control number encoding step of encoding a gain control number; and a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount.

In the eighteenth encoding apparatus and encoding method according to the present invention, gain control position information indicating a particular value corresponding to a gain control position of a band signal is detected; gain control position information is encoded such that a value represented by a particular number of bits indicating the difference between first gain control position information of one or more pieces of gain control position information detected from one of the band signals and gain control position information corresponding to a gain control position of a part adjacent to a part indicated by a gain control position corresponding to the first gain control position information is employed as the code of the first gain control position information; the gain control number is encoded; and gain control amount information indicating a particular value corresponding to a gain control amount is encoded.

The present invention provides a nineteenth encoding apparatus comprising detection means for detecting gain control position information indicating a particular value corresponding to a gain control position of a band signal; calculation means for calculating the difference value between arbitrary first gain control position information of one or more pieces of gain control position information detected by the detection means from one of the band signals and gain control position information corresponding to the gain control position of a part adjacent to a part indicated by the gain control position corresponding to the first gain control position information; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means; gain control position information encoding means for encoding the first gain control position information such that a code corresponding to the difference value calculated by the calculation means is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; gain control number encoding means for encoding a gain control number; and gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation performed by the calculation means. In this case, when the correspondence of the calculated difference value is not found in the table, the gain control position information encoding means may encode an escape code and the first gain control position information. The retaining means retains a first table indicating a value-code correspondence which is applied when the first gain control position information indicates a position of an attack portion and in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means, and also retaining a second table indicating a value-code correspondence which is applied when the first gain control position information indicates a position of a release portion and in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means; and the first encoding means performs encoding of the first gain control position information such that when the first gain control position information corresponds to the position of an attack portion, a code corresponding to the difference value is retrieved from the first table and the retrieved code is employed as the code of the first gain control position information, while when the first gain control position information corresponds to the position of a release portion, a code corresponding to the difference value is retrieved from the second table and the retrieved code is employed as the code of the first gain control position information.

The present invention provides a nineteenth encoding method comprising a detection step, of detecting gain control position information indicating a particular value corresponding to a gain control position of a band signal; a calculation step for calculating the difference value between arbitrary first gain control position information of one or more pieces of gain control position information detected in the detection step from one of the band signals and gain control position information corresponding to the gain control position of a part adjacent to a part indicated by the gain control position corresponding to the first gain control position information; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed in the calculation step; a gain control position information encoding step of encoding the first gain control position information such that a code corresponding to the difference value calculated in the calculation step is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; a gain control number encoding step of encoding a gain control number; and a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount.

In the nineteenth encoding apparatus and encoding method according to the present invention, gain control position information indicating a particular value corresponding to a gain control position of a band signal is detected; the difference value between arbitrary first gain control position information of one or more pieces of gain control position information detected from one of the band signals and gain control position information corresponding to the gain control position of a part adjacent to a part indicated by the gain control position corresponding to the first gain control position information is calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as the result of calculation of the difference value; a code corresponding to the calculated difference value is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; the gain control number is encoded; and gain control amount information indicating a particular value corresponding to a gain control amount is encoded.

The present invention provides a twentieth encoding apparatus comprising detection means for detecting a gain control position information indicating a value corresponding to a gain control position of a first arbitrary band signal of the band signals and detecting gain control position information indicating a value corresponding to a gain control position of a second band signal in a band adjacent to the band of the first band signal; calculation means for calculating the difference value between the first gain control position information detected by the detection means from the first band signal and the second gain control position information detected by the detection means from the second band signal; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means; gain control position information encoding means for encoding the first gain control position information such that a code corresponding to the difference value calculated by the calculation means is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; gain control number encoding means for encoding a gain control number; and gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation performed by the calculation means. In this case, when the correspondence of the calculated difference value is not found in the table, the gain control position information encoding means may encode an escape code and the first gain control position information.

The retaining means retains a first table indicating a value-code correspondence which is applied when the first gain control position information indicates a position of an attack portion and in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means, and also retaining a second table indicating a value-code correspondence which is applied when the first gain control position information indicates a position of a release portion and in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means; and the first encoding means performs encoding of the first gain control position information such that when the first gain control position information corresponds to the position of an attack portion, a code corresponding to the difference value is retrieved from the first table and the retrieved code is employed as the code of the first gain control position information, while when the first gain control position information corresponds to the position of a release portion, a code corresponding to the difference value is retrieved from the second table and the retrieved code is employed as the code of the first gain control position information.

The present invention provides a twentieth encoding method comprising a detection step of detecting gain control position information indicating a particular value corresponding to a gain control position of a first arbitrary band signal of band signals and gain control position information indicating a particular value corresponding to a gain control position of a second band signal in a band adjacent to the band of the first band signal; a calculation step of calculating the difference value between first gain control position information detected in the detection step from the first band signal and second gain control position information detected in the detection step from the second band signal; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed in the calculation step; a gain control position information encoding step of encoding the first gain control position information such that a code corresponding to the difference value calculated in the calculation step is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; a gain control number encoding step of encoding a gain control number; and a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount.

In the twentieth encoding apparatus and encoding method according to the present invention, gain control position information indicating a particular value corresponding to a gain control position of a first arbitrary band signal of band signals and also gain control position information indicating a particular value corresponding to a gain control position of a second band signal in a band adjacent to the band of the first band signal are detected; the difference value between first gain control position information detected from the first band signal and second gain control position information detected from the second band signal is calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as the result of calculation of the difference value; a code corresponding to the calculated difference value is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; the gain control number is encoded; and gain control amount information indicating a particular value corresponding to a gain control amount is encoded.

The present invention provides a twenty-first encoding apparatus comprising detection means for detecting a gain control position information indicating a value corresponding to a gain control position of a first arbitrary band signal of the band signals and detecting gain control position information indicating a value corresponding to a gain control position of a second band signal in a band adjacent to the band of the first band signal; first calculation means for calculating the first difference value between arbitrary first gain control position information of one or more pieces of gain control position information detected by the detection means from the first band signal and gain control position information corresponding to the gain control position of a part adjacent to a part indicated by the gain control position corresponding to the first gain control position information and also calculating the second difference value between third gain control position information corresponding to the first gain control position information and fourth gain control position information corresponding to the second gain control position information, the third gain control position information and the fourth gain control position information having been detected from the second band signal; second calculation means for calculating the third difference value between the first difference value and the second difference value; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the third difference value in the calculation performed by the second calculation means; gain control position information encoding means for encoding the first gain control position information such that a code corresponding to the third difference value calculated by the second calculation means is retrieved from the table and the retrieved code is employed as the code of first gain control position information; gain control number encoding means for encoding a gain control number; and gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation of the third difference value performed by the calculation means. In this case, when the correspondence of the calculated third difference value is not found in the table, the gain control position information encoding means may encode an escape code and the first gain control position information.

The retaining means retaining means a first table indicating a value-code correspondence which is applied when the first gain control position information indicates a position of an attack portion and in which a code with a small number of bits is assigned to a third difference value having a high probability of being obtained as a result of the calculation performed by the second calculation means, and also retaining a second table indicating a value-code correspondence which is applied when the first gain control position information indicates a position of a release portion and in which a code with a small number of bits is assigned to a third difference value having a high probability of being obtained as a result of the calculation performed by the second calculation means; and the first encoding means performs encoding of the first gain control position information such that when the first gain control position information corresponds to the position of an attack portion, a code corresponding to the third difference value is retrieved from the first table and the retrieved code is employed as the code of the first gain control position information, while when the first gain control position information corresponds to the position of a release portion, a code corresponding to the third difference value is retrieved from the second table and the retrieved code is employed as the code of the first gain control position information.

The present invention provides a twenty-first encoding method comprising a detection step of detecting gain control position information indicating a particular value corresponding to a gain control position of a first arbitrary band signal of band signals and gain control position information indicating a particular value corresponding to a gain control position of a second band signal in a band adjacent to the band of the first band signal; a first calculation step of calculating the first difference value between arbitrary first gain control position information of one or more pieces of gain control position information detected in the detection step from the first band signal and gain control position information corresponding to the gain control position of a part adjacent to a part indicated by the gain control position corresponding to the first gain control position information and also calculating the second difference value between third gain control position information corresponding to the first gain control position information and fourth gain control position information corresponding to the second gain control position information, the third gain control position information and the fourth gain control position information having been detected from the second band signal; a second calculation step of calculating the third difference value between the first difference value and the second difference value; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the third difference value in the calculation performed in the second calculation step; a gain control position information encoding step of encoding the first gain control position information such that a code corresponding to the third difference value calculated in the second calculation step is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; a gain control number encoding step of encoding a gain control number; and a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount.

In the twenty-first encoding apparatus and encoding method according to the present invention, gain control position information indicating a particular value corresponding to a gain control position of a first arbitrary band signal of band signals and also gain control position information indicating a particular value corresponding to a gain control position of a second band signal in a band adjacent to the band of the first band signal are detected; the first difference value between arbitrary first gain control position information of one or more pieces of gain control position information detected from the first band signal and gain control position information corresponding to the gain control position of a part adjacent to a part indicated by the gain control position corresponding to the first gain control position information is calculated, and furthermore, the second difference value between third gain control position information and fourth gain control position information detected from the second band signal is calculated, wherein the third gain control position information and the fourth gain control position information correspond to the first gain control position information and the second gain control position information, respectively; the third difference value between the first difference value and the second difference value is calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as a result of calculation of the third difference value; a code corresponding to the calculated third difference value is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; the gain control number is encoded; and gain control amount information indicating a particular value corresponding to a gain control amount is encoded.

The present invention provides a twenty-second encoding apparatus comprising detection means for detecting gain control position information indicating a value corresponding to a gain control position information of a first arbitrary band signal of band signals and detecting gain control position information indicating a value corresponding to a gain control position information of a second band signal of a band adjacent to the band of the first band signal; determination means for determining whether first gain control position information detected by the detection means from the first band signal and second gain control position information detected from the second band signal are equal to each other; gain control position information encoding means for performing encoding such that if the determination made by the determination means is affirmative, only a flag indicating that the first gain control position information and second gain control position information are equal to each other is encoded, while, if the determination made by the determination means is negative, both a flag, indicating that the first gain control position information and second gain control position information are not equal to each other, and the second gain control position information are encoded; gain control number encoding means for encoding a gain control number; and gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount.

The present invention provides a twenty-second encoding method comprising a detection step of detecting gain control position information indicating a particular value corresponding to a gain control position information of a first arbitrary band signal of band signals and gain control position information indicating a particular value corresponding to a gain control position information of a second band signal in a band adjacent to the band of the first band signal; a determination step of determining whether the first gain control position information detected in the detection step from the first band signal is equal to the second gain control position information detected in the detection step from the second band signal; a gain control position information encoding step of performing encoding such that if the determination made in the determination step is affirmative, only a flag indicating that the first gain control position information and second gain control position information are equal to each other is encoded, while, if the determination made in the determination step is negative, both a flag, indicating that the first gain control position information and second gain control position information are not equal to each other, and the second gain control position information are encoded; a gain control number encoding step of encoding a gain control number; and a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount.

In the twenty-second encoding apparatus and encoding method according to the present invention, gain control position information indicating a particular value corresponding to a gain control position information of a first arbitrary band signal of band signals and also gain control position information indicating a particular value corresponding to a gain control position information of a second band signal in a band adjacent to the band of the first band signal are detected; it is determined whether first gain control position information detected from the first band signal and second gain control position information detected from the second band signal are equal to each other; if the result of the determination is affirmative, only a flag indicating that the first gain control position information and the second gain control position information are equal to each other is encoded, while if the result of the determination is negative, a flag indicating that the first gain control position information and the second gain control position information are not equal to each other and the second gain control position information are encoded; the gain control number is encoded; and gain control amount information indicating a particular value corresponding to a gain control amount is encoded.

The present invention provides a twenty-third encoding apparatus comprising detection means for detecting gain control position information indicating a particular value corresponding to a gain control position of a band signal; calculation means for calculating a smallest number of bits which can represent the difference between the maximum and minimum values of the gain control position information detected by the detection means; gain control position information encoding means for encoding the gain control position information such that the minimum value determined by the calculation means is encoded, a value obtained by subtracting the minimum value from the gain control position information detected by the detection means is expressed by as many bits as the number of bits calculate by the calculation means, and a resultant expression is employed as the code of the gain control position information; gain control number encoding means for encoding a gain control number; and gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount.

The calculation means may calculate a smallest number of bits which can represent the difference between the maximum and minimum values of one or more pieces of gain control position information detected by the detection means from one band signal; and the gain control position information encoding means may encode the gain control position information such that values obtained by subtracting the minimum value from the one or more pieces of gain control position information are expressed by as many bits as the number of bits calculate by the calculation means and resultant expressions are employed as the codes of the one or more pieces of gain control position information.

The present invention provides a twenty-third encoding method comprising a detection step, of detecting gain control position information indicating a particular value corresponding to a gain control position of a band signal; a calculation step of calculating a smallest number of bits which can represent the difference between the maximum and minimum values of the gain control position information detected in the detection step; a gain control position information encoding step for encoding the gain control position information such that the minimum value determined in the calculation step is encoded, a value obtained by subtracting the minimum value from the gain control position information detected in the detection step is expressed by as many bits as the number of bits calculated in the calculation step, and a resultant expression is employed as the code of the gain control position information; a gain control number encoding step of encoding a gain control number; and a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount.

In the twenty-third encoding apparatus and encoding method according to the present invention, gain control position information indicating a particular value corresponding to a gain control position of a band signal is detected; the smallest number of bits which can represent the difference between the maximum and minimum values of the detected gain control position information is calculated; the determined minimum value is encoded and furthermore gain control position information is encoded such that values obtained by subtracting the minimum value from the detected pieces of gain control position information are expressed by as many bits as the smallest number of bits calculate above, and resultant expressions are employed as the codes of the respective pieces of gain control position information; the gain control number is encoded; and gain control amount information indicating a particular value corresponding to a gain control amount is encoded.

The present invention provides a twenty-fourth encoding apparatus comprising detection means for detecting gain control position information indicating a particular value corresponding to a gain control position of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; calculation means for calculating the difference value between the first gain control position information detected by the detection means from the band signal of the left-channel signal and the second gain control position information detected by the detection means from the band signal of the right-channel signal; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means; gain control position information encoding means for encoding the first or second gain control position information such that a code corresponding to the difference value calculated by the calculation means is retrieved from the table and the retrieved code is employed as the code of the first or second gain control position information; gain control number encoding means for encoding a gain control number; and gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation performed by the calculation means. In this case, when the correspondence of the calculated difference value is not found in the table, the gain control position information encoding means may encode an escape code and the gain control position information.

The retaining means retaining means a first table indicating a value-code correspondence which is applied when the first gain control position information indicates a position of an attack portion and in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means, and also retaining a second table indicating a value-code correspondence which is applied when the first gain control position information indicates a position of a release portion and in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the calculation means; and the first encoding means performs encoding of the first gain control position information such that when the first gain control position information corresponds to the position of an attack portion, a code corresponding to the difference value is retrieved from the first table and the retrieved code is employed as the code of the first gain control position information, while when the first gain control position information corresponds to the position of a release portion, a code corresponding to the difference value is retrieved from the second table and the retrieved code is employed as the code of the first gain control position information.

The present invention provides a twenty-fourth encoding method comprising a detection step of detecting gain control position information indicating a particular value corresponding to a gain control position of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; a calculation step of calculating the difference value between first gain control position information detected in the detection step from the band signal of the left-channel signal and second gain control position information detected in the detection step from the band signal of the right-channel signal; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed in the calculation step; a gain control position information encoding step of encoding the first or second gain control position information such that a code corresponding to the difference value calculated in the calculation step is retrieved from the table and the retrieved code is employed as the code of the first or second gain control position information; a gain control number encoding step of encoding a gain control number; and a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount.

In the twenty-fourth encoding apparatus and encoding method according to the present invention, gain control position information indicating a particular value corresponding to a gain control position of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal are detected; the difference value between first gain control position information detected from the band signal of the left-channel signal and second gain control position information detected from the band signal of the right-channel signal is calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as the result of calculation of the difference value; a code corresponding to the calculated difference value is retrieved from the table and the retrieved code is employed as the code of the first or second gain control position information; the gain control number is encoded; and gain control amount information indicating a particular value corresponding to a gain control amount is encoded.

The present invention provides a twenty-fifth encoding apparatus comprising detection means for detecting gain control position information indicating a particular value corresponding to a gain control position of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; determination means for determining whether gain control position information detected by the detection means from a band signal of the left-channel signal and gain control position information detected by the detection means from a band signal of the right-channel signal are equal to each other; gain control position information encoding means for performing encoding such that if the determination made by the determination means is affirmative, a flag indicating that the first gain control position information and the second gain control position information are equal to each other and the first or second gain control position information are encoded, while, if the determination made by the determination means is negative, a flag indicating that the first gain control position information and the second gain control position information are not equal to each other, the first gain control position information, and the second and gain control position information are encoded; gain control number encoding means for encoding a gain control number; and gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount.

The present invention provides a twenty-fifth encoding method comprising a detection step of detecting gain control position information indicating a particular value corresponding to a gain control position of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; a determination step of determining whether the first gain control position information detected in the detection step from the band signal of the left-channel signal is equal to the second gain control position information detected in the detection step from the band signal of the right-channel signal; a gain control position information encoding step of performing encoding such that if the determination made in the determination step is affirmative, a flag indicating that first gain control position information and second gain control position information are equal to each other and the first or second gain control position information are encoded, while, if the determination made in the determination step is negative, a flag indicating that the first gain control position information and the second gain control position information are not equal to each other, the first gain control position information, and the second and gain control position information are encoded; a gain control number encoding step of encoding a gain control number; and a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount.

In the twenty-fifth encoding apparatus and encoding method according to the present invention, gain control position information indicating a particular value corresponding to a gain control position of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal are detected; it is determined whether gain control position information detected from a band signal of the left-channel signal and gain control position information detected by the detection means from a band signal of the right-channel signal are equal to each other; if the result of the determination is affirmative, a flag indicating that the first gain control position information and the second gain control position information are equal to each other and the first or second gain control position information are encoded, while if the result of the determination is negative, a flag indicating that the first gain control position information and the second gain control position information are not equal to each other and the first and second gain control position information are encoded; the gain control number is encoded; and gain control amount information indicating a particular value corresponding to a gain control amount is encoded.

The present invention provides a twenty-sixth encoding apparatus comprising detection means for detecting gain control position information indicating a particular value corresponding to a gain control position of a band signal of a left-channel signal and that of a band signal of a right-channel signal; determination means for determining whether gain control position information detected by the detection means from the band signals of the left-channel signal and gain control position information detected by the detection means from the corresponding band signals of the right-channel signal are equal to each other for all bands; gain control position information encoding means for performing encoding such that if the determination made by the determination means is affirmative, the first or second gain control position information is encoded, while, if the determination made by the determination means is negative, the first gain control position information and the second gain control position information are encoded; gain control number encoding means for encoding a gain control number; and gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount.

The present invention provides a twenty-sixth encoding method comprising a detection step for detecting gain control position information indicating a particular value corresponding to a gain control position of a band signal of a left-channel signal and that of a band signal of a right-channel signal; a determination step of determining whether gain control position information detected in the detection step from the band signal of the left-channel signal and gain control position information detected in the detection step from the band signal of the right-channel signal are equal to each other for all bands; a gain control position information encoding step of performing encoding such that if the determination made in the determination step is affirmative, the first or second gain control position information is encoded, while, if the determination made in the determination step is negative, the first gain control position information and the second gain control position information are encoded; a gain control number encoding step of encoding a gain control number; and a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount.

In the twenty-sixth encoding apparatus and encoding method according to the present invention, gain control position information indicating a particular value corresponding to a gain control position of a band signal of a left-channel signal and that of a band signal of a right-channel signal are detected; it is determined whether gain control position information detected from the band signals of the left-channel signal and gain control position information detected from the corresponding band signals of the right-channel signal are equal to each other for all bands; if the result of the determination is affirmative, the first or second gain control position information is encoded, while if the result of the determination is negative, the first gain control position information and the second gain control position information are encoded; the gain control number is encoded; and gain control amount information indicating a particular value corresponding to a gain control amount is encoded.

The present invention provides a twenty-seventh encoding apparatus comprising detection means for detecting gain control position information indicating a particular value corresponding to a gain control position of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; first calculation means for calculating the difference value between first gain control position information and second gain control position information, wherein the first gain control position information is arbitrary gain control position information of one or more pieces of gain control position information detected by the detection means from the band signal of the left-channel signal, and the second gain control position information has a value corresponding to a gain control position adjacent to the first gain control position; second calculation means for calculating the difference value between third gain control position information and fourth gain control position information, wherein the third gain control position information and fourth gain control position information are gain control position information of one or more pieces of gain control position information detected from the band signal of the right-channel signal, and the third gain control position information and fourth gain control position information correspond to the first gain control position information and second gain control position information, respectively; third calculation means for calculating the difference value between the difference value calculated by the first calculation means and the difference value calculated by the second calculation means; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the third calculation means; gain control position information encoding means for encoding the first gain control position information such that a code corresponding to the difference value calculated by the third calculation means is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; gain control number encoding means for encoding a gain control number; and gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation performed by the calculation means. In this case, when the correspondence of the calculated difference value is not found in the table, the gain control position information encoding means may encode an escape code and the first gain control position information.

The retaining means retaining means a first table indicating a value-code correspondence which is applied when the first gain control position information indicates a position of an attack portion and in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the second calculation means, and also retaining a second table indicating a value-code correspondence which is applied when the first gain control position information indicates a position of a release portion and in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the second calculation means; and the first encoding means performs encoding of the first gain control position information such that when the first gain control position information corresponds to the position of an attack portion, a code corresponding to the difference value is retrieved from the first table and the retrieved code is employed as the code of the first gain control position information, while when the first gain control position information corresponds to the position of a release portion, a code corresponding to the third difference value is retrieved from the second table and the retrieved code is employed as the code of the first gain control position information.

The present invention provides a twenty-seventh encoding method comprising a detection step of detecting gain control position information indicating a particular value corresponding to a gain control position of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal; a first calculation step of calculating the difference value between first gain control position information and second gain control position information, wherein the first gain control position information is arbitrary gain control position information of one or more pieces of gain control position information detected in the detection step from the band signal of the left-channel signal, and the second gain control position information has a value corresponding to a gain control position adjacent to the first gain control position; a second calculation step for calculating the difference value between third gain control position information and fourth gain control position information, wherein the third gain control position information and fourth gain control position information are gain control position information of one or more pieces of gain control position information detected from the band signal of the right-channel signal, and the third gain control position information and fourth gain control position information correspond to the first gain control position information and second gain control position information, respectively; a third calculation step of calculating the difference value between the difference value calculated in the first calculation step and the difference value calculated in the second calculation step; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed in the third calculation step; a gain control position information encoding step of encoding the first gain control position information such that a code corresponding to the difference value calculated in the third calculation step is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; a gain control number encoding step of encoding a gain control number; and a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount.

In the twenty-seventh encoding apparatus and encoding method according to the present invention, gain control position information indicating a particular value corresponding to a gain control position of an arbitrary band signal of a left-channel signal and that of a band signal of a right-channel signal in the same band as that of the band signal of the left-channel signal are detected; the difference value between first gain control position information and second gain control position information is calculated, wherein the first gain control position information is arbitrary gain control position information of one or more pieces of gain control position information detected by the detection means from the band signal of the left-channel signal, and the second gain control position information has a value corresponding to a gain control position adjacent to the first gain control position; and also calculating the second difference value between third and fourth gain control position information of one or more pieces of gain control position information detected from the band signal of the right-channel signal, the third gain control position information and the fourth gain control position information corresponding to the first gain control position information and the second gain control position information, respectively; the difference value between the calculated difference values is further calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as the result of calculation of the difference value; a code corresponding to the calculated difference value is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; the gain control number is encoded; and gain control amount information indicating a particular value corresponding to a gain control amount is encoded.

The present invention provides a twenty-eighth encoding apparatus comprising detection means for detecting gain control position information indicating values corresponding to gain control positions of an arbitrary first band signal, a second band signal, a third band signal, and a fourth band signal, respectively, the first band signal and the second band signal being of band signals of a left-channel signal, the second band signal being of a band adjacent to a band of the first band signal, the third band signal and the fourth band signal being of band signals of a right-channel signal, the third band signal corresponding to the first band signal, the fourth band signal corresponding to the second band signal; first calculation means for calculating the difference value between first gain control position information detected by the detection means from the first band signal and second gain control position information detected by the detection means from the second band signal; second calculation means for calculating the difference value between third gain control position information detected from the third band signal and fourth gain control position information detected from the fourth band signal; third calculation means for calculating the difference value between the difference value calculated by the first calculation means and the difference value calculated by the second calculation means; retaining means for retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the third calculation means; gain control position information encoding means for encoding the first gain control position information such that a code corresponding to the difference value calculated by the third calculation means is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; gain control number encoding means for encoding a gain control number; and gain control amount information encoding means for encoding gain control amount information indicating a particular value corresponding to a gain control amount.

The table indicating the difference value versus code correspondence may include only one or more difference values having high probabilities of being obtained as the result of the calculation performed by the third calculation means. In this case, when the correspondence of the calculated difference value is not found in the table, the gain control position information encoding means may encode an escape code and the first gain control position information.

The retaining means retaining means a first table indicating a value-code correspondence which is applied when the first gain control position information indicates a position of an attack portion and in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the third calculation means, and also retaining a second table indicating a value-code correspondence which is applied when the first gain control position information indicates a position of a release portion and in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed by the third calculation means; and the first encoding means performs encoding of the first gain control position information such that when the first gain control position information corresponds to the position of an attack portion, a code corresponding to the difference value is retrieved from the first table and the retrieved code is employed as the code of the first gain control position information, while when the first gain control position information corresponds to the position of a release portion, a code corresponding to the difference value is retrieved from the second table and the retrieved code is employed as the code of the first gain control position information.

The present invention provides a twenty-eighth encoding method comprising a detection step for detecting gain control position information indicating values corresponding to gain control positions of an arbitrary first band signal, a second band signal, a third band signal, and a fourth band signal, respectively, the first band signal and the second band signal being of band signals of a left-channel signal, the second band signal being of a band adjacent to a band of the first band signal, the third band signal and the fourth band signal being of band signals of a right-channel signal, the third band signal corresponding to the first band signal, the fourth band signal corresponding to the second band signal; a first calculation step of calculating the difference value between first gain control position information detected in the detection step from the first band signal and second gain control position information detected in the detection step from the second band signal; a second calculation step for calculating the difference value between third gain control position information detected from the third band signal and fourth gain control position information detected from the fourth band signal; a third calculation step of calculating the difference value between the difference value calculated in the first calculation step and the difference value calculated in the second calculation step; a retaining step of retaining a table indicating a value-code correspondence in which a code with a small number of bits is assigned to a value having a high probability of being obtained as the result of the calculation of the difference value performed in the third calculation step; a gain control position information encoding step of encoding the first gain control position information such that a code corresponding to the difference value calculated in the third calculation step is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; a gain control number encoding step of encoding a gain control number; and a gain control amount information encoding step of encoding gain control amount information indicating a particular value corresponding to a gain control amount.

In the twenty-eighth encoding apparatus and encoding method according to the present invention, gain control position information indicating values corresponding to gain control positions of an arbitrary first band signal, a second band signal, a third band signal, and a fourth band signal, respectively, is detected, wherein the first band signal and the second band signal are of band signals of a left-channel signal, the second band signal is of a band adjacent to a band of the first band signal, the third band signal and the fourth band signal are of band signals of a right-channel signal, the third band signal corresponds to the first band signal, and the fourth band signal corresponds to the second band signal; the difference value between first gain control position information detected from the first band signal and second gain control position information detected from the second band signal is calculated; the difference value between third gain control position information detected from the third band signal and fourth gain control position information detected from the fourth band signal is calculated; the difference value between the calculated difference values is further calculated; there is retained a table in which codes with small numbers of bits are assigned to values having high probabilities of being obtained as the result of calculation of the difference value; a code corresponding to the calculated difference value is retrieved from the table and the retrieved code is employed as the code of the first gain control position information; the gain control number is encoded; and gain control amount information indicating a particular value corresponding to a gain control amount is encoded.

The present invention provides a twenty-ninth encoding apparatus comprising band splitting means for splitting the acoustic time series signal into N bands thereby producing N band signals; execution means for producing gain control numbers, gain control amount information having values corresponding to the gain control amounts, and gain control position information having values corresponding to gain control positions associated with the respective band signals and executing gain control process on the band signals in accordance with the gain control numbers, the gain control amount information, and the gain control position information; a plurality of gain control number encoding means for encoding the gain control number; first selection means for selecting one of the gain control number encoding means, in accordance with information indicating the code length of the gain control numbers encoded by the plurality of gain control number encoding means; a plurality of gain control amount information encoding means for encoding the gain control amount information; second selection means for selecting one of the gain control amount information encoding means, in accordance with information indicating the code length of the gain control amount information encoded by the plurality of gain control amount information encoding means; a plurality of gain control position information encoding means for encoding the gain control position information; third selection means for selecting one of the gain control position information encoding means, in accordance with information indicating the code length of the gain control position information encoded by the plurality of gain control position information encoding means; multiplexing means for multiplexing the gain control numbers encoded by the gain control number encoding means selected by the first selection means, the gain control amount information encoded by the gain control amount information encoding means selected by the second selection means, and the gain control position information encoded by the gain control position information encoding means selected by the third selection means, together with the encoded acoustic time series signal, thereby producing encoded data.

The present invention provides a twenty-ninth encoding method comprising a band splitting step of splitting the acoustic time series signal into N bands thereby producing N band signals; an execution step of producing gain control numbers, gain control amount information having values corresponding to the gain control amounts, and gain control position information having values corresponding to gain control positions associated with the respective band signals and executing gain control process on the band signals in accordance with the gain control numbers, the gain control amount information, and the gain control position information; a gain control number encoding step of encoding the gain control numbers; a first selection step of selecting one of the gain control number encoding step, in accordance with information indicating the code length of the gain control numbers encoded in the plurality of gain control number encoding step; a plurality of gain control amount information encoding steps for encoding the gain control amount information; a second selection step of selecting one of the gain control amount information encoding step, in accordance with information indicating the code length of the gain control amount information encoded in the plurality of gain control amount information encoding step; a plurality of gain control position information encoding steps for encoding the gain control position information; a third selection step of selecting one of the gain control position information encoding step, in accordance with information indicating the code length of the gain control position information encoded in the plurality of gain control position information encoding step; a multiplexing step of multiplexing the gain control numbers encoded in the gain control number encoding step selected in the first selection step, the gain control amount information encoded in the gain control amount information encoding steps selected in the second selection step, and the gain control position information encoded in the gain control position information encoding steps selected in the third selection step, together with the encoded acoustic time series signal, thereby producing encoded data.

In the twenty-ninth encoding apparatus and encoding method according to the present invention, the acoustic time series signal is split into N bands thereby producing N band signals; gain control numbers, gain control amount information having values corresponding to the gain control amounts, and gain control position information having values corresponding to gain control positions associated with the respective band signals are produced, and gain control process is executed on the band signals in accordance with the gain control numbers, the gain control amount information, and the gain control position information; the gain control numbers are encoded; one of the gain control number encoding methods is selected in accordance with information indicating the code length of the encoded gain control numbers; the gain control amount information is encoded; one of the gain control amount information encoding methods is selected in accordance with information indicating the code length of the encoded gain control amount information; the gain control position information is encoded; one of the gain control position information encoding methods is selected in accordance with information indicating the code length of the encoded gain control position information; and the selected encoded gain control numbers, the selected encoded gain control amount information, and the selected encoded gain control position information are encoded together with the encoded acoustic time series signal thereby producing encoded data.

BEST MODE FOR CARRYING OUT THE INVENTION

FIG. 7shows an example of a construction of an encoding apparatus51according to the present invention. In addition to the parts employed in the encoding apparatus1shown inFIG. 1, the encoding apparatus51further includes gain control information encoder61. The other parts are similar to those of the encoding apparatus1shown in FIG.1and thus they are not described in further detail herein.

The spectrum converters12-1to12-12cut encoding units A0to A11input from a band splitter11into blocks (frames) with a fixed length (time period) and generate gain control information G0to G11depending on the amplitudes of the waveform signals in each block. Furthermore, the spectrum converters12-1to12-12control the gains of the waveform signals in the block in accordance with the gain control information G0to G11. The spectrum converters12-1to12-12output produced gain control information G0to G11to the gain control information encoder61.

The spectrum converters12-1to12-12perform a spectrum conversion based on DFT, DCT, or MDCT, on the signals subjected to the gain control, thereby generating spectral component signals S0to S11. The resultant spectral component signals S0to S11are supplied to normalizers13-1to13-12.

FIG. 8shows a construction of the gain control information encoder61. The gain control information G0to G11output from the spectrum converters12-1to12-12are input to a gain control number encoder71, a gain control amount information encoder72, and a gain control position information encoder73.

The gain control number encoder71encodes gain control numbers GA0to GA11included in the input gain control information G0to G11, by means of various different encoding methods which will be descried in detail later. The gain control number encoder71selects encoded gain control numbers GA0to GA11having a smallest total number of bits among those encoded by the various different encoding methods and output the selected encoded gain control numbers GA0to GA11to a multiplexer16.

The gain control amount information encoder72encodes gain control amount information GB0to GB11included in the input gain control information G0to G11, by means of various different encoding methods which will be descried later. The gain control amount information encoder72selects encoded gain control amount information GB0to GB11having a smallest total number of bits among those encoded by the various different encoding methods and output the selected encoded gain control amount information GB0to GB11to the multiplexer16.

The gain control position information encoder73encodes gain control position information GC0to GC11included in the input gain control information G0to G11, by means of various different encoding methods which will be descried later. The gain control position information encoder73selects encoded gain control position information GC0to GC11having a smallest total number of bits among those encoded by the various different encoding methods and output the selected encoded gain control position information GC0to GC11, to the multiplexer16.

Referring again toFIG. 7, the multiplexer16encodes the normalized coefficients B0to B11received from the normalizer13, the quantization step size information D0to D11received from the quantization step size setting unit14, and the quantized coefficients F0to F11received from the quantizer5and multiplexes them together with the encoded gain control information G0to G11(the gain control numbers GA0to GA11, the gain control amount information GB0to GB11, and the gain control position information GC0to GC11) received from the gain control information encoder61, on a frame-by-frame basis.

That is, in the present invention, the gain control numbers GA, the gain control amount information GB and the gain control position information GC of the gain control information G are respectively encoded into codes with smallest number of bits of those obtained by various encoding methods. That is, the gain control information G is encoded into a variable-length code so that the quantized coefficients F can be encoded more efficiently than can be by the conventional fixed-bit encoding method.

The gain control number encoder71, the gain control amount information encoder72, and the gain control position information encoder73(FIG. 8) of the gain control information encoder61are described in further detail below.

First, the details of the gain control number encoder71are described.FIG. 9shows an example of a construction of the gain control number encoder71.

The gain control information G0to G11output from the spectrum converters12-1to12-12are input to each of eight encoders81-1to81-8.

The encoders81-1to81-8detect gain control numbers GA0to GA11from the respective input gain control information G0to G11and encode the detected gain control numbers GA0to GA11by means of predetermined encoding methods. Resultant encoded data are output to terminals connected to switch83.

Each of the encoders81-1to81-8calculates the sum of the numbers of bits of the encoded gain control numbers GA0to GA11and outputs the calculated sum to the decision unit82.

The decision unit82detects, among encoders81-1to81-8, an encoder81which has output a smallest sum, that is, the decision unit82detects an encoder81which has encoded the gain control numbers GA0to GA11into a smallest total number of bits, and the decision unit82controls the switch83so that the encoded gain control numbers GA0to GA11encoded by the detected encoder81are output to the multiplexer16. The decision unit82also outputs information indicating the encoding method employed by the detected encoder81to the multiplexer16. The decision unit82stores information indicating the encoding methods employed by the respective encoders81.

The encoding methods employed by the respective encoders81-1to81-8of the gain control number encoder71are described.

First, the encoding method employed by the encoder81-1is described.

Although the gain control number GA can take any one of values from, in this specific example, 0 to 7, the gain control number GA has a high probability of taking a particular number (for example, 0) as shown in FIG.10. Thus, in the encoding of the gain control numbers GA, the encoder81-1assigns a code with a small number of bits to a gain control number GA having a high occurrence probability.

The operation of the encoder81-1is described below with reference to a flow chart shown in FIG.11.

In step S11, the encoder81-1detects gain control numbers GAi (i=0, 1, 2, . . . , 11) of one frequency band from the input gain control information G0to G11.

In the next step S12, the encoder81-1determines a code to be assigned to the gain control number GAi. More specifically, the encoder81-1retrieves a code corresponding to the gain control number GAi detected in step S11from a table shown in FIG.12and employs the retrieved code as the code of the gain control number GAi.

For example, in the case of gain control number GA2of gain control numbers GA0to GA11shown inFIG. 13, the gain control number GA2has a value of 1 and thus a 2-bit code of “10” is employed as the code thereof.

In the table shown inFIG. 12, a 1-bit code “0” is assigned to a value 0, a 2-bit code “10” to a value 1, a 3 bit code “110” to a value 2, and a 4-bit code “1110” to a value 3. Thus, if the encoder81-1detects a gain control number GAi having a value in the range of 0 to 3, the encoder81-1selects “0”, “110”, “110”, or “1110” corresponding to the value of the gain control number GAi and employs it as the code of the gain control number GAi.

Furthermore, in the table shown inFIG. 12, a procedure of determining a code for a value in the range from 4 to 7 is defined (more specifically, the code is determined by a formula 1111+(gain control number−4)).

According to this procedure, a 6-bit code consisting of bits b0to b5is given, as shown inFIG. 14, by a combination of a 4-bit code “1111” (escape code) and a following 2-bit code having a value equal to the gain control number GAi (having a value in the range from 4 to 7) minus 4. That is, if the encoder81-1detects a gain control number GAi having a value in the range of 4 to 7, the encoder81-1determines a 6-bit code via the above-described procedure and employs it as the code for the gain control number GAi.

In the next step S13, the encoder81-1determines whether codes have been determined for all gain control numbers GA0to GA11, that is, whether all gain control numbers GA0to GA11have been encoded. If it is determined that all gain control numbers GAi have not been encoded, the process returns to step S11to perform the step S11and following steps to encode a next unencoded gain control number GAi.

If it is determined in step S13that all gain control numbers GA0to GA11have been encoded, the process proceeds to step S14. In step S14, the encoder81-1outputs the codes determined in step S12for the respective gain control numbers GA0to GA11to the terminal connected to the switch83.

In the next step S15, the encoder81-1calculates the sum of the numbers of bits of the encoded gain control numbers GA0to GA11and outputs the calculated sum to the decision unit82.

For example, in the case of the gain control numbers GA0to GA11shown inFIG. 13, codes with numbers of bits such as those shown inFIG. 13are produced as the result of the encoding, and thus the total number of bits of the codes becomes equal to 26. Thus, a signal indicating that the total number of bits is equal to 26 is supplied to the decision unit82.

If the conventional fixed-length (3-bit) encoding method were employed, the gain control numbers GA in the example shown inFIG. 13would be encoded into codes with a total of 36 (=3×6) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 10 than that according to the conventional technique.

As described above, assigning a code with a small number of bits (1-bit code “0”) to a gain control number GA having a high occurrence probability makes it possible to reduce the total number of bits of gain control numbers GA0to GA11.

Although in the table (FIG. 12) used in the present example, escape codes are used for some values, specific codes including no escape code may be assigned to all respective values.

In the present example, the gain control number GA is assumed to have such a characteristic shown in FIG.10. In a case in which the characteristic of the gain control number GA varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the gain control number GA.

Now, the encoding method employed by the encoder81-2is described.

In most cases, the gain control numbers GA of encoding units A in adjacent two frequency bands (the gain control number GAi-1of the encoding unit Ai-1and the gain control number GAi of the encoding unit Ai) are equal or close to each other. For example, the absolute value of the difference value VA obtained by subtracting the gain control number GAi-1from the gain control number GAi has a high probability of becoming equal or close to 0, as shown in FIG.15.

In view of the above, the encoder81-2encodes the gain control number GA in such a manner that codes with small numbers of bits are assigned to difference values VA having high occurrence probabilities.

The operation of the encoder81-2is described below with reference to a flow chart shown in FIG.16.

In step S21, the encoder81-2detects a gain control number GAi of one frequency band from the input gain control information G0to G11and determines the difference value VA by subtracting, from the gain control number GAi, the gain control number GAi-1of the encoding unit Ai-1which is in a lower frequency band adjacent to the frequency band of the encoding unit Ai and which was detected in previous execution of step21.

Hereinafter, for simplicity, the difference value VA obtained by subtracting the gain control number GAi-1from the gain control number GAi will be referred to simply as the difference value VA of the gain control number GAi.

For example, in the case of gain control numbers GA0to GA11shown inFIG. 17, the difference value VA of the gain control number GA1(=2) is calculated as 1 (=gain control number GA1(=2)−gain control number GA0(=1)).

Note that the difference value VA of the gain control number GA0is not calculated because there is no gain control number GA in a band lower than the band of the gain control number GA0.

In the next step S22, the encoder81-2retrieves a code corresponding to a value equal to the difference value VA calculated in step S21from a table shown in FIG.18and employs the retrieved code as the code of the gain control number GAi.

In the table shown inFIG. 18, a 5-bit code “11110” is assigned to a value −2, a 3-bit code “110” to a value −1, a 1-bit code “0” to a value 0, a 2-bit code “10” to a value 1, and a 4-bit code “1110” to a value 2.

Furthermore, in the table shown inFIG. 18, a procedure of determining a code for a value other than the values of −2 to 2 is also defined (more specifically, the code is given by a formula 11111+original value). According to this procedure, an 8-bit code is given by a combination of a 5-bit code “11111” and a following 3-bit code having a value equal to the gain control number GA (original value).

In the case of the gain control number GA0, a code corresponding to a value equal to the value of the gain control number GA0is retrieved from the table shown inFIG. 12, and the retrieved code is employed as the code of the gain control number GA0. For example, the gain control number GA0shown inFIG. 17has a value of 1, and thus a 2 bit code of “10” is employed as the code thereof.

In the next step S23, the encoder81-2determines whether codes have been determined for all gain control numbers GA0to GA11, that is, whether all gain control numbers GA0to GA11have been encoded. If it is determined that all gain control numbers GAi have not been encoded, the process returns to step S21to perform the step S21and following steps to encode a next unencoded gain control number GAi.

If it is determined in step S23that all gain control numbers GA0to GA11have been encoded, the process proceeds to step S24. In step S24, the encoder81-2outputs the codes determined in step S22for the respective gain control numbers GA0to GA11to the terminal connected to the switch83.

In the next step S25, the encoder81-2calculates the sum of the numbers of bits of the encoded gain control numbers GA0to GA11and outputs the calculated sum to the decision unit82.

For example, in the case of gain control numbers GA shown inFIG. 17, codes with numbers of bits such as those shown inFIG. 17are produced as the result of the encoding, and thus the total number of bits of the codes becomes equal to 16. Thus, a signal indicating that the total number of bits is equal to 16 is supplied to the decision unit82.

If the conventional fixed-length (3-bit) encoding method were employed, the gain control numbers GA in the example shown inFIG. 17would be encoded into codes with a total of 36 (=3×12) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 20 than that according to the conventional technique.

Now, the encoding method employed by the encoder81-3is described.

In some cases, a gain control number GAi has a value equal to the value of a gain control number GAi-1of a lower frequency band immediately adjacent to the ban of the gain control number GAi. For example, in the gain control numbers GA0to GA11shown inFIG. 19, a gain control number GA3(=1) is equal in value to a gain control number GA2(=1).

Thus, when a gain control number GAi-1and a gain control number GAi are equal in value to each other, the encoder81-3encodes the gain control number GA in such a manner that only a flag (encoding flag) set to a value (0, in this specific example) indicating that the gain control number GAi-1and the gain control number GAi are equal in value to each other is encoded.

The operation of the encoder81-3is described below with reference to a flow chart shown in FIG.20.

In step S31, the encoder81-3detects a gain control number GAi of one frequency band from the input gain control information GA0to GA11, and determines whether the detected gain control number GAi is equal to the gain control number GAi-1detected in previous execution of step S31. If it is determined that they are equal to each other, the process proceeds to step S32to set the encoding flag of the gain control number GAi to 0.

In the specific example shown inFIG. 19, the gain control number GA3(=1) is equal in value to the gain control number GA2(=1), and thus the encoding flag associated with the gain control number GA3is set to 0.

In a case in which it is determined in step S31that the gain control number GAi is not equal to the gain control number GAi-1, the process proceeds to step S33. In step S33, the encoder81-3sets the encoding flag associated with the gain control number GAi to 1. In step S34, the encoder81-3expresses the gain control number GAi using a fixed number of bits (3 bits) and employs the resultant fixed-length expression as the code of the gain control number GAi.

In the example shown inFIG. 19, a gain control number GA0(=1) and a gain control number GA1(=4) are not equal in value to each other, and thus the encoding flag associated with the gain control number GA1is set to 1, and a 3-bit code representing the value of the gain control number GA1, that is, 4, is assigned to the gain control number GA1.

In this example, there is no encoding flag associated with the gain control number GA0, and the code for the gain control number GA0is determined in step S34as with a gain control number GA corresponding to an encoding flag set to 1.

After step S32in which the encoding flag is set to 0, or after step S34in which the gain control number GAi is encoded into a 3-bit code, the process proceeds to step S35. In step S35, the encoder81-3determines whether all encoding flags have been set to 0 or 1 and all gain control numbers GAi corresponding to the encoding flags set to 1 have been encoded into 3-bit codes, that is, the encoder813determines whether all gain control numbers GA0to GA11have been encoded. If it is determined that all gain control numbers GAi have not been encoded, the process returns to step S31to perform the step S31and following steps to encode a next unencoded gain control number GAi.

If it is determined in step S35that all gain control numbers GA0to GA11have been encoded, the process proceeds to step S36. In step S36, the encoder81-3outputs the encoding flag set to 0 or 1 and the codes to the terminal connected to the switch83.

In the next step S37, the encoder81-3calculates the sum of the numbers of bits of the encoded gain control numbers GA0to GA11and outputs the calculated sum to the decision unit82.

In the example shown inFIG. 19, as a result of encoding of the gain control numbers GA, 11 1-bit encoding flags, a 3-bit code associated with the gain control number GA0, a 3-bit code associated with the gain control number GA1, and a 3-bit code associated with the gain control number GA2are generated, and thus a signal indicating that the total number of bits is equal to 20 is output to the decision unit82.

If the conventional fixed-length (3-bit) encoding method were employed, the gain control numbers GA in the example shown inFIG. 19would be encoded into codes with a total of 36 (=3×12) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 16 than that according to the conventional technique.

Although in the present embodiment, the gain control number GA0, and also the gain control number GAi if it is not equal in value to the gain control number GAi-1, are encoded into codes with the fixed bit length, the encoding may be performed according to another method.

Now, the encoding method employed by the encoder81-4is described.

In most cases, because the gain control numbers GA0to GA11are close in value to each other, subtracting the minimum value of the gain control numbers GA0to GA11from the respective values of the gain control numbers GA0to GA11results in small values which can be represented using a small number of bits.

In view of the above, the encoder81-4encodes each gain control number GA in such a manner that the minimum value of the gain control numbers GA0to GA11is subtracted from the gain control number GAi and the resultant value represented in a predetermined number of bits is employed as the code of the gain control number GAi.

The operation of the encoder81-4is described below with reference to a flow chart shown in FIG.21.

In step S41, the encoder81-4extracts gain control numbers GA0to GA11from the input gain control information G0to G11and detects maximum and minimum values of the extracted gain control numbers GA0to GA11. In the example shown inFIG. 22, the maximum value of the gain control numbers GA0to GA11is detected as 2 and the minimum value as 1.

In step S42, the encoder81-4calculates the difference between the maximum and minimum values detected in step S41, and determines the number of bits which can represent the difference. Hereinafter, such a number of bits will be referred to as a necessary number of bits. In the example shown inFIG. 22, the difference between the maximum value (2) and the minimum value (1) is equal to 1, and thus the necessary number of bits is 1.

In step S43, the encoder81-4subtracts the minimum value detected in step S41from the respective values of the gain control numbers GA0to GA11and expresses the resultant difference values using as many bits as the necessary number of bits calculated in sep S42. The resultant expressions are employed as codes for the respective gain control numbers GA0to GA11. In the present example, the difference between the maximum and minimum values is equal to 1, and thus it can be represented by 1 bit (and thus the necessary number of bits is 1). Therefore, the values obtained by extracting the minimum value from the respective gain control numbers GA can be represented by 1 bit (equal to the necessary number of bits).

In step S44, the data indicating the minimum value detected in step S41, the data indicating the necessary number of bits calculated in step S42, and the codes, expressed using as many bits as the necessary number of bits, of gain control numbers GA0to GA11determined in step S43are output from the encoder81-4to the terminal connected the switch83.

In the example shown inFIG. 22, 3-bit data indicating the minimum value (=1), 2-bit data indicating the necessary number of bits (1 bit), and 12 codes represented in 1 bit (equal to the necessary number of bits) are output, as shown in FIG.23.

In the next step S45, the encoder81-4calculates the sum of the numbers of bits of the encoded gain control numbers GA0to GA11and outputs the calculated sum to the decision unit82.

For example, in the case of gain control numbers GA shown inFIG. 22, 2-bit data indicating the necessary number of bits, 3-bit data indicating the minimum value, and 12 1 bit (necessary number of bits) codes are generated as the result of the encoding, and thus a signal indicating that the total number of bits is equal to 17 is supplied to the decision unit82.

If the conventional fixed-length (3-bit) encoding method were employed, the gain control numbers GAR in the example shown inFIG. 22would be encoded into codes with a total of 36 (=3×12) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 19 than that according to the conventional technique.

The encoding method employed by the encoder81-5is described.

In most cases, in the stereo audio signal, the gain control number GALi of the left-channel signal and the gain control number GARi of the right-channel signal in the same frequency band are equal or close to each other. Therefore, the absolute value of the difference value WA1 obtained by subtracting the gain control number GALi from the gain control number GARi has a high probability of becoming equal or close to 0, as shown in FIG.24.

In view of the above, the encoder81-5encodes the gain control number GAL or GAR in such a manner that codes with small numbers of bits are assigned to difference values WA1 having high occurrence probabilities. That is, either the gain control number GAL or the gain control number GAR is encoded by means of the above method, and the other is encoded by means of, for example, the conventional encoding method.

The operation of the encoder81-5is described below with reference to a flow chart shown in FIG.25. Herein, it is assumed that the encoder81-5encodes the gain control number GAR.

In step S51, the encoder81-5detects a gain control number GALi and a gain control number GARi of one frequency band from the input gain control information GL0to GL11of the left-channel signal and gain control information GR0to GR11of the right-channel signal, respectively, and calculates the difference value WA1 by subtracting the gain control number GALi from the gain control number GARi.

Hereinafter, for simplicity, the difference value WA1 obtained by subtracting the gain control number GALi from the gain control number GARi will be referred to simply as the difference value WA1 of the gain control number GARi.

For example, in the case of the gain control numbers GAR0to GAR11shown inFIG. 26, the difference value WA1 of the gain control number GAR0is calculated as −1 (=gain control number GAR0(=1)−gain control number GAL0(=2)).

In the next step S52, the encoder81-5retrieves a code corresponding to the difference value WA1 calculated in step S51from a table similar to that shown in FIG.18and employs the retrieved code as the code of the gain control number GARi.

For example, in the case of the gain control number GAR0, because the difference value WA1 thereof is −1, and thus a 3-bit code “110” is employed as the code for the gain control number GAR0.

In step S53, the encoder81-5determines whether codes have been determined for all gain control numbers GAR0to GAR11, that is, whether all gain control numbers GAR0to GAR11have been encoded. If it is determined that all gain control numbers GAi have not been encoded, the process returns to step S51to perform the step S51and following steps to encode a next unencoded gain control number GARi.

If it is determined in step S53that all gain control numbers GAR0to GAR11have been encoded, the process proceeds to step S54. In step S54, the encoder81-5outputs the codes determined in step S52for the respective gain control numbers GAR0to GAR11to the terminal connected to the switch83.

In the next step S55, the encoder81-5calculates the sum of the numbers of bits of the gain control numbers GAR0to GAR11and outputs the calculated sum to the decision unit82.

For example, the gain control numbers GAR shown inFIG. 26are encoded into codes with as many bits as shown inFIG. 26, and thus the total number of bits of the codes becomes equal to 14. Thus, a signal indicating that the total number of bits is equal to 14 is supplied to the decision unit82.

If the conventional fixed-length (3-bit) encoding method were employed, the gain control numbers GAL in the example shown inFIG. 26would be encoded into codes with a total of 36 (=3×12) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 22 than that according to the conventional technique.

In the encoding table (FIG. 18) employed in the present example, some values are encoded using escape codes. Alternatively, specific codes corresponding to respective values may be defined in the table for all values.

In the present example, the difference value WA1 is assumed to have such a characteristic shown in FIG.24. In a case in which the characteristic of the difference value WA1 varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the difference value WA1.

Now, the encoding method employed by the encoder81-6is described.

In the stereo audio signal, the gain control number GALi of the left-channel signal and the gain control number GARi of the right-channel signal in the same frequency band often become equal to each other. For example, inFIG. 27, a gain control number GAL2(=1) of the gain control numbers GAL0to GAL11is equal in value to a gain control number GAR2(=1) of the gain control numbers GAR0to GAR11.

In view of the above, the encoder81-6performs encoding in such a manner that either gain control numbers GAL0to GAL11or gain control numbers GAR0to GAR11are encoded into fixed-length codes, and, in encoding of the other set of gain control numbers, for any gain control number GALi or GARi which is equal in value to a counterpart, only an encoding flag set to a value (0, in this case) indicating equality of the gain control number is encoded.

In the case in which gain control numbers GAL are encoded into codes with a fixed bit length, coding of gain control numbers GAR is performed in a manner described below with reference to a flow chart shown in FIG.28.

In step S61, the encoder81-6detects a gain control number GALi and a gain control number GARi in the same frequency band from the input gain control information GL0to GL11of the left-channel signal and gain control information GR0to GR11of the right-channel signal, respectively, and determines whether the detected gain control number GALi and gain control number GARi are equal in value to each other. If it is determined that they are equal to each other, the process proceeds to step S62.

In step S62, the encoder81-6sets the encoding flag associated with the gain control number GARi to 0. In the specific example shown inFIG. 27, the gain control number GAL2(=1) is equal in value to the gain control number GAR2(=1), and thus the encoding flag associated with the gain control number GAR2is set to 0.

However, in a case in which it is determined in step S61that the gain control number GALi and the gain control number GARi-1are not equal in value to each other, the process proceeds to step S63. In step S63, the encoder81-6sets the encoding flag associated with the gain control number GARi to 1. In step S64, the encoder81-6encodes the gain control number GARi into a code with a fixed bit length (3 bits).

In the example shown inFIG. 27, a gain control number GAL0(=1) and a gain control number GAR0(=4) are not equal in value to each other, and thus the encoding flag associated with the gain control number GAR0is set to 1, and a 3-bit code representing a value of 4 is assigned to the gain control number GAR0.

After step S62in which the encoding flag is set to 0, or after step S64in which the gain control number GARi is encoded into a 3-bit code, the process proceeds to step S65. In step S65, the encoder81-6determines whether all encoding flags have been set to 0 or 1 and all gain control numbers GAR corresponding to the encoding flags set to 1 have been encoded into 3-bit codes, that is, the encoder816determines whether all gain control numbers GAR0to GAR11have been encoded. If it is determined that all gain control numbers GARi have not been encoded, the process returns to step S61to perform the step S61and following steps to encode a next unencoded gain control number GARi.

If it is determined in step S65that all gain control numbers GAR0to GAR11have been encoded, the process proceeds to step S66. In step S66, the encoder81-6outputs the encoding flag set to 0 or 1 and the codes to the terminal connected to the switch83.

In the next step S67, the encoder81-6calculates the sum of the numbers of bits of the encoded gain control numbers GAR0to GAR11and outputs the calculated sum to the decision unit82.

In the example shown inFIG. 27, as a result of encoding of the gain control numbers GAR, 12 1-bit encoding flags and a 3-bit code associated with the gain control number GAR0are generated, and thus a signal indicating that the total number of bits is equal to 15 is supplied to the decision unit82.

If the conventional fixed-length (3-bit) encoding method were employed, the gain control numbers GAR in the example shown inFIG. 27would be encoded into codes with a total of 36 (=3×12) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 21 than that according to the conventional technique.

Although in the present embodiment, when the gain control number GAi-1and the gain control number GAi are not equal in value to each other, the gain control number GAi is encoded into a code with the fixed bit length, the encoding may be performed according to another method.

The encoding method employed by the encoder81-7is described.

In the stereo audio signal, as shown inFIG. 29, the gain control numbers GAL0to GAL11of the left-channel signal often become equal to corresponding gain control numbers GAR0to GAR11of the right-channel signal in the same frequency band.

In view of the above, the encoder81-7encodes either gain control numbers GAL0to GAL11or gain control numbers GAR0to GAR11into codes with a fixed bit length. However, when the gain control numbers GAL0to GAL11and the corresponding gain control numbers GAR0to GAR11are equal to each other, encoding of the other set of gain control numbers is not performed.

When gain control numbers GAL are encoded into codes with the fixed bit length, coding of gain control numbers GAR is performed in a manner described below with reference to a flow chart shown in FIG.30.

In step S71, the encoder81-7detects gain control numbers GAL0to GAL11and gain control numbers GAR0to GAR11from the input gain control information GL0to GL11of the left-channel signal and gain control information GR0to GR11of the right-channel signal, respectively. The encoder81-7then determines whether the gain control numbers GAL0to GAL11and the gain control numbers GAR0to GAR11are all equal to each other between corresponding counterparts. If it is determined that they are all equal to each other as is the case in the example shown inFIG. 29, the process proceeds to step S72.

In step S72, the encoder81-7does not encode the gain control numbers GAR but the encoder81-7outputs a value of 0 indicating that the number of bits of codes is equal to 0 to the decision unit82.

In a case in which it is determined in step S71that the gain control numbers GAL0to GAL11and the gain control numbers GAR0to GAR11are not all equal to each other between corresponding counterparts, the process proceeds to step S73. In step S73, the encoder81-7encodes the gain control numbers GAR0to GAR11into 3-bit codes.

In the next step S74, the encoder81-7outputs the resultant codes of the respective gain control numbers GAL0to GAL11to the terminal connected to the switch83.

In step S75, the encoder81-7calculates the sum of the numbers of bits of the encoded gain control numbers GAL0to GAL11and outputs the calculated sum to the decision unit82.

In the example shown inFIG. 29, the total number of bits of the codes of the gain control numbers GAL is equal to 36 (=3×12). Thus, a signal indicating that the total number of bits is equal to 36 is supplied to the decision unit82.

After step S72or step S75, the process performed by the encoder81-7is completed.

If the conventional fixed-length (3-bit) encoding method were employed, the gain control numbers GAR in the example shown inFIG. 29would be encoded into codes with a total of 36 (=3×12) bits. Thus, when the gain control numbers GAR are not encoded, the total number of bits of encoded data according to the present invention is smaller by 36 than that according to the conventional technique.

The encoding method employed by the encoder81-8is described.

As described earlier with reference toFIG. 15, the difference value VA obtained by subtracting a gain control number GAi-1of a lower frequency band immediately adjacent to the frequency band of a gain control number GAi from the gain control number GAi often becomes equal to a particular value.

Furthermore, in the case of stereo audio signals, as described earlier with reference toFIG. 24, the difference value WA1 obtained by subtracting a gain control number GALi from a gain control number GARi in the same frequency band has a high probability of becoming equal to a particular value.

That is, the absolute value of the difference value WA2 obtained by subtracting the difference value VA of the gain control number GARi from the difference value VA of the gain control number GALi has a high probability of becoming equal or nearly equal to 0, as shown in FIG.31.

In view of the above, the encoder81-8encodes the gain control number GA in such a manner that either gain control numbers GAL0to GAL11or gain control numbers GAR0to GAR11are encoded, and codes with small numbers of bits are assigned to gain control numbers GA corresponding to difference values WA2 having high occurrence probabilities.

The operation of the encoder81-8is described below with reference to a flow chart shown in FIG.32. Herein, it is assumed that the encoder81-7encodes the gain control number GAR.

In step S81, the encoder81-8detects a gain control number GALi and a gain control number GARi in the same frequency band from the input gain control information GL0to GL11of the left-channel signal and gain control information GR0to GR11of the right-channel signal, respectively, and determines the difference value VA of the gain control number GALi by subtracting the gain control number GALi-1of the encoding unit ALi-1, which was detected in previous execution of step S81, from the gain control number GALi.

The encoder81-8also determines the difference value VA of the gain control number GARi by subtracting the gain control number GARi-1of the encoding unit ARi-1, which was detected in previous execution of step S81, from the gain control number GARi.

For example, in the case of gain control numbers GA0to GA11shown inFIG. 33, the difference value VA of the gain control number GAL1(=1) is calculated as −1 (=gain control number GAL1(=1)−gain control number GAL0(=2)) (not shown), and the difference value VA of the gain control number GAR1, of the gain control numbers GAR0to GAR11, is calculated as 0 (=gain control number GAR1(=1)−gain control number GAR0(=1)) (not shown).

In the next step S82, the encoder81-8calculates the difference value WA2 by subtracting the difference value VA of gain control number GARi from the difference value VA of the gain control number GALi.

For example, the difference value WA2 of the gain control number GAR1is calculated as −1 (=gain control number GAL1(=−1)−gain control number GAR1(=0)).

In the next step S83, the encoder81-8retrieves a code corresponding to a value equal to the difference value WA2 calculated in step S82from a table shown in FIG.34and employs the retrieved code as the code of the gain control number GARi.

For example, in the case of the gain control number GAR1, the difference value WA2 thereof is equal to −1 and thus a 2-bit code of “10” is employed as the code for the gain control number GAR1.

In the table shown inFIG. 34, a 2-bit code “10” is assigned to a value −1, a 1-bit code “0” to a value 0, and a 3-bit code “110” to a value 1.

Furthermore, in the table shown inFIG. 34, a procedure of determining a code for a value other than the value of −1 to 1 is defined (more specifically, the code is given by a formula 111+original value). According to this procedure, a 6-bit code is given by a combination of a 3-bit code “111” and a following 3-bit code having a value equal to the gain control number GA (original value, the gain control number GAR in this specific case).

Referring again toFIG. 32, in step S84, the encoder81-8determines whether codes have been determined for all gain control numbers GAR0to GAR1, that is, whether all gain control numbers GAR0to GAR11have been encoded. If it is determined that all gain control numbers GARi have not been encoded, the process returns to step S81to perform the step S81and following steps to encode a next unencoded gain control number GARi.

If it is determined in step S84that all gain control numbers GAR0to GAR11have been encoded, the process proceeds to step S85. In step S85, the encoder81-8outputs the codes determined in step S83for the respective gain control number GAR0to GAR11to the terminal connected to the switch83.

In the next step S86, the encoder81-8calculates the sum of the numbers of bits of the encoded gain control numbers GAR0to GAR11and outputs the calculated sum to the decision unit82.

For example, the gain control numbers GAR shown inFIG. 33are encoded into codes with numbers of bits such as those shown inFIG. 33, and thus the total number of bits of the codes becomes equal to 17. Thus, a signal indicating that the total number of bits is equal to 17 is supplied to the decision unit82.

If the conventional fixed-length (3-bit) encoding method were employed, the gain control numbers GAR in the example shown inFIG. 33would be encoded into codes with a total of 36 (=3×12) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 19 than that according to the conventional technique.

Although in the encoding table (FIG. 34) used in the present example, escape codes are used for some values, specific codes including no escape codes may be assigned to all respective values.

In the present example, the difference value WA2 is assumed to have such a characteristic shown in FIG.31. In a case in which the characteristic of the difference value WA2 varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the difference value WA2.

In addition to above-described various methods employed by the gain control number encoder71to encode the gain control number, there may be provided an additional encoder for encoding the gain control number into a code with a fixed bit length according to the conventional technique.

Now, the gain control amount information encoder72(FIG. 8) of the gain control information encoder61is described.FIG. 35shows an example of a construction of the gain control amount information encoder72.

The gain control information G0to G11output from the spectrum converters12-1to12-4are input to each of 12 encoders91-1to91-12.

The encoders91-1to91-12detect gain control amount information GB0to GB11from the respective input gain control information G0to G11and encode the detected gain control amount information GB0to GB11by means of predetermined encoding methods. Resultant encoded data are output to terminals connected to switch93.

Each of the encoders91-1to91-12calculates the sum of the numbers of bits of the encoded gain control numbers GB0to GB11and outputs the calculated sum to the decision unit92.

The decision unit92detects, among encoders91-1to91-12, an encoder91which has output a smallest sum, that is, the decision unit92detects an encoder91which has encoded the gain control numbers GB0to GB11into a smallest total number of bits, and the decision unit92controls the switch93so that the encoded gain control numbers GB0to GB11encoded by the detected encoder91are output to the multiplexer16. The decision unit92outputs information indicating the encoding method employed by the detected encoder91to the multiplexer16. The decision unit92stores information indicating the encoding methods employed by the respective encoders91.

The encoding methods employed by the respective encoders91-1to91-12are described.

First, the encoding method employed by the encoder91-1is described.

In the present example, gain control amount information GB in gain control information G has a 4-bit value serving as an index indicating a gain control amount, and the value of the gain control amount information GB has a high probability of becoming equal to a particular value (such as 3, 5, 6, or 7) as shown in FIG.36. In view of the above, the encoder91-1encodes gain control amount information GB such that codes with small numbers of bits are assigned to values having high probabilities of occurring as gain control amount information GB.

The operation of the encoder91-1is described below with reference to a flow chart shown in FIG.37.

In step S101, the encoder91-1detects gain control amount information GBi (i=0, 1, 2, . . . , 11) of one frequency band from the input gain control information G0to G11.

In the next step S102, the encoder91-1determines a code to be assigned to the gain control number GBi. More specifically, the encoder91-1retrieves a code corresponding to the gain control amount information GBi from a table shown in FIG.38and employs the retrieved code as the code of the gain control amount information GBi.

For example, in the case of gain control amount information GB2of gain control amount information GB0to GB11shown inFIG. 39, the gain control amount information GB2has a value of 7, and thus a 3-bit code “101” is employed as the code of the gain control amount information GB2.

In the table shown inFIG. 38, a 3-bit code “110” is assigned to a value 3, a 1-bit code “0” to a value 5, a 3-bit code “100” to a value 6, and a 3-bit code “101” to a value 7. Thus, if the encoder91-1detects gain control amount information GBi having a value 3, 5, 6, or 7, encoder91-1selects “110”, “10”, “100”, or “101” corresponding to the value of the gain control amount information GBi and employs it as the code of the gain control amount information GBi.

Furthermore, in the table shown inFIG. 38, a procedure of determining a code for a value other than 3, 5, 6, and 7 is defined (more specifically, the code is given by a formula 111+original value). According to this procedure, a 7-bit code is given by a combination of a 3-bit code “111” (escape code) and a following 4-bit code indicating the gain control amount information GBi (original value). That is, if the encoder91-1detects gain control amount information GBi having a value other than 3, 5, 6, and 7, the encoder91-1determines a 7-bit code via the above-described procedure and employs it as the code for the gain control amount information GBi.

In the next step S103, the encoder91-1determines whether codes have been determined for all gain control amount information GB0to GB11, that is, whether all gain control amount information GB0to GB11have been encoded. If it is determined that all pieces of gain control amount information GBi have not been encoded, the process returns to step S101to perform the step S101and following steps to encode next unencoded gain control amount information GBi.

If it is determined in step S103that all gain control amount information GB0to GB11have been encoded, the process proceeds to step S104. In step S104, the encoder91-1outputs the codes determined in step S102for the respective gain control amount information GB0to GB11to the terminal connected to the switch93.

In the next step S105, the encoder91-1calculates the sum of the numbers of bits of the encoded gain control numbers GB0to GB11and outputs the calculated sum to the decision unit92.

For example, the respective pieces of gain control amount information GB shown inFIG. 39are encoded into codes with numbers of bits such as those as shown inFIG. 39, and thus the total number of bits of the codes becomes equal to 25. Thus, a signal indicating that the total number of bits is equal to 25 is supplied to the decision unit92.

If the conventional fixed-length (4-bit) encoding method were employed, the gain control amount information GB in the example shown inFIG. 39would be encoded into codes with a total of 52 (=4×13) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 27 than that according to the conventional technique.

Although in the coding table (FIG. 38) used in the present example, escape codes are used for some values, specific codes including no escape code may be assigned to all respective values. In the present example, the gain control amount information GB is assumed to have such a characteristic shown in FIG.36. In the case in which the characteristic of the gain control amount information GB varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the gain control amount information GB.

In the case in which a waveform signal in a block includes one attack portion AT and one release portion RE, two pieces of gain control amount information GB having values corresponding to the level of a semi stationary portion SS and the level of the release portion RE, respectively, are produced. For the reason described above, there can be plural pieces of gain control amount information GBi in one frequency band (in the example shown inFIG. 39, there are two pieces of gain control amount information GB1(with values of 6 and 5, respectively)). Similarly, also in the case of gain control position information GC which will be described later, there can be plural pieces of gain control position information GC in one frequency band.

In the present description, when there are plural pieces of gain control amount information GBi, gain control amount information GBi indicating a gain control amount corresponding to the level of a part at an earlier position in a block is described first and gain control amount information GBi indicating a gain control amount corresponding to the level of a following part in the block is described at a location on the right side of the description of the preceding part (as for the gain control amount information GB1in the example shown inFIG. 39, a value of 6 is first described and 5 is described following 6). Hereinafter, of plural pieces of gain control amount information GBi, gain control amount information GBi described at the leftmost location (6 of gain control amount information GB1in the example shown inFIG. 39) will be referred to as first gain control amount information GBi, and pieces of gain control amount information GBi described one after another to the right following the first gain control amount information GBi will be referred to as second gain control amount information GBi, third gain control amount information GBi, and so on. As for gain control position information GC, plural pieces of gain control position information GC will be denoted in a similar manner.

The encoding method employed by the encoder91-2is described.

In the case in which there are plural pieces of gain control amount information GBi as with gain control amount information GB1shown inFIG. 39or gain control amount information GB (except for gain control amount information GB4) shown inFIG. 40, the difference value VB1 obtained by subtracting Nth gain control amount information GBi from (N+1)th gain control amount information GBi has a high probability of becoming equal to a particular value (for N=1, 2, . . . ) as shown in FIG.41.

In view of the above, the encoder91-2encodes the gain control amount information GB in such a manner that codes with small numbers of bits are assigned to difference values VB1 having high occurrence probabilities.

The operation of the encoder91-2is described below with reference to a flow chart shown in FIG.42.

In step S111, the encoder91-2detects gain control amount information GBi (i=0, 1, 2, . . . , 11) from the input gain control information G0to G11and calculates the difference value VB1 by subtracting Nth gain control amount information GBi of gain control amount information GBi from (N+1)th gain control amount information GBi.

Hereinafter, for simplicity, the difference value VB1 obtained by subtracting the Nth gain control amount information GBi from the (N+1)th gain control amount information GBi will be referred to simply as the difference value VB1 of the (N+1)th gain control amount information GBi.

For example, in the case of gain control amount information GB0in the example shown inFIG. 40, the difference value VB1 of second gain control amount information GB0(=5) is given by a value (=−2) obtained by subtracting first gain control amount information GB0) (=7) from the second gain control amount information GB0(=5), and the difference value VB1 of third gain control amount information GB0is given by a value (=−1) obtained by subtracting the second gain control amount information GB0) (=5) from the third gain control amount information GB0(=4).

Referring again toFIG. 42, the encoder91-2determines, in step S112, a code to be assigned to the gain control amount information GBi.

More specifically, the encoder91-2retrieves a code corresponding to the first gain control amount information GBi of the plural pieces of gain control amount information GBi from a table similar to that shown in FIG.38and employs the retrieved code as the code of the first gain control amount information GBi.

For example, in the example shown inFIG. 40, a 3-bit code “101 is employed as the code of first gain control amount information GB0(=7) of gain control amount information GB0.

The encoder91-2also retrieves a code corresponding to a value equal to the difference value VB1 from a table shown in FIG.43and employs the retrieved code as the code of the (N+1)th gain control amount information GBi corresponding to the difference value VB1.

For example, in the case of gain control amount information GB0in the example shown inFIG. 40, the difference value VB1 of second gain control amount information GB0(=5) is −2, and thus a 2-bit code “10” is employed as the code of the second gain control amount information GB0. As for third gain control amount information GB0(=4), the difference value VB1 thereof is −1, and thus a 1-bit code “0” is employed as the code thereof.

In the table shown inFIG. 43, a 5-bit code “11100” is assigned to a value −4, a 3-bit code “110” to a value −3, a 2-bit code “10” to a value −2, a 1-bit code “0” is assigned to a value −1, and a 5-bit code “111101” to a value 1.

Furthermore, in the table shown inFIG. 43, a procedure of determining a code for a value other than the values of −4 to 1 is defined (more specifically, the code is given by a formula 1111+original value). According to this procedure, an 8-bit code is given by a combination of a 4-bit code “1111” (escape code) and a following 4-bit code indicating the gain control amount information GBi (original value).

In step S113, the encoder91-2determines whether codes have been determined for all gain control amount information GB0to GB11, that is, whether all gain control amount information GB0to GB11have been encoded. If it is determined that all pieces of gain control amount information GBi have not been encoded, the process returns to step S111to perform the step S111and following steps to encode next unencoded gain control amount information GBi.

If it is determined in step S113that all gain control amount information GB0to GB11have been encoded, the process proceeds to step S114. In step S114, the encoder91-2outputs the codes determined in step S112for the respective gain control amount information GB0to GB11to the terminal connected to the switch93.

In the next step S115, the encoder91-2calculates the sum of the numbers of bits of the encoded gain control numbers GB0to GB11and outputs the calculated sum to the decision unit92.

For example, the respective 38 pieces of gain control amount information GB shown inFIG. 40are encoded into codes with numbers of bits such as those shown inFIG. 40, and thus the total number of bits of the codes becomes equal to 69. Thus, a signal indicating that the total number of bits is equal to 69 is supplied to the decision unit92.

If the conventional fixed-length (4-bit) encoding method were employed, the gain control amount information GB in the example shown inFIG. 40would be encoded into codes with a total of 152 (=4×38) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 83 than that according to the conventional technique.

Although in the coding tables (FIGS. 38 and 43) used in the present example, escape codes are used for some values, specific codes including no escape code may be assigned to all respective values.

In the present example, the difference value VB1 is assumed to have such a characteristic shown in FIG.41. In a case in which the characteristic of the difference value VB1 varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the difference value VB1.

The encoding method employed by the encoder91-3is described.

In most cases, the gain control amount information GBi of the encoding unit Ai and the gain control amount information GBi-1of the encoding unit Ai-1in a frequency band adjacent to that of the encoding unit Ai are equal or close to each other. Therefore, the absolute value of the difference value VB2 obtained by subtracting the gain control amount information GBi-1from the gain control amount information GBi has a high probability of becoming equal or nearly equal to 0, as shown in FIG.44.

In view of the above, the encoder91-3encodes the gain control amount information GB in such a manner that codes with small numbers of bits are assigned to difference values VB2 having high occurrence probabilities.

The operation of the encoder91-3is described below with reference to a flow chart shown in FIG.45.

In step S121, the encoder91-3detects gain control amount information GBi of one frequency band from the input gain control information G0to G11and determines the difference value VB2 by subtracting, from the gain control amount information GBi, the gain control amount information GBi-1of the encoding unit Ai-1which is in a lower frequency band adjacent to the frequency band of the encoding unit Ai and which was detected in previous execution of step S121.

Hereinafter, for simplicity, the difference value VB2 obtained by subtracting the gain control amount information GBi-1from the gain control amount information GBi will be referred to simply as the difference value VB2 of the gain control amount information GBi.

For example, when the gain control amount information GB0to GB11are given as shown inFIG. 46, the difference value VB2 of gain control amount information GB3is calculated as follows. That is, by subtracting the first gain control amount information GB2(=7) from the first gain control amount information GB3(=7), the difference value VB2 of the first gain control amount information GB3(=7) is calculated as 0. Similarly, by subtracting the second gain control amount information GB2(=6) from the second gain control amount information GB3(=6), the difference value VB2 of the second gain control amount information GB3(=6) is calculated as 0.

For the gain control amount information GB2, by subtracting the gain control amount information GB1(=5) from the first gain control amount information GB2(=7), the difference value VB2 of the first gain control amount information GB2is calculated as 2, and by subtracting 5 from the second gain control amount information GB2(=6), the difference value VB2 of the second gain control amount information GB2(=6) is calculated as i. For the gain control amount information GB1, by subtracting 5 from the gain control amount information GB1(=5), the difference value VB2 of the gain control amount information GB1(=5) is calculated as 0.

That is, in the case in which there is no gain control amount information GBi-1corresponding to gain control amount information GBi, the difference value VB2 of the gain control amount information GBi is determined by subtracting a value of GB which is highest in occurrence probability, that is, 5, as shown inFIG. 36, from the value of the gain control amount information GBi.

Referring again toFIG. 45, in step S122, the encoder91-3retrieves a code corresponding to a value equal to the difference value VB2 calculated in step S121from a table shown in FIG.47and employs the retrieved code as the code of the gain control amount information GBi.

For example, in the case of gain control amount information GB2in the example shown inFIG. 46, the difference value VB2 of the first gain control amount information GB2(=7) is 2, and thus a 4-bit code “11110” is employed as the code for the gain control amount information GB2. Similarly, a 3-bit code “100” is employed for the second gain control amount information GB2(=6) because the difference value VB2 of the second gain control amount information GB2(=6) is 1.

In the table shown inFIG. 47, a 5-bit code “11110” is assigned to a value −3, a 3-bit code “110” to a value −2, a 3-bit code “101” to a value −1, a 1-bit code “0” to a value 0, a 3-bit code “100” to a value 1, and a 4-bit code “1110” to a value 2.

Furthermore, in the table shown inFIG. 47, a procedure of determining a code for a value other than the values of −3 to 2 is defined (more specifically, the code is given by a formula 11111+original value). According to this procedure, a 9-bit code is given by a combination of a 5-bit code “11111” and a following 4-bit code indicating the gain control amount information GB (original value).

In the next step S123, the encoder91-3determines whether codes have been determined for all gain control amount information GB0to GB11, that is, whether all gain control amount information GB0to GB11have been encoded. If it is determined that all pieces of gain control amount information GBi have not been encoded, the process returns to step S121to perform the step S121and following steps to encode next unencoded gain control amount information GBi.

If it is determined in step S123that all gain control amount information GB0to GB11have been encoded, the process proceeds to step S124. In step S124, the encoder91-4outputs the codes determined in step S122for the respective gain control amount information GB0to GB11to the terminal connected to the switch93.

In the next step S125, the encoder91-3calculates the sum of the numbers of bits of the encoded gain control numbers GB0to GB11and outputs the calculated sum to the decision unit92.

For example, the respective 17 pieces of gain control amount information GB shown inFIG. 46are encoded into bit-codes as shown inFIG. 46, and thus the total number of bits of the codes becomes equal to 35. Thus, a signal indicating that the total number of bits is equal to 35 is supplied to the decision unit92.

If the conventional fixed-length (4-bit) encoding method were employed, the gain control amount information GB in the example shown inFIG. 46would be encoded into codes with a total of 68 (=4×17) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 33 than that according to the conventional technique.

Although in the coding table (FIG. 47) used in the present example, escape codes are used for some values, specific codes including no escape code may be assigned to all respective values.

In the present example, the difference value VB2 of the gain control amount information GB is assumed to have such a characteristic shown in FIG.44. In a case in which the characteristic of the difference value VB2 varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the difference value VB2.

The encoding method employed by the encoder91-4is described.

As described earlier with reference toFIG. 41, the difference value VB1 obtained by subtracting the Nth gain control amount information GBi from the (N+1)th gain control amount information GBi has a high probability of becoming equal to a particular value.

Furthermore, as described earlier with reference toFIG. 44, the difference value VB2 obtained by subtracting gain control amount information GBi-1from gain control amount information GBi also has a high probability of becoming equal to a particular value.

Therefore, for example, the difference value VB3 obtained by subtracting the difference value VB1 of the Nth gain control amount information GBi from the difference value VB1 of the Nth gain control amount information GBi-i has a high probability of becoming equal to a particular value (0 or a value whose absolute value is close to 0) as shown in FIG.48.

In view of the above, the encoder91-4encodes the gain control amount information GB in such a manner that codes with small numbers of bits are assigned to difference values VB3 having high occurrence probabilities.

The operation of the encoder91-4is described below with reference to a flow chart shown in FIG.49.

In step S131, the encoder91-4detects gain control amount information GBi of one frequency band from the input gain control information G0to G11and calculates the difference value VB1 (the difference value B1of the (N+1)th gain control amount information GBi) by subtracting the Nth gain control amount information GBi from the (N+1)th gain control amount information GBi.

For example, for gain control amount information GB1of gain control amount information GB0to GB11shown inFIG. 50, the difference value VB1 of the second gain control amount information GB1(=4) is calculated as −1 by subtracting the first gain control amount information GB1(=5) from the second gain control amount information GB1(=4), and the difference value VB1 of the third gain control amount information GB1(=3) is calculated as −1 by subtracting the second gain control amount information GB1(=4) from the third gain control amount information GB1(=3).

In a similar manner, the difference value VB1 of the gain control amount information GBi following the second gain control amount information GBi (that is, the (N+1)th gain control amount information GBi) can be determined. For the first gain control amount information GBi, the difference value VB1 thereof is determined by subtracting the first gain control amount information GBi-1detected in previous execution of step S131from the first gain control amount information GBi.

In the specific example shown inFIG. 50, the difference value VB1 of the first gain control amount information GB1of the gain control amount information GB1is calculated as 0 by subtracting the first gain control amount information GB0(=5) from the first gain control amount information GB1(=5).

Of the gain control amount information GBi, the difference value VB1 of the first gain control amount information GB0of the gain control amount information GB0is given by subtracting a value of GB which is highest in occurrence probability, that is, 5 in this specific example (FIG.36), from the value of the first gain control amount information GB0. More specifically, in the example shown inFIG. 50, the difference value VB1 of the first gain control amount information GB0(=5) of the gain control amount information GB0is calculated as 0 (=5−5).

In the next step S132, the encoder91-4determines the difference value VB3 by subtracting the difference value VB1 of the gain control amount information GBi-1determined in the previous execution of step S131from the difference value VB1 of the gain control amount information GBi determined in step S131.

Hereinafter, for simplicity, the difference value VB3 obtained by subtracting the difference value VB1 of the gain control amount information GBi-1from the difference value VB1 of the gain control amount information GBi will be referred to simply as the difference value VB3 of the gain control amount information GBi.

The difference value VB3 of the first gain control amount information GB is given by the same value as that of the difference value VB1 of the first gain control amount information GB.

For example, as for gain control amount information GB2in the example shown inFIG. 50, the difference value VB1 of the first gain control amount information GB2(=7) is given as 2, and the same value is given as the difference value VB3 of the first gain control amount information GB2(=7), and the value (=−1) obtained by subtracting the second difference value VB1 (=−1) of the second gain control amount information GB1(=4) from the difference value (=−2) of the second gain control amount information GB2(=5) is given as the difference value VB3 of the gain control amount information GB2(=5). Furthermore, the value (=0) obtained by subtracting the difference value VB1 (=−1) of the third gain control amount information GB1(=3) from the difference value VB1 (=−1) of the third gain control amount information GB2(=4) is given as the difference value VB3 of the third gain control amount information GB2(=4).

In this specific example, the difference value VB3 of the gain control amount information GB0becomes equal to the difference value VB1. That is, as for the gain control amount information GB0in the example shown inFIG. 50, difference values VB3 are 5, −1, and −2.

In the next step S133, the encoder91-4retrieves a code corresponding to a value equal to the difference value VB3 calculated in step S132from a table shown in FIG.51and employs the retrieved code as the code of the gain control amount information GBi.

In the table shown inFIG. 51, a 5-bit code “11110” is assigned to a value −3, a 3-bit code “110” to a value −2, a 1-bit code “0” to a value −1, a 2-bit code “10” to a value 0, and a 4-bit code “1110” to a value 1.

Furthermore, in the table shown inFIG. 51, a procedure of determining a code for a value other than the values of −3 to 1 is defined (more specifically, the code is given by a formula 11111+original value). According to this procedure, a 9-bit code is given by a combination of a 5-bit code “11111” and a following 4-bit code indicating the gain control amount information GB (original value).

In the next step S134, the encoder91-4determines whether codes have been determined for all gain control amount information GB0to GB11, that is, whether all gain control amount information GB0to GB11have been encoded. If it is determined that all pieces of gain control amount information GBi have not been encoded, the process returns to step S131to perform the step S131and following steps to encode next unencoded gain control amount information GBi.

If it is determined in step S134that all gain control amount information GB0to GB11have been encoded, the process proceeds to step S135. In step S135, the encoder91-4outputs the codes determined in step S133for the respective gain control amount information GB0to GB11to the terminal connected to the switch93.

In the next step S316, the encoder91-4calculates the sum of the numbers of bits of the encoded gain control numbers GB0to GB11and outputs the calculated sum to the decision unit92.

For example, as for 36 pieces of gain control amount information GB shown inFIG. 50, codes with numbers of bits as shown inFIG. 50are generated as a result of encoding and thus a signal indicating that the total number of bits of the codes is 91 is output to the decision unit92.

If the conventional fixed-length (4-bit) encoding method were employed, the gain control amount information GB in the example shown inFIG. 50would be encoded into codes with a total of 144 (=4×36) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 53 than that according to the conventional technique.

The encoding method employed by the encoder91-5is described.

In gain control amount information GBi-1and gain control amount information GBi, in some cases, there are an equal number of pieces of gain control amount information GB, and, besides, Nth gain control amount information GBi and corresponding Nth gain control amount information GBi-1are equal in value to each other, as is the case, for example, with gain control amount information GB0and gain control amount information GB1shown in FIG.52.

In view of the above, the encoder91-5encodes the gain control amount information GB in such a manner that when, in gain control amount information GBi-1and gain control amount information GBi, there are an equal number of pieces of gain control amount information GB and Nth gain control amount information GBi-1and corresponding Nth gain control amount information GBi are equal to each other, only a flag (encoding flag) set to a value (0, in this specific example) indicating the above fact is encoded.

The operation of the encoder91-5is described below with reference to a flow chart shown in FIG.53.

In step S141, the encoder91-5detects gain control amount information GBi of one frequency band from the input gain control information G0to G11. The encoder91-5determines whether there are an equal number of pieces of gain control amount information GB in both that gain control amount information GBi and gain control amount information GBi-1detected in previous execution of step S141, and besides Nth gain control amount information GBi and corresponding Nth gain control amount information GBi-1are equal in value to each other. If it is determined that there are an equal number of pieces of gain control amount information GB, and Nth gain control amount information GBi and corresponding Nth gain control amount information GBi-1are equal in value to each other, the process proceeds to step S142. In step S142, the encoding flag associated with the gain control amount information GBi is set to a value (0, in this specific example) so as to indicate the above fact.

For example, in gain control amount information GB1and gain control amount information GB0in the example shown inFIG. 52, there are equally three pieces of gain control amount information GB and first, second, and third gain control amount information GB1(=7, 5, and 4) are equal in value to first, second, and third gain control amount information GB0(=7, 5, and 4), respectively, and thus the encoding flag associated with the gain control amount information GB1is set to 0.

In the case in which it is determined in step S141that the number of pieces of gain control amount information GB in gain control amount information GBi is not equal to that in gain control amount information GBi-1, or Nth gain control amount information GBi is not equal in value to corresponding Nth gain control amount information GBi-1, the process jumps to step S143. In step S143, the encoder91-5sets the encoding flag associated with the gain control amount information GBi to a value (1, in this case) so as to indicate the above fact.

For example, as for gain control amount information GB2and gain control amount information GB1in the example shown inFIG. 52, the number of pieces of gain control amount information GB is different between them, and thus the encoding flag associated with the gain control amount information GB2is set to 1.

In the next step S144, the encoder91-5encodes the gain control amount information GBi in a similar manner as with, for example, the encoder91-2.

More specifically, the encoder91-5retrieves a code corresponding to the first gain control amount information GBi from a table similar to that shown in FIG.38and employs the retrieved code as the code of the first gain control amount information GBi.

Furthermore, the encoder91-5calculates the difference value VB1 of the (N+1)th gain control amount information GBi by subtracting the Nth gain control amount information GBi from the (N+1)th gain control amount information GBi, and the encoder91-5then retrieves a code corresponding to the calculated difference value VB1 from the table shown in FIG.43and employs the retrieved code as the code for the (N+1)th gain control amount information GBi.

For example, as for gain control amount information GB2in the example shown inFIG. 52, a 3-bit code “101” is employed as the code of first gain control amount information GB2(=7), and, because the difference value VB1 of second gain control amount information GB2(=6) is −1, a 1-bit code “0” is employed as the code of the second gain control amount information GB2.

In this specific example, there is no encoding flag associated with gain control amount information GB0, and the code of the gain control amount information GB0is determined in step S144as with gain control amount information GB corresponding to an encoding flag set to 1.

In the case in which an encoding flag has been set to 0 in step S142or in the case in which gain control amount information GBi has been encoded in step S144, the process proceeds to step S145. In step S145, the encoder91-5determines whether all encoding flags associated with respective gain control amount information GB0to GB11have been set to 0 or 1 and codes have been determined for all pieces of gain control amount information GBi corresponding to encoding flags set to 1, that is, the encoder91-5determines whether gain control amount information GB0to GB11have all been encoded. If it is determined that all pieces of gain control amount information GBi have not been encoded, the process returns to step S141to perform the step S141and following steps to encode next unencoded gain control amount information GBi.

If it is determined in step S145that all gain control amount information GB0to GB11have been encoded, the process proceeds to step S146. In step S146, the encoder91-5outputs the encoding flag set to 0 or 1 and the codes to the terminal connected to the switch93.

In the next step S147, the encoder91-5calculates the sum of the numbers of bits of the encoded gain control numbers GB0to GB11and outputs the calculated sum to the decision unit92.

For example, as for 36 pieces of gain control amount information GB shown inFIG. 52, 11 1-bit encoding flags and codes with numbers of bits as shown inFIG. 52are generated as a result of encoding and thus a signal indicating that the total number of bits is equal to 38 (=11+27) is supplied to the decision unit92.

If the conventional fixed-length (4-bit) encoding method were employed, the gain control amount information GB in the example shown inFIG. 52would be encoded into codes with a total of 144 (=4×36) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 106 than that according to the conventional technique.

Although in the example described above, when there is a difference in the number of gain control amount information GB between gain control amount information GBi and gain control amount information GBi-1, or when there is a difference in value between Nth gain control amount information GBi and corresponding Nth gain control amount information GBi-1, encoding of gain control amount information GBi is performed in a similar manner as with the encoder91-2, the encoding may be performed according to another method.

The encoding method employed by the encoder91-6is described.

In most cases, a plurality of values of gain control amount information GBi are close to each other as in the case of gain control amount information GB7of gain control amount information GB0to GB11shown in FIG.54. Therefore, values obtained by subtracting a minimum value of the values of gain control amount information GBi from respective values of gain control amount information GBi become small enough to represent with a small number of bits.

In view of the above, the encoder91-6encodes gain control amount information GB such that the value obtained by subtracting the minimum value of gain control amount information GBi from Nth gain control amount information GBi is expressed using a particular number of bits and the resultant expression is assigned as the code of the Nth gain control amount information GBi.

The operation of the encoder91-6is described below with reference to a flow chart shown in FIG.55.

In step S151, the encoder91-6detects gain control amount information GBi of one frequency band from the input gain control information G0to G11.

In the next step S152, the encoder91-6determines a code to be assigned to the gain control amount information GBi. The details of the process in step S152are shown in the form of a flow chart in FIG.56.

In step S161, the encoder91-6detects maximum and minimum values of the gain control amount information GBi.

In the example shown inFIG. 54, 9 is detected as the maximum value and 6 is detected as the minimum value.

In step S162, the encoder91-6calculates the difference between the maximum and minimum values detected in step S161and determines the number of bits which can represent the difference.

In the example shown inFIG. 54, the difference between the maximum value (9) and the minimum value (6) is equal to 3, and thus the number of bits which can represent the difference is 2.

In step S163, the encoder91-6subtracts the minimum value detected in step S161from respective values of gain control amount information GBi and represents the resultant difference values using as many bits as the necessary number of bits determined in sep S162. The resultant values are employed as codes for the respective pieces of gain control amount information GBi. Because the necessary number of bits is defined as the number of bits which can represent the difference between the maximum value and the minimum value, the value obtained by subtracting the minimum value from any gain control amount information GBi can be represented using as many bits as the necessary number of bits.

In the example shown inFIG. 54, subtracting 6 from first gain control amount information GB7(=9), second gain control amount information GB7(=7), third gain control amount information GB7(=6), and fourth gain control amount information GC7(=9) yields 3, 1, 0, and 3, respectively, and 2-bit expressions of these values are employed as the codes of first to fourth gain control amount information GB7.

Thereafter, the process proceeds to step S153shown in FIG.55.

In step S153, the encoder91-6determines whether codes have been determined for all gain control amount information GB0to GB11, that is, whether all gain control amount information GB0to GB11have been encoded. If it is determined that all pieces of gain control amount information GBi have not been encoded, the process returns to step S151to perform the step S151and following steps to encode next unencoded gain control amount information GBi.

If it is determined in step S153that all gain control amount information GB0to GB11have been encoded, the process proceeds to step S154. In step S154, the data indicating the minimum value detected in step S161, the data indicating the necessary number of bits calculated in step S162, and the codes, determined in step S163, of gain control amount information GB0to GB11represented by as many bits as the necessary number of bits are output from the encoder91-6to the terminal connected to the switch93.

In the next step S155, the encoder91-6calculates the sum of the numbers of bits of the encoded gain control numbers GB0to GB11and outputs the calculated sum to the decision unit92.

For example, as for gain control amount information GB7shown inFIG. 54, 2-bit data indicating a necessary number of bits, 4-bit data indicating a minimum value, and 4 2-bit codes (represented by as many bits as the necessary number of bits are generated as the result of the encoding of the gain control amount information GB7, and thus a signal indicating that the total number of bits is equal to 14 (=2+4+2×4) is supplied to the decision unit92.

If the conventional fixed-length (4-bit) encoding method were employed, the gain control amount information GB in the example shown inFIG. 54would be encoded into codes with a total of 16 (=4×4) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 2 than that according to the conventional technique.

The encoding method employed by the encoder91-7is described.

In most cases, because gain control amount information GB0to GB11are close in value to each other as in the case with gain control amount information GB0to GB11shown inFIG. 57, subtracting the minimum value (5, in the example shown inFIG. 57) of the gain control amount information GB0to GB11from the respective values of gain control amount information GBi results in small values which can be represented using a small number of bits.

In view of the above, the encoder91-7encodes gain control amount information GB in such a manner that the minimum value of the gain control amount information GB0to GB11is subtracted from each piece of gain control amount information GBi and an expression of the resultant difference using a particular number of bits is employed as the code of the gain control amount information GBi.

The operation of the encoder91-7is described below with reference to a flow chart shown in FIG.58.

In step S171, the encoder91-7extracts gain control amount information GB0to GB11from the input gain control information G0to G11and detects maximum and minimum values of the extracted gain control amount information GB0to GB11.

In the example shown inFIG. 57, the maximum value of gain control amount information GB0to GB11is detected as 8 and the minimum value as 5.

In step S172, the encoder91-7calculates the difference between the maximum and minimum values detected in step S171and determines the number of bits which can represent the difference.

In the example shown inFIG. 57, the difference between the maximum value (8) and the minimum value (5) is equal to 3, and thus the number of bits which can represent the difference is 2.

In step S173, the encoder91-7subtracts the minimum value detected in step S171from the respective values of gain control amount information GB0to GB11and represents the resultant difference values using as many bits as the necessary number of bits determined in sep S172. The resultant values are employed as codes for the respective pieces of gain control amount information GB. Because the necessary number of bits is defined as the number of bits which can represent the difference between the maximum value and the minimum value, the value obtained by subtracting the minimum value from any gain control amount information GB can be represented using as many bits as the necessary number of bits.

In step S174, the data indicating the minimum value detected in step S171, the data indicating the necessary number of bits calculated in step S172, and the codes, determined in step S173, of gain control amount information GB represented by as many bits as the necessary number of bits are output from the encoder91-7to the terminal connected the switch93.

In the example shown inFIG. 57, 4-bit data indicating a minimum value (=5), 2-bit data indicating a necessary number of bits (2 bits), and 26 2-bit codes (represented by as many bits as the necessary number of bits) are output to the switch93as shown in FIG.59.

In the next step S175, the encoder91-7calculates the sum of the numbers of bits of the encoded gain control numbers GB0to GB11and outputs the calculated sum to the decision unit92.

For example, in the case of gain control amount information GB shown inFIG. 57, 2-bit data indicating the necessary number of bits, 4-bit data indicating the minimum value, and 26 codes each represented by 2 bits (=necessary number of bits) are produced as the result of the encoding of the gain control amount information GB and thus a signal indicating that the total number of bits is 58 (=2+4+2×26) is output to the decision unit92.

If the conventional fixed-length (4-bit) encoding method were employed, the gain control amount information GB in the example shown inFIG. 57would be encoded into codes with a total of 104 (=4×26) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 46 than that according to the conventional technique.

The encoding method employed by the encoder91-8is described.

In most cases, in the stereo audio signal, the gain control amount information GBLi of the left-channel signal and the gain control amount information GBRi of the right-channel signal in the same frequency band are equal or close to each other. Therefore, the absolute value of the difference value WB1 obtained by subtracting the gain control amount information GBLi from the gain control amount information GBRi has a high probability of becoming equal or nearly equal to 0, as shown in FIG.60.

In view of the above, the encoder91-8encodes gain control amount information GB such that only either gain control amount information GBL0to GAL11or gain control amount information GBR0to GBR11are encoded, and codes with small numbers of bits are assigned to difference values WB1 having high occurrence probabilities. That is, one of the gain control amount information GBL and the gain control amount information GBR is encoded by means of the above method, and the other is encoded by means of, for example, the conventional encoding method.

The operation of the encoder91-8is described below with reference to a flow chart shown in FIG.61. Herein, it is assumed that the encoder91-8encodes gain control amount information GBR.

In step S181, the encoder91-8detects gain control amount information GBLi in one frequency band from gain control information GL0to GL11of the input left-channel signal and also detects gain control amount information GBRi in the same frequency band from gain control information GR0to GR11of the input right-channel signal. The encoder91-8then calculates the difference value WB1 by subtracting the gain control amount information GBLi from the gain control amount information GBRi.

Hereinafter, for simplicity, the difference value WB1 obtained by subtracting the gain control amount information GBLi from the gain control amount information GBRi will be referred to simply as the difference value WB1 of the gain control amount information GBRi.

For example, in the case of gain control amount information GBL3of gain control amount information GBL0to GBL11or gain control amount information GBR3of gain control amount information GBR0to GBR11shown inFIG. 62, the difference value WB1 of first gain control amount information GBR3is given by a value (=−1) obtained by subtracting the first gain control amount information GBL3(=5) from the first gain control amount information GBR3(=4), and the difference value WB1 of second gain control amount information GBR3is given by a value (=0) obtained by subtracting the second gain control amount information GBL3(=2) from the second gain control amount information GBR3(=2).

In the next step S182, the encoder91-8retrieves a code corresponding to a value equal to the difference value WB1 calculated in step S181from a table shown in FIG.63and employs the retrieved code as the code for the gain control amount information GBRi.

For example, in the case of gain control amount information GBR3, the difference value WB1 of first gain control amount information GGR3(=4) is −1, and thus a 3 bit code “110” is employed as the code of the first gain control amount information GGR3, while the difference value WB1 of second gain control amount information GGR3(=2) is 0, and thus a 1-bit code “0” is employed as the code of the second gain control amount information GGR3.

In the table shown inFIG. 63, a 5-bit code “1110” is assigned to a value −2, a 3-bit code “110” to a value −1, a 1-bit code “0” to a value 0, a 2-bit code “10” to a value 1, and a 5-bit code “11110” to a value 2.

Furthermore, in the table shown inFIG. 63, a procedure of determining a code for a value other than the values of −2 to 2 is defined (more specifically, the code is given by a formula 11111+original value). According to this procedure, a 9-bit code is given by a combination of a 5-bit code “11111” and a following 4-bit code indicating the gain control amount information GB (original value, the gain control amount information GBR in this specific case).

In step S183, the encoder91-8determines whether codes have been determined for all gain control amount information GBR0to GBR11, that is, whether all gain control amount information GBR0to GBR11have been encoded. If it is determined that all pieces of gain control amount information GBR have not been encoded, the process returns to step S181to perform the step S181and following steps to encode next unencoded gain control amount information GBRi.

If it is determined in step S183that all gain control amount information GBR0to GBR11have been encoded, the process proceeds to step S184. In step S184, the encoder91-8outputs the codes determined in step S182for the respective gain control amount information GBR0to GBR11to the terminal connected to the switch93.

In step S185, the encoder91-8calculates the sum of the numbers of bits of the encoded gain control numbers GBR0to GBR11and outputs the calculated sum to the decision unit92.

For example, in the case of 16 pieces of gain control amount information GBR shown inFIG. 62, codes with numbers of bits such as those shown inFIG. 62are generated as the result of encoding, and thus a signal indicating that the total number of bits is equal to 21 is output to the decision unit92.

If the conventional fixed-length (4-bit) encoding method were employed, the gain control amount information GBR in the example shown inFIG. 62would be encoded into codes with a total of 64 (=4×16) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 43 than that according to the conventional technique.

Although in the coding table (FIG. 63) used in the present example, escape codes are used for some values, specific codes including no escape code may be assigned to all respective values.

In the present example, the difference value WB1 of the gain control amount information GBL and that of the gain control amount information GBR are assumed to have such a characteristic shown in FIG.60. In a case in which the characteristic of the difference value WB1 varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the difference value WB1.

The encoding method employed by the encoder91-9is described.

In many cases, in gain control amount information GBLi of a left-channel signal and gain control amount information GBRi of a right-channel signal in the same frequency band of a stereo audio signal, there are an equal number of pieces of gain control amount information GB and, besides, Nth gain control amount information GBLi and corresponding Nth gain control amount information GBRi are equal to each other, as is the case with gain control amount information GBL1and gain control amount information GBR1of gain control amount information GBL0to GBL11and gain control amount information GBR0to GBR11shown in FIG.64.

In view of the above, the encoder91-9encodes either gain control amount information GBL0to GBL11or gain control amount information GBR0to GBR11into codes with a fixed bit length and encodes the other in such manner that when, in gain control amount information GBLi and gain control amount information GBRi, there are an equal number of pieces of gain control amount information GB and, besides, Nth gain control amount information GBLi and corresponding Nth gain control amount information GBRi are equal to each other, only a flag (encoding flag) set to a value (0, in this specific example) indicating the above fact is encoded.

In the case in which gain control amount information GBL is encoded into codes with a fixed bit length, coding of gain control amount information GBR is performed in a manner described below with reference to a flow chart shown in FIG.65.

In step S191, the encoder91-9detects gain control amount information GBLi in one frequency band from gain control information GL0to GL11of the input left-channel signal and also detects gain control amount information GBRi in the same frequency band from gain control information GR0to GR11of the input right-channel signal. The encoder91-9determines whether there are an equal number of pieces of gain control amount information GB in both gain control amount information GBLi and gain control amount information GBRi and Nth gain control amount information GBLi and corresponding Nth gain control amount information GBRi are equal to each other. If it is determined that there are an equal number of pieces of gain control amount information GB, and Nth gain control amount information GBLi and corresponding Nth gain control amount information GBRi are equal to each other, the process proceeds to step S192. In step S192, the encoding flag associated with the gain control amount information GBRi is set to a value (0, in this specific example) so as to indicate the above fact.

For example, in the case of gain control amount information GBL1and gain control amount information GBR1in the example shown inFIG. 64, there are equally two pieces of gain control amount information GB, and first gain control amount information GBL1(=7) and second gain control amount information GBL1(=6) are equal to corresponding first gain control amount information GBR1(=7) and second gain control amount information GBR1(=6), and thus the encoding flag associated with GBR1is set to 0.

In a case in which it is determined in step S191that there is a difference in the number of gain control amount information GB between gain control amount information GBLi and gain control amount information GBRi, or there is a difference in value between Nth gain control amount information GBLi and corresponding Nth gain control amount information GBRi, the process jumps to step S193. In step S193, the encoder91-9sets the encoding flag associated with the gain control number GBRi to 1.

For example, in the case of gain control amount information GBL5and gain control amount information GBR5in the example shown inFIG. 64, there is a difference in value between (first) gain control amount information GBL5(=6) and (first) gain control amount information GBR5(=5), and thus, the encoding flag associated with the gain control amount information GBR5is set to 1.

In the next step S194, the encoder91-9encodes the gain control amount information GBRi in a similar manner as with, for example, the encoder91-8.

More specifically, the encoder91-9calculates the difference value WB1 by subtracting gain control amount information GBLi from the detected gain control amount information GBRi, and the encoder91-9retrieves a code corresponding to the calculated difference value WB1 from a table similar to that shown in FIG.63and employs the retrieved code as the code for the gain control amount information GBRi.

For example, in the case of gain control amount information GBR5in the example shown inFIG. 64, the difference value WB1 thereof is −1 (=gain control amount information GBR5(=5−gain control amount information GBL5(=6)), and thus a 3-bit code “101” is employed as the code of the gain control amount information GBR5.

In the case in which an encoding flag has been set to 0 in step S192or in the case in which gain control amount information GBRi has been encoded in step S194, the process proceeds to step S195. In step S195, the encoder91-9determines whether all encoding flags have been set to 0 or 1 and gain control amount information GBRi corresponding to an encoding flag set to 1 has been encoded, that is, the encoder91-9determines whether gain control amount information GBR0to GB11have all been encoded. If it is determined that all pieces of gain control amount information GBRi have not been encoded, the process returns to step S191to perform the step S191and following steps to encode next unencoded gain control amount information GBRi.

If it is determined in step S195that all gain control amount information GBR0to GBR11have been encoded, the process proceeds to step S196. In step S196, the encoder91-9outputs the encoding flag set to 0 or 1 and the codes to the terminal connected to the switch93.

In the next step S197, the encoder91-9calculates the sum of the numbers of bits of the encoded gain control numbers GBR0to GBR11and outputs the calculated sum to the decision unit92.

For example, in the case of 18 pieces of gain control amount information GBR shown inFIG. 64, 12 1-bit encoding flags and codes with number of bits such as those shown inFIG. 64are generated as a result of encoding of the 18 pieces of gain control amount information GBR, and thus a signal indicating that the total number of bits is equal to 20 (=12+8) is output to the decision unit92.

If the conventional fixed-length (4-bit) encoding method were employed, the gain control amount information GBR in the example shown inFIG. 64would be encoded into codes with a total of 72 (=4×18) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 52 than that according to the conventional technique.

Although in the example described above, when there is a difference in the number of gain control amount information GB between gain control amount information GBLi and gain control amount information GBRi, or when there is a difference in value between Nth gain control amount information GBLi and corresponding Nth gain control amount information GBRi, encoding of gain control amount information GBRi is performed in a similar manner as with the encoder91-8, the encoding may be performed according to another method.

The encoding method employed by the encoder91-10is described.

In some cases, in the stereo audio signal, as shown inFIG. 66, all gain control amount information GBL0to GBL11of the left-channel signal become equal to corresponding gain control amount information GBR0to GBR11of the right-channel signal.

In view of the above, the encoder91-10encodes either gain control amount information GBL0to GBL11or gain control amount information GBR0to GBR11into codes with a fixed bit length, but, when gain control amount information GBL0to GBL11are all equal to corresponding gain control amount information GBR0to GBR11, encoding is not performed for the other set of gain control amount information.

In the case in which gain control amount information GBL is encoded into codes with a fixed bit length, coding of gain control amount information GBR is performed in a manner described below with reference to a flow chart shown in FIG.67.

In step S201, the encoder91-10detects gain control amount information GBL0to GBL11and gain control amount information GBR0to GBR11from the input gain control information GL0to GL11of the left-channel signal and gain control information GR0to GR11of the right-channel signal, respectively. The encoder91-10then determines whether the gain control amount information GBL0to GBL11and the gain control amount information GBR0to GBR11are equal to each other between corresponding counterparts. If it is determined that they are all equal to each other as is the case in the example shown inFIG. 66, the process proceeds to step S202.

In step S202, the encoder91-10does not encode the gain control amount information GBR0to GBR11, but the encoder91-10outputs a value of 0 indicating the number of codes to the decision unit92.

In a case in which it is determined in step S201that the gain control amount information GBL0to GBL11and the gain control amount information GBR0to GBR11are not all equal to each other between corresponding counterparts, the process proceeds to step S203. In step S203, the encoder91-10encodes the gain control amount information GBR0to GBR11, for example, into codes with a fixed bit length (4 bits).

In the next step S204, the encoder91-10outputs the resultant codes of the respective gain control amount information GBR0to GBR11to the terminal connected to the switch93.

In step S205, the encoder91-10calculates the sum of the numbers of bits of the encoded gain control amount information GBR0to GBR11and outputs the calculated sum to the decision unit92.

In the example shown inFIG. 66, the total number of bits of the codes of the gain control amount information GBR is equal to 104 (=4×26). Thus, a signal indicating that the total number of bits is equal to 104 is supplied to the decision unit92.

If the conventional fixed-length (4-bit) encoding method were employed, the gain control amount information GBR in the example shown inFIG. 66would be encoded into codes with a total of 104 (=4×26) bits. Thus, when the gain control amount information GBR is not encoded, the total number of bits of encoded data according to the present invention is smaller by 104 than that according to the conventional technique.

The encoding method employed by the encoder91-11is described.

As described earlier with reference toFIG. 41, in plural pieces of gain control amount information GBi, the difference value VB1 obtained by subtracting the Nth gain control amount information GBi from the (N+1)th gain control amount information GBi has a high probability of becoming equal to a particular value.

Furthermore, in the case of stereo audio signals, as described earlier with reference toFIG. 60, the difference value WB1 obtained by subtracting gain control amount information GBLi from gain control amount information GBRi in the same frequency band has a high probability of becoming equal to a particular value.

Therefore, the difference value WB2 obtained by subtracting the difference value VB1 of the gain control amount information GBLi from the difference value VB1 of the gain control amount information GBRi has a high probability of becoming equal to a particular value (0 or a value whose absolute value is close to 0) as shown in FIG.68.

In view of the above, the encoder91-11encodes gain control amount information GB such that either gain control amount information GBL0to GAL11or gain control amount information GBR0to GBR11are encoded and codes with small numbers of bits are assigned to difference values WB2 having high occurrence probabilities.

The operation of the encoder91-11is described below with reference to a flow chart shown in FIG.69. Herein, it is assumed that the encoder91-11encodes gain control amount information GBR.

In step S211, the encoder91-11detects gain control amount information GBLi in one frequency band from gain control information GL0to GL11of the input left-channel signal and also detects gain control amount information GBRi in the same frequency band from gain control information GR0to GR11of the input right-channel signal.

Furthermore, the encoder91-11calculates the difference value VB1 of (N+1)th gain control amount information GBLi by subtracting Nth gain control amount information GBLi from the (N+1)th gain control amount information GBLi, and also calculates the difference value VB1 of (N+1)th gain control amount information GBRi by subtracting Nth gain control amount information GBRi from the (N+1)th gain control amount information GBRi.

The difference value VB1 of first gain control amount information GBLi is defined as being equal to the value of the first gain control amount information GBLi, and the difference value VB1 of first gain control amount information GBRi is defined as being equal to the value of the first gain control amount information GBRi.

For example, in the case of gain control amount information GBL3of gain control amount information GBL0to GBL11shown inFIG. 70, the difference value VB1 of first gain control amount information GBL3is given by the same value (=5, not shown) as that of the first gain control amount information GBL3(=5), and the difference value VB1 of second gain control amount information GBL3is given by a value (=−3) obtained by subtracting first gain control amount information GBL3(=5) from the second gain control amount information GBL3(=2).

Furthermore, in the case of gain control amount information GBR3of gain control amount information GBR0to GBR11, the difference value VB1 of first gain control amount information GBR3is given by the same value (=4, not shown) as that of the first gain control amount information GBR3(=4), and the difference value VB1 of second gain control amount information GBL3is given by a value (=−2) obtained by subtracting first gain control amount information GBR3(=4) from the second gain control amount information GBR3(=2).

In the next step S212, the encoder91-11determines the difference value WB2 by subtracting the difference value VB1 of the gain control amount information GBLi from the difference value VB1 of the gain control amount information GBRi.

Hereinafter, for simplicity, the difference value WB2 obtained by subtracting the difference value VB1 of the gain control amount information GBLi from the difference value VB1 of the gain control amount information GBRi will be referred to simply as the difference value WB2 of the gain control amount information GBRi.

For example, in the case of gain control amount information GBL3and gain control amount information GBR3in the example shown inFIG. 70, the difference value WB2 of first gain control amount information GBR3is given by a value (=−1) obtained by subtracting the difference value VB1 (=5) of first gain control amount information GBL3from the difference value VB1 (=4) of the first gain control amount information GBR3, and the difference value WB2 of second gain control amount information GBR3is given by a value (=1) obtained by subtracting the difference value VB1 (=−3) of second gain control amount information GBL3from the difference value VB1 (=−2) of the second gain control amount information GBR3.

In step S213, the encoder91-11retrieves a code corresponding to a value equal to the difference value VB2 of the gain control amount information GBRi from a table shown in FIG.71and employs the retrieved code as the code for the gain control amount information GBRi.

For example, in the case of gain control amount information GBR3in the example shown inFIG. 70, the difference value WB2 of first gain control amount information GBRL3(=4) is −1, and thus a 2-bit code “10” is employed as the code of the first gain control amount information GBRL3. On the other hand, a 3-bit code “111” is employed for the second gain control amount information GBR3(=2) because the difference value WB2 of the second gain control amount information GBR3is 1.

In the table shown inFIG. 71, a 4-bit code “1100” is assigned to a value −2, a 3-bit code “10” is assigned to a value −1, a 1-bit code “0” to a value 0, and a 3-bit code “110” to a value 1.

Furthermore, in the table shown inFIG. 71, a procedure of determining a code for a value other than the values of −2 to 1 is defined (more specifically, the code is given by a formula 1111+original value). According to this procedure, an 8-bit code is given by a combination of a 4-bit code “1111” (escape code) and a following 4-bit code indicating the gain control amount information GB (original value, the gain control amount information GBR in this specific case).

In the next step S214, the encoder91-11determines whether codes have been determined for all gain control amount information GBR0to GBR11, that is, whether all gain control amount information GBR0to GBR11have been encoded. If it is determined that all pieces of gain control amount information GBRi have not been encoded, the process returns to step S211to perform the step S211and following steps to encode next unencoded gain control amount information GBRi.

If it is determined in step S214that all gain control amount information GBR0to GBR11have been encoded, the process proceeds to step S215. In step S215, the encoder91-11outputs the codes determined in step S213for the respective gain control amount information GBR0to GBR11to the terminal connected to the switch93.

In step S216, the encoder91-11calculates the sum of the numbers of bits of the encoded gain control numbers GBR0to GBR11and outputs the calculated sum to the decision unit92.

For example, in the case of 29 pieces of gain control amount information shown inFIG. 70, codes with numbers of bits as shown inFIG. 70are generated as a result of encoding, and thus a signal indicating that the total number of bits is equal to 37 is output to the decision unit92.

If the conventional fixed-length (4-bit) encoding method were employed, the gain control amount information GBR in the example shown inFIG. 70would be encoded into codes with a total of 116 (=4×29) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 79 than that according to the conventional technique.

Although in the coding table (FIG. 71) used in the present example, escape codes are used for some values, specific codes including no escape code may be assigned to all respective values.

In the present example, the difference value WB2 is assumed to have such a characteristic shown in FIG.68. In a case in which the characteristic of the difference value WB2 varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the difference value WB2.

The encoding method employed by the encoder91-12is described.

As described earlier with reference toFIG. 44, the difference value VB2 obtained by subtracting gain control amount information GBi-1of a lower frequency band immediately adjacent to the frequency band of gain control amount information GBi from the gain control amount information GBi has a high probability of becoming equal to a particular value.

Furthermore, in the case of stereo audio signals, as described earlier with reference toFIG. 60, the difference value WB1 obtained by subtracting gain control amount information GBRi from gain control amount information GBLi in the same frequency band has a high probability of becoming equal to a particular value.

Therefore, for example, the difference value WB3 obtained by subtracting the difference value VB2 of the gain control amount information GBLi from the difference value VB2 of the gain control amount information GBRi has a high probability of becoming equal to a particular value (0 or a value whose absolute value is close to 0 s) as shown in FIG.72.

In view of the above, the encoder91-12encodes gain control amount information GB such that either gain control amount information GBL0to GBL11or gain control amount information GBR0to GBR11are encoded, and codes with small numbers of bits are assigned to difference values WB3 having high occurrence probabilities.

The operation of the encoder91-12is described below with reference to a flow chart shown in FIG.73. Herein, it is assumed that the encoder91-8encodes gain control amount information GBR.

In step S221, the encoder91-12detects gain control amount information GBLi in one frequency band from gain control information GL0to GL11of the input left-channel signal and also detects gain control amount information GBRi in the same frequency band from gain control information GR0to GR11of the input right-channel signal.

The encoder91-12determines the difference value VB2 of the gain control amount information GBLi by subtracting, from the gain control amount information GBLi, the gain control amount information GBLi-1of an encoding unit Ai-1which is in a lower frequency band adjacent to the frequency band of the encoding unit Ai and which was detected in previous execution of step S221.

The encoder91-12also determines the difference value VB2 of the gain control amount information GBRi by subtracting the gain control amount information GBRi-1, which was detected in previous execution of step S221, from the gain control amount information GBRi.

For example, in the case of gain control amount information GBL3of gain control amount information GBL0to GBL11shown inFIG. 74, the difference value VB2 of first gain control amount information GBL3(=5) is given by a value (=−1) obtained by subtracting first gain control amount information GBL2(=6) from the first gain control amount information GBL3(=5), and the difference value VB2 of second gain control amount information GBL3(=2) is given by a value (=−3, not shown) obtained by subtracting second gain control amount information GBL2(=5) from the second gain control amount information GBL3(=2).

Furthermore, in the case of gain control amount information GBR3of gain control amount information GBR0to GBR11shown inFIG. 74, the difference value VB2 of first gain control amount information GBR3(=4) is given by a value (=−2, not shown) obtained by subtracting first gain control amount information GBR2(=6) from the first gain control amount information GBR3(=4), and the difference value VB2 of second gain control amount information GBR3(=2) is given by a value (=−3, not shown) obtained by subtracting second gain control amount information GBR2(=5) from the second gain control amount information GBR3(=2).

In the next step S222, the encoder91-12determines the difference value WB3 by subtracting the difference value VB2 of the gain control amount information GBLi from the difference value VB2 of the gain control amount information GBRi.

Hereinafter, for simplicity, the difference value VB3 obtained by subtracting the difference value VB3 of the gain control amount information GBLi from the difference value VB2 of the gain control amount information GBRi will be referred to simply as the difference value WB3 of the gain control amount information GBRi.

For example, in the case of gain control amount information GBL3and gain control amount information GBR3in the example shown inFIG. 74, the difference value WB3 of first gain control amount information GBR3is given by a value (=1) obtained by subtracting the difference value VB2 (=−1) of first gain control amount information GB3from the difference value VB2 (=−2) of the first gain control amount information GBR3, and the difference value WB3 of second gain control amount information GBR3is given by a value (=0) obtained by subtracting the difference value VB3 (=−3) of second gain control amount information GBL3from the difference value VB2 (=−3) of the second gain control amount information GBR3.

In step S223, the encoder91-12retrieves a code corresponding to a value equal to the difference value WB3 calculated in step S222from a table shown in FIG.75and employs the retrieved code as the code for the gain control amount information GBRi.

For example, in the case of gain control amount information GBR3in the example shown inFIG. 74, the difference value WB3 of first gain control amount information GGR3(=4) is −1, and thus a 3-bit code “101” is employed as the code of the first gain control amount information GGR3, and a 1-bit code “0” is employed for second gain control amount information GGR3(=2) because the difference value WB3 of the second gain control amount information GGR3is 0.

In the table shown inFIG. 75, a 3-bit code “100” is assigned to a value −2, a 3-bit code “101” to a value −1, a 1-bit code “0” to a value 0, and a 3-bit code “110” to 1.

Furthermore, in the table shown inFIG. 75, a procedure of determining a code for a value other than the values of −2 to 1 is defined (more specifically, the code is given by a formula 111+original value). According to this procedure, a 7-bit code is given by a combination of a 3-bit code “111” and a following 4-bit code indicating the gain control amount information GB (original value, the gain control amount information GBR in this specific case).

In the next step S224, the encoder91-12determines whether codes have been determined for all gain control amount information GBR0to GBR11, that is, whether all gain control amount information GBR0to GBR11have been encoded. If it is determined that all pieces of gain control amount information GBRi have not been encoded, the process returns to step S221to perform the step S221and following steps to encode next unencoded gain control amount information GBRi.

If it is determined in step S224that all gain control amount information GBR0to GBR11have been encoded, the process proceeds to step S225. In step S225, the encoder91-12outputs the codes determined in step S223for the respective gain control amount information GBR0to GBR11to the terminal connected to the switch93.

In step S226, the encoder91-12calculates the sum of the numbers of bits of the encoded gain control numbers GBR0to GBR11and outputs the calculated sum to the decision unit92.

For example, in the case of 29 pieces of gain control amount information GBR shown inFIG. 74, codes with numbers of bits as shown inFIG. 74are generated as a result of encoding, and thus a signal indicating that the total number of bits is equal to 46 is output to the decision unit92.

If the conventional fixed-length (4-bit) encoding method were employed, the gain control amount information GBR in the example shown inFIG. 74would be encoded into codes with a total of 116 (=4×29) bits. Thus, in this example, the total number of bits of encoded data according to the present invention is smaller by 70 than that according to the conventional technique.

Although in the coding table (FIG. 75) used in the present example, escape codes are used for some values, specific codes including no escape code may be assigned to all respective values.

In the present example, the difference value WB2 is assumed to have such a characteristic shown in FIG.72. In a case in which the characteristic of the difference value WB3 varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the difference value WB3.

In addition to above-described various methods employed by the gain control amount information encoder72to encode the gain control amount information, there may be provided an additional encoder for encoding the gain control number into a code with a fixed bit length according to the conventional technique.

Now, the gain control position information encoder73(FIG. 8) of the gain control information encoder61is described.FIG. 76shows an example of a construction of the gain control position information encoder73.

Gain control information G0to G11output from the spectrum converters12-1to12-12are input to each of 12 encoders101-1to101-12.

The encoders101-1to101-12detect gain control position information GC0to GC11from the respective input gain control information G0to G11and encode the detected gain control position information GC0to GC11by means of predetermined encoding methods. Resultant encoded data are output to terminals connected to switch103. In the present example, gain control position information GC takes one of values from 0 to 31 serving as an index indicating a gain control position.

Each of the encoders101-1to101-12calculates the sum of the numbers of bits of the encoded gain control numbers GC0to GC11and outputs the calculated sum to the decision unit102.

The decision unit102detects, among encoders101-1to101-12, an encoder101which has output a smallest sum, that is, an encoder101which has encoded the gain control numbers GC0to GC11into a smallest total number of bits, and the decision unit102controls the switch103so that the encoded gain control numbers GC0to GC11encoded by the detected encoder101are output to the multiplexer16. The decision unit102outputs information indicating the encoding method employed by the detected encoder101to the multiplexer16. The decision unit102stores information indicating the encoding methods employed by the respective encoders101.

The encoding methods employed by the respective encoders101-1to101-12are described.

First, the encoding method employed by the encoder101-1is described below with reference to a flow chart shown in FIG.77.

In step S231, the encoder101-1detects gain control position information GCi (i=0, 1, 2, . . . , 11) from the input gain control information G0to G11.

In the next step S232, the encoder101-1determines a code to be assigned to first gain control position information GCi of the plural pieces of gain control position information GCi detected in step S231. More specifically, the encoder101-1expresses the first gain control position information GCi using 5 bits, and employs that 5-bit expression as the code of the first gain control position information GCi.

For example, in the case of gain control position information GC0of gain control position information GC0to GC11shown inFIG. 79, first gain control position information GC0(=9) is expressed using 5 bits and the resultant 5-bit expression is employed as the code of the first gain control position information GC0.

In step S233, the encoder101-1determines codes for second and following gain control position information GCi of the plural pieces of gain control position information GCi detected in step S231. The details of the process in step S233are shown in a flow chart of FIG.78.

Herein, we denote the second gain control position information GCi and following gain control position information GCi, to be encoded, by (N+1) th gain control position information GCi (where N=1, 2, . . . ). In step S241, the encoder101-1determines whether Nth gain control position information GCi is smaller than 15. In the case in which it is determined that the Nth gain control position information GCi is smaller than 15, that is, in the case in which the Nth gain control position information GCi has a value in the range from 0 to 14, the process proceeds to step S242. In step S242, the encoder101-1expresses the (N+1)th gain control position information GCi using 5 bits, and the resultant expression in 5 bits is employed as the code of the (N+1)th gain control position information GCi.

In the case in which it is determined in step S241that the Nth gain control position information GCi is not smaller than 15, that is, in the case in which the Nth gain control position information GCi has a value in the range from 15 to 31, the process proceeds to step S243. In step S243, the encoder101-1determines whether the Nth gain control position information GCi is equal to or greater than 15 but smaller than 23. If it is determined that the Nth gain control position information GCi is equal to or greater than 15 but smaller than 23, that is, in the case in which the Nth gain control position information GCi has a value in the range from 15 to 22, the process proceeds to step S244.

In step S244, the encoder101-1subtracts 16 from the (N+1)th gain control position information GCi and expresses the result using 4 bits. The resultant 4-bit expression is employed as the code of the (N+1)th gain control position information GCi.

When the Nth gain control position information GCi has a value in the range from 15 to 22, the (N+1)th gain control position information GCi must have a value in the range from 16 to 31. Therefore, if 16 is subtracted from the (N+1)th gain control position information GCi, the result becomes equal to or smaller than 15 and thus the resultant value can be expressed using 4 bits. Thus, the encoder101-1determines a 4-bit expression of the value obtained by subtracting 16 from the (N+1)th gain control position information GCi and employs the resultant 4-bit expression as the code of the (N+1)th gain control position information GCi.

In the case in which it is determined in step S243that the Nth gain control position information GCi is not within the range from 15 to 23 (boundary value 23 is not included in the range), that is, in the case in which the Nth gain control position information GCi has a value in the range from 23 to 31, the process proceeds to step S245. In step S245, the encoder101-1determines whether the Nth gain control position information GCi is equal to or greater than 23 but smaller than 27.

If it is determined in step S245that the Nth gain control position information GCi is equal to or greater than 23 but smaller than 27, that is, in the case in which the Nth gain control position information GCi has a value in the range from 23 to 26, the process proceeds to step S246. In step S246, the encoder101-1subtracts 24 from the (N+1)th gain control position information GCi and expresses the result using 3 bits. The resultant 3-bit expression is employed as the code of the (N+1)th gain control position information GCi.

When the Nth gain control position information GCi has a value in the range from 23 to 26, the (N+1)th gain control position information GCi must have a value in the range from 24 to 31. Therefore, if 24 is subtracted from the (N+1)th gain control position information GCi, the result becomes equal to or smaller than 7 and thus the resultant value can be expressed using 3 bits. Thus, the encoder101-1determines a 3-bit expression of the value obtained by subtracting 24 from the (N+1)th gain control position information GCi and employs the resultant 3-bit expression as the code of the (N+1)th gain control position information GCi.

For example, in the case of gain control position information GC3in the example shown inFIG. 79, first gain control position information GC3(=26) is within the range from 23 to 27 (boundary value 27 is not included in the range), and thus 3-bit data representing the value (=4) obtained by subtracting 24 from second gain control position information GC3(=28) is employed as the code of the second gain control position information GC3(=28).

If it is determined in step S245that the Nth gain control position information GCi is not within the range from 23 to 27 (boundary value 27 is not included in the range), that is, in the case in which the Nth gain control position information GCi has a value in the range from 27 to 31, the process proceeds to step S247. In step S247, the encoder101-1determines whether the Nth gain control position information GCi is equal to or greater than 27 but smaller than 29.

If it is determined in step S247that the Nth gain control position information GCi is equal to or greater than 27 but smaller than 29, that is, in the case in which the Nth gain control position information GCi is equal to 27 or 28, the process proceeds to step S248. In step S248, the encoder101-1subtracts 28 from the (N+1)th gain control position information GCi and expresses the result using 2 bits. The resultant 2-bit expression is employed as the code of the (N+1)th gain control position information GCi.

When the Nth gain control position information GCi has a value equal to 27 or 28, the (N+1)th gain control position information GCi must have a value in the range from 28 to 31. Therefore, if 28 is subtracted from the (N+1)th gain control position information GCi, the result becomes equal to or smaller than 3 and thus the resultant value can be expressed using 2 bits. Thus, the encoder101-1determines a 2-bit expression of the value obtained by subtracting 28 from the (N+1)th gain control position information GCi and employs the resultant 2-bit expression as the code of the (N+1)th gain control position information GCi.

For example, in the case of gain control position information GC7in the example shown inFIG. 79, second gain control position information GC7(=27) is within the range from 27 to 29 (boundary value 29 is not included in the range), and thus 2-bit data representing the value (=1) obtained by subtracting 28 from third gain control position information GC7(=29) is employed as the code of the third gain control position information GC7(=29). If it is determined in step S247that the Nth gain control position information GCi is not within the range from 27 to 29 (boundary value 29 is not included in the range), that is, in the case in which the Nth gain control position information GCi has a value in the range from 29 to 31, the process proceeds to step S249. In step S249, the encoder101-1determines whether the Nth gain control position information GCi is equal to 29.

If it is determined in step S249that the Nth gain control position information GCi is equal to 29, the process proceeds to step S250. In step S250, the encoder101-1subtracts 30 from the (N+1)th gain control position information GCi and expresses the result using 1 bit. The resultant 1-bit expression is employed as the code of the (N+1)th gain control position information GCi.

When the Nth gain control position information GCi has a value equal to 29, the (N+1)th gain control position information GCi must have a value equal to 30 or 31. Therefore, if 30 is subtracted from the (N+1)th gain control position information GCi, the result becomes equal to or smaller than 1 and thus the resultant value can be expressed using 1 bit. Thus, the encoder101-1determines a 1-bit expression of the value obtained by subtracting 30 from the (N+1)th gain control position information GCi and employs the resultant 1-bit expression as the code of the (N+1)th gain control position information GCi.

For example, in the case of gain control position information GC10in the example shown inFIG. 79, second gain control position information GC10has value equal to 29, and thus 1-bit data representing the value (=0) obtained by subtracting 30 from third gain control position information GC10(=30) is employed as the code of the third gain control position information GC3(=30).

If it is determined in step S249that the Nth gain control position information GCi is not equal to 29, that is, in the case in which the Nth gain control position information GCi has a value equal to 30 or 31, the process proceeds to step S251. In step S251, the encoder101-1encodes the (N+1)th gain control position information GCi into a 0-bit code. That is, in practice, encoding of the (N+1)th gain control position information GCi is not performed.

When the value of the Nth gain control position information GCi is equal to 30, the (N+1)th gain control position information must have a value equal to 31. Therefore, when the value of the Nth gain control position information GCi is detected to be equal to 30, it can be concluded that the (N+1)th gain control position information GCi has a value equal to 31. When the value of the Nth gain control position information GCi is equal to 31, there is no (N+1)th gain control position information GCi. Therefore, when the value of the Nth gain control position information GCi is equal to 30 or 31, the encoder101-1does not perform encoding on the (N+1)th gain control position information GCi.

If the (N+1)th gain control position information GCi has been encoded in step S242, step S244, step S246, step S248, step S250, or step S251, the process proceeds to step S252. In step S252, the encoder101-1determines whether encoding is completed for second gain control position information GCi and following all pieces of gain control position information GCi of the gain control position information GCi detected in step S231. If it is determined that there is one or more pieces of gain control position information GCi which have not yet been encoded, the process returns to step S241to perform the above-described process on next (N+1)th gain control position information GCi which has not yet been encoded.

On the other hand, if it is determined in step S252that encoding is completed for second gain control position information GCi and following all pieces of gain control position information GCi of the gain control position information GCi detected in step S231, the flow exits the present process and proceeds to step S234shown in FIG.77.

In step S234, the encoder101-1determines whether all gain control position information GC0to GC11have been encoded. If it is determined that all pieces of gain control position information GC have not been encoded, the process returns to step S231to perform the step S231and following steps to encode next unencoded gain control position information GCi.

If it is determined in step S234that all gain control position information GC0to GC11have been encoded, the process proceeds to step S235. In step S235, the encoder101-1outputs the codes determined in step S232or S233for the respective gain control position information GC0to GC11to the terminal connected to the switch103.

In the next step S236, the encoder101-1calculates the sum of the numbers of bits of the encoded gain control position information GC0to GC11and outputs the calculated sum to the decision unit102.

For example, in the case of 24 pieces of gain control position information GC shown inFIG. 79, codes with numbers of bits such as those shown inFIG. 79are produced as a result of the encoding, and thus a signal indicating that the total number of bits is equal to 90 is output to the decision unit102.

If the conventional fixed-length (5-bit) encoding method were employed, the gain control position information GC in the example shown inFIG. 79would be encoded into codes with a total of 120 (=5×24) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 30 than that according to the conventional technique.

The encoding method employed by the encoder101-2is described.

Gain control position information GC indicates the position of an attack portion AT or a release portion RE (more precisely, information corresponding to an index indicated by gain control position information GC indicates the position of an attack portion AT or a release portion RE). The gain control position information GC indicating the position of release portions RE has high probabilities of having particular values (1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, and 29) as represented by broken lines in FIG.80.

In view of the above, the encoder101-2encodes gain control position information GC (gain control position information GC indicating the position of a release portion RE, in the case of the example shown inFIG. 80) in such a manner that codes with small numbers of bits are assigned to values of gain control position information GC having high occurrence probabilities.

The operation of the encoder101-2is described below with reference to a flow chart shown in FIG.81. In step S261, the encoder101-2detects gain control position information GCi of one frequency band from the input gain control information G0to G11.

In the next step S262, the encoder101-2determines a code to be assigned to the gain control position information GCi. In a case in which there are plural pieces of gain control position information GCi, the encoder101-2determines a code for each of the plural pieces of gain control position information GCi (first gain control position information GCi, second gain control position information GCi, . . . ). The details of the process in step S262are shown in the form of a flow chart in FIG.82.

That is, in step S271, the encoder101-2determines whether the detected gain control position information GCi indicates the position of an attack portion AT or a release portion RE.

More specifically, the encoder101-2detects Nth gain control amount information GBi corresponding to an Nth gain control position information GCi to be encoded and also (N+1)th gain control amount information GBi from input gain control information G0to G11and calculates the difference value between the Nth gain control amount information GBi and (N+1)th gain control amount information GBi. If the calculated difference value is positive, the encoder101-2determines that the Nth gain control position information GCi indicates the position of an attack portion AT. However, if the calculated difference value is negative, the encoder101-2determines that the Nth gain control position information GCi indicates the position of a release portion RE.

For example, in the case of gain control position information GC1of gain control position information GC0to GC11shown inFIG. 84, first gain control position information GC1(=4) and second gain control position information GC1(=5) are detected as indicating the positions of attack portions AT (inFIG. 84, superscript “A” denotes that gain control position information GC indicates the position of an attack portion AT, and a similar notation is also used elsewhere), while third gain control position information GC1(=13) is detected as indicating the positions of a release portion RE (inFIG. 84, superscript “R” denotes that gain control position information GC indicates the position of a release portion RE, a similar notation is also used elsewhere).

In the next step S272, the encoder101-2determines a code to be assigned to the gain control position information GCi depending on whether the gain control position information GCi indicates the position of an attack portion AT or a release portion RE.

More specifically, if the encoder101-2determines that gain control position information GCi indicates the position of a release portion RE, the encoder101-2retrieves a code corresponding to a value equal to the value of that gain control position information GCi from the table shown in FIG.83and employs the retrieved code as the code of the gain control position information GCi.

For example, in the case of third gain control position information GC1(=13) of gain control position information GC1, the third gain control position information GC1indicates the position of a release portion RE and thus a 4-bit code “0110” assigned to a value of 13 in the table shown inFIG. 83is employed as the code of the third gain control position information GC1.

In the table shown inFIG. 83, 4-bit codes are assigned to respective values of 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, and 29, and a 5-bit code is assigned to a value of 31. That is, if the encoder101-2determines that Nth gain control position information GCi has a value equal to one of those values, the encoder101-2employs a code corresponding to the value as the code of the Nth gain control position information GCi.

Furthermore, in the table shown inFIG. 83, a procedure of determining a code for a value other than 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, and 31 is defined (more specifically, the code is given by a formula 11111+original value). According to this procedure, a 10-bit code is given by a combination of a 5-bit code “11111” (escape code) and a following 5-bit code indicating the Nth gain control position information GCi. That is, in the case in which the Nth gain control position information GCi has a value other than 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, and 31, the encoder101-2determines a 10-bit code via the above process and employs it as the code for the Nth gain control position information GCi.

On the other hand, if it is determined that the gain control position information GCi indicates the position of an attack portion AT, the encoder101-2expresses the gain control position information GCi using 5 bits and employs the resultant 5-bit expression as the code of the gain control position information GCi.

For example, in the case of gain control position information GC1in the example shown inFIG. 84, second gain control position information GC1(=5) indicates the position of an attack portion AT, and thus 5-bit data representing the second gain control position information GC1is employed as the code of the second gain control position information GC1.

If the code of the gain control position information GCi has been determined (in the case in which there are plural pieces of gain control position information GCi, codes are determined for respective plural pieces of gain control position information GCi), the process proceeds to step S263shown in FIG.81. In step S263, the encoder101-2determines whether codes have been determined for all gain control position information GC0to GC11, that is, whether all gain control position information GC0to GC11have been encoded. If it is determined that all pieces of gain control position information GCi have not been encoded, the process returns to step S261to perform the step S261and following steps to encode next unencoded gain control position information GCi.

If it is determined in step S263that all gain control position information GC0to GC11have been encoded, the process proceeds to step S264. In step S264, the encoder101-2outputs the codes determined in step S272inFIG. 82for the respective gain control position information GC0to GC11to the terminal connected to the switch103.

In the next step S265, the encoder101-2calculates the sum of the numbers of bits of the encoded gain control position information GC0to GC11and outputs the calculated sum to the decision unit102.

For example, in the case of 18 pieces of gain control position information GC shown inFIG. 84, codes with numbers of bits such as those shown inFIG. 84are generated as a result of encoding, and thus a signal indicating that the total number of bits is equal to 85 is output to the decision unit102.

If the conventional fixed-length (5-bit) encoding method were employed, the gain control position information GC in the example shown inFIG. 84would be encoded into codes with a total of 90 (=5×18) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 5 than that according to the conventional technique.

Although in the present embodiment, the determination of whether the Nth gain control position information GCi indicates the position of an attack portion AT or a release portion RE is made on the basis of the difference value between the Nth gain control amount information GBi corresponding to the Nth gain control position information GCi and the (N+1)th gain control amount information GBi, the determination may be made such that information indicating whether gain control position information GC indicates an attack portion AT or a release portion RE is added to the gain control position information GC and the determination is made on the basis of that information.

In the encoding table (FIG. 83) employed in the present example, some values are encoded using escape codes. Alternatively, specific codes corresponding to respective values may be defined in the table for all values.

In the present example, the gain control position information GC is assumed to have such a characteristic shown in FIG.80. In the case in which the characteristic of gain control position information GC varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the gain control position information GC. Codes of attack portions AT may be determined using a table, as in the case of release portions RE.

The encoding method employed by the encoder101-3is described.

In the case in which there are plural pieces of gain control position information GCi, the difference value VC obtained by subtracting Nth gain control position information GCi from (N+1)th gain control position information GCi has a high probability of becoming equal to a particular value (for various values of N=1, 2, . . . ) as shown in FIG.85.

In the example shown inFIG. 85, the difference value VC1 of gain control position information GC indicating the position of an attack portion AT has a high probability of taking a value of 1 (as represented by a solid line in FIG.85), while the difference value VC1 of gain control position information GC indicating the position of a release portion RE has a high probability of taking a value of 3 (as represented by a dotted line in FIG.85).

In view of the above, the encoder101-3encodes the gain control position information GC in such a manner that codes with small numbers of bits are assigned to difference values VC1 having high occurrence probabilities.

The operation of the encoder101-3is described below with reference to a flow chart shown in FIG.86.

In step S281, the encoder101-3detects gain control position information GCi to be encoded from the input gain control information G0to G11and determines whether the detected gain control position information GCi indicates the position of an attack portion AT or a release portion RE in a similar manner to the encoder101-2.

For example, in the case of gain control position information GC1of gain control position information GC0to GC11shown inFIG. 87, first gain control position information GC1(=7) is detected as indicating the position of an attack portion AT, while second gain control position information GC1(=17) and third gain control position information GC1(=27) are detected as indicating the positions of release portions RE.

After determining whether gain control position information GCi indicates the position of an attack portion AT or a release portion, the encoder101-3calculates the difference value VC1 by subtracting Nth gain control position information GCi from (N+1)th gain control position information GCi.

Hereinafter, for simplicity, the difference value VC1 obtained by subtracting the Nth gain control position information GCi from the (N+1)th gain control position information GCi will be referred to simply as the difference value VC1 of the (N+1)th gain control position information GCi.

For example, in the case of gain control position information GC1in the example shown inFIG. 87, the difference value VC1 of second gain control position information GC1is given by a value (=10, not shown) obtained by subtracting first gain control position information GC1(=7) from the second gain control position information GC1(=17), and the difference value VC1 of third gain control position information GC1is given by a value (=10, not shown) obtained by subtracting the second gain control position information GC1(=17) from the third gain control position information GC1(=27).

In the present example, the difference value VC1 of first gain control position information GCi is defined as being equal to the value of the first gain control position information GCi. For example, the difference value VC1 of first gain control position information GC1of gain control position information GC1is defined as being equal to 7 (not shown in the figure).

Referring again toFIG. 86, the encoder101-3determines, in step S282, a code to be assigned to the gain control position information GCi.

More specifically, in a case in which the Nth gain control position information GCi to be encoded indicates the position of an attack portion AT, the encoder101-3retrieves a code corresponding to the difference value VC1, calculated in step S281, of the Nth gain control position information GCi from a table shown in FIG.88and employs the retrieved code as the code for the Nth gain control position information GCi.

On the other hand, in a case in which the Nth gain control position information GCi indicates the position of a release portion RE, the encoder101-3retrieves a code corresponding to the difference value VC1, calculated in step S281, of the Nth gain control position information GCi from a table shown in FIG.89and employs the retrieved code as the code for the Nth gain control position information GCi.

For example, in the case of first gain control position information GC1(=7) of gain control position information GC1shown inFIG. 87, the first gain control position information GC1indicates the position of an attack portion AT and the difference value VC1 is equal to 7, and thus a 5-bit code “11011” is employed as the code of the first gain control position information GC1(=7).

In the case of second gain control position information GC1(=17) and third gain control position information GC1(=27), they indicate the positions of release portions RE and the difference values VC1 are both equal to 10 (not shown in the figure), and thus a 5-bit code “11010” is assigned to both the second gain control position information GC1(=17) and the third gain control position information GC1(=27).

In the table shown inFIG. 88, a 1-bit code “0” is assigned to a value 1, a 3-bit code “100” to a value 2, a 4 bit code “1010” to a value 3, a 4-bit code “1011” to a value 4, a 4-bit code “1100” to a value 5, a 5-bit code “11010” to a value 6, and a 5-bit code “11011” to a value 7.

In the table shown inFIG. 88, a procedure of determining a code of each value in the range from 8 to 15 is defined (1110+gain control position information GC-8). According to this procedure, a 7-bit code is given which consists of a 4-bit code “1111” (escape code) and a following 3-bit code indicating the gain control position information GC-8. Similarly, a procedure of determining a code of each value in the range from 16 to 31 is also defined (1111+gain control position information GC-16). According to this procedure, an 8-bit code is given which consists of a 4-bit code “1111” (escape code) and a following 4-bit code indicating the gain control position information GC-16.

In the table shown inFIG. 89, a 4-bit code “1010” is assigned to a value 1, a 1-bit code “0” to a value 2, a 3 bit code “100” to a value 4, a 4-bit code “1011” to a value 6, a 4-bit code “1100” to a value 8, a 5-bit code “11010” is assigned to a value 10, a 6-bit code “110110” to a value 12, and a 6-bit code “110111” to a value 14.

Furthermore, in the table shown inFIG. 89, a procedure of determining a code for a value other than 1, 2, 4, 6, 8, 10, 12, and 14 is defined (more specifically, the code is given by a formula 111+original value). According to this procedure, an 8-bit code is given as a combination of a 3-bit code “111” (escape code) and a following 5-bit code indicating the gain control position information GC (original value).

In the next step S283, the encoder101-3determines whether codes have been determined for all gain control position information GC0to GC11, that is, whether all gain control position information GC0to GC11have been encoded. If it is determined that all pieces of gain control position information GCi have not been encoded, the process returns to step S281to perform the step S281and following steps to encode next unencoded gain control position information GCi.

If it is determined in step S283that all gain control position information GC0to GC11have been encoded, the process proceeds to step S284. In step S284, the encoder101-3outputs the codes determined in step S282for the respective gain control position information GC0to GC11to the terminal connected to the switch103.

In the next step S285, the encoder101-3calculates the sum of the numbers of bits of the encoded gain control position information GC0to GC11and outputs the calculated sum to the decision unit102.

For example, in the case of 39 pieces of gain control position information GC shown inFIG. 87, codes with numbers of bits such as those shown inFIG. 87are generated as a result of encoding, and thus a signal indicating that the total number of bits is equal to 137 is output to the decision unit102.

If the conventional fixed-length (5-bit) encoding method were employed, the gain control position information GC in the example shown inFIG. 87would be encoded into codes with a total of 195 (=5×39) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 58 than that according to the conventional technique.

In the encoding tables (FIGS. 88 and 89) employed in the present example, some values are encoded using escape codes. Alternatively, specific codes corresponding to respective values may be defined in the table for all values.

In the present example, the difference value VC1 is assumed to have such a characteristic shown in FIG.85. In a case in which the characteristic of the difference value VC1 varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the difference value VC1.

The encoding method employed by the encoder101-4is described.

For example, the difference value VC2 obtained by subtracting gain control position information GCi-1of an encoding unit Ai-1from gain control position information GCi of an encoding unit Ai has a high probability of resulting in a particular value, as shown in FIG.90.

In view of the above, the encoder101-4encodes the gain control position information GC in such a manner that codes with small numbers of bits are assigned to difference values VC2 having high occurrence probabilities.

The operation of the encoder101-4is described below with reference to a flow chart shown in FIG.91.

In step S291, the encoder101-4detects gain control position information GCi of one frequency band from the input gain control information G0to G11and determines whether the detected gain control position information GCi indicates the position of an attack portion AT or a release portion RE in a similar manner to the encoder101-2.

The encoder101-4then determines the difference value VC2 by subtracting, from the detected gain control position information GCi, the gain control position information GCi-1of the encoding unit Ai-1which is in a lower frequency band adjacent to the frequency band of the encoding unit Ai and which was detected in previous execution of step291.

Hereinafter, for simplicity, the difference value VC2 obtained by subtracting the gain control position information GCi-1from the gain control position information GCi will be referred to simply as the difference value VC2 of the gain control position information GCi.

For example, in the case of gain control position information GC3of gain control position information GC0to GC11shown inFIG. 92, the difference value VC2 of first gain control position information GC3(=6) is calculated as 1 (not shown) as the result of subtraction of first gain control position information GC2(=5) from the first gain control position information GC3(=6), and the difference value VC2 of second gain control position information GC3(=9) is calculated as 2 (not shown) as the result of subtraction of second gain control position information GC2(=7) from the second gain control position information GC3(=9).

On the other hand, in the case of gain control position information GC5, the difference value VC2 of first gain control position information GC5(=6) is calculated as 0 (not shown) as the result of subtraction of gain control position information GC4(=6) from the first gain control position information GC5(=6), and a value (=11, not shown in the figure) equal to the value of second gain control position information GC5(=11) is employed as the difference value VC2 of second gain control position information GC6(=11). That is, in this specific case, because there is no gain control position information GCi-1corresponding to gain control position information GCi, a value equal to the value of the gain control position information GCi is employed as the difference value VC2 of that gain control position information GCi.

In the case of gain control position information GC0, the difference value VC2 thereof is not given.

In the next step S292, the encoder101-4determines a code to be assigned to the gain control position information GCi.

More specifically, in a case in which the Nth gain control position information GCi to be encoded indicates the position of an attack portion AT, the encoder101-4retrieves a code corresponding to the difference value VC2, calculated in step S291, of the Nth gain control position information GCi from a table shown in FIG.93and employs the retrieved code as the code for the Nth gain control position information GCi.

For example, in the case of gain control position information GC3in the example shown inFIG. 92, first gain control position information GC3(=6) indicates the position of an attack portion AT and the difference value VC2 thereof is equal to 1, and thus a 4-bit code “0100” is employed as the code of the first gain control position information GC3. On the other hand, second gain control position information GC3(=9) indicates the position of an attack portion AT and the difference value VC2 thereof is equal to 2, and thus a 5-bit code “01100” is employed as the code of the second gain control position information GC3.

On the other hand, in a case in which the Nth gain control position information GCi indicates the position of a release portion RE, the encoder101-4retrieves a code corresponding to the difference value VC2, calculated in step S291, of the Nth gain control position information GCi from a table shown in FIG.94and employs the retrieved code as the code for the Nth gain control position information GCi.

For example, in the case of gain control position information GC6in the example shown inFIG. 92, fifth gain control position information GC6(=21) indicates the position of a release portion RE and the difference value VC2 thereof is 21 (equal to the value of the fifth gain control position information GC6), and thus a 4-bit code “1000” is employed as the code of the fifth gain control position information GC6.

As for gain control position information GC0, in this specific example, values equal to the values of first gain control position information GC0(=5), second gain control position information GC0(=7), and third gain control position information GC0(=9) are respectively represented using 5 bits and resultant 5-bit expressions are employed as the codes of first, second, and third gain control position information GC0, respectively.

In the table shown inFIG. 93, a 5-bit code “01110” is assigned to a value −2, a 4-bit code “0101” to a value −1, a 2-bit code “00” to a value 0, a 4-bit code “0100” to a value 1, a 5-bit code “01100” to a value 2, a 5-bit code “01101” to a value 3, and a 5-bit code “01111” to a value 4.

Furthermore, in the table shown inFIG. 93, a procedure of determining a code for a value other than the values of −2 to 4 is defined (more specifically, the code is given by a formula 1+original value). According to this procedure, a 6-bit code is given by a combination of a 1-bit code “1” and a following 5-bit code indicating the gain control position information GC (original value).

In the table shown inFIG. 94, a code with a particular number of bits is assigned to each value. Furthermore, in the table shown inFIG. 94, a procedure of determining a code for a value other than the values having corresponding assigned codes is defined (more specifically, the code is given by a formula 111+original value). According to this procedure, an 8-bit code is given by a combination of a 1-bit code “1” and a following 5-bit code indicating the gain control position information GC (original value).

In the next step S293, the encoder101-4determines whether codes have been determined for all gain control position information GC0to GC11, that is, whether all gain control position information GC0to GC11have been encoded. If it is determined that all pieces of gain control position information GCi have not been encoded, the process returns to step S291to perform the step S291and following steps to encode next unencoded gain control position information GCi.

If it is determined in step S293that all gain control position information GC0to GC11have been encoded, the process proceeds to step S294. In step S294, the encoder101-4outputs the codes determined in step S292for the respective gain control position information GC0to GC11to the terminal connected to the switch103.

In the next step S295, the encoder101-4calculates the sum of the numbers of bits of the encoded gain control position information GC0to GC11and outputs the calculated sum to the decision unit102.

For example, in the case of 37 pieces of gain control position information GC shown inFIG. 92, codes with numbers of bits such as those shown inFIG. 92are generated as a result of encoding, and thus the total number of bits of the codes becomes equal to 126. Thus, a signal indicating that the total number of bits is equal to 126 is output to the decision unit102.

If the conventional fixed-length (5-bit) encoding method were employed, the gain control position information GC in the example shown inFIG. 92would be encoded into codes with a total of 185 (=5×37) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 59 than that according to the conventional technique.

In the encoding tables (FIGS. 93 and 94) employed in the present example, some values are encoded using escape codes. Alternatively, specific codes corresponding to respective values may be defined in the table for all values.

In the present example, the difference value VC2 is assumed to have such a characteristic shown in FIG.90. In a case in which the characteristic of the difference value VC2 varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the difference value VC2.

The encoding method employed by the encoder101-5is described.

As described earlier with reference toFIG. 85, the difference value VC1 obtained by subtracting the Nth gain control position information GCi from the (N+1)th gain control position information GCi has a high probability of becoming equal to a particular value.

As described earlier with reference toFIG. 90, the difference value VC2 obtained by subtracting the Nth gain control position information GCi-1of a lower frequency band immediately adjacent to the Nth gain control position information GCi from the Nth gain control position information GCi has a high probability of becoming equal to a particular value.

Therefore, for example, the difference value VC3 obtained by subtracting the difference value VC1 of Nth gain control amount information GCi-1from the difference value VC1 of Nth gain control amount information GCi has a high probability of becoming equal to a particular value as shown in FIG.95.

In view of the above, the encoder101-5encodes the gain control position information GC in such a manner that codes with small numbers of bits are assigned to difference values VC3 having high occurrence probabilities.

The operation of the encoder101-5is described below with reference to a flow chart shown in FIG.96.

In step S301, the encoder101-5detects gain control position information GCi of one frequency band from the input gain control information G0to G11and determines whether the detected gain control position information GCi indicates the position of an attack portion AT or a release portion RE in a similar manner to the encoder101-2.

The encoder101-5then calculates the difference value VC1 by subtracting Nth gain control position information GCi from (N+1)th gain control position information GCi of gain control position information GCi. As for first gain control position information GCi, the difference value VC1 thereof is defined as being equal to the value of the first gain control position information GCi.

For example, in the case of gain control position information GC2of gain control position information GC0to GC11shown inFIG. 79, and a value (5, not shown in the figure) equal to the value of first gain control position information GC2(=5) is employed as the difference value VC2 of the first gain control position information, and the difference value VC1 of second gain control position information GC2(=7) is calculated as 2 (not shown) as the result of subtraction of first gain control position information GC2(=5) from the second gain control position information GC2(=7).

On the other hand, as for gain control position information GC3, a value (6, not shown in the figure) equal to the value of first gain control position information GC3(=6) is employed as the difference value VC1 of the first gain control position information GC3(=6), and the difference value VC1 of second gain control position information GC3(=9) is calculated as 3 (not shown) as the result of subtraction of the first gain control position information GC3(=6) from the second gain control position information GC3(=9).

In the next step S302, the encoder101-5determines the difference value VC3 by subtracting the difference value VC1 of the gain control position information GCi-1determined in the previous execution of step S301from the difference value VC1 of the gain control position information GCi determined in step S301.

Hereinafter, for simplicity, the difference value VC3 obtained by subtracting the difference value VC1 of the gain control position information GCi-1from the difference value VC1 of the gain control position information GCi will be referred to simply as the difference value VC3 of the gain control position information GCi.

For example, in the case of gain control position information GC3in the example shown inFIG. 97, the difference value VC3 of first gain control position information GC3(=6) is calculated as 1 as the result of subtraction of first gain control position information GC2(=5) from the first gain control position information GC3(=6), and the difference value VC3 of second gain control position information GC3(=9) is calculated as 1 as the result of subtraction of second gain control position information GC2(=7) from the second gain control position information GC3(=9).

As for gain control position information GC0, a value equal to the difference value VC1 is employed as the difference value VC3 of the gain control position information GC0.

In the next step S303, the encoder101-5determines a code to be assigned to the gain control position information GCi.

More specifically, in a case in which the gain control position information GCi indicates the position of an attack portion AT, the encoder101-5retrieves a code corresponding to the difference value VC3, calculated in step S302, of the gain control position information GCi from a table shown in FIG.98and employs the retrieved code as the code for the gain control position information GCi.

For example, in the case of gain control position information GC3in the example shown inFIG. 97, first gain control position information GC3(=6) indicates the position of an attack portion AT and the difference value VC3 thereof is equal to 1, and thus a 3-bit code “010” is employed as the code of the first gain control position information GC3. Second gain control position information GC3(=9) also indicates the position of an attack portion AT and the difference value VC3 thereof is equal to 1, and thus a 3-bit code “010” is employed as the code of the second gain control position information GC3.

On the other hand, in a case in which the Nth gain control position information GCi indicates the position of a release portion RE, the encoder101-5retrieves a code corresponding to a value equal to the difference value VC3, calculated in step S302, of the Nth gain control position information GCi from a table shown in FIG.99and employs the retrieved code as the code for the Nth gain control position information GCi.

For example, in the case of gain control position information GC6in the example shown inFIG. 97, fifth gain control position information GC6(=21) indicates the position of an release portion RE and the difference value VC3 thereof is equal to 10, and thus a 5-bit code “1011” is employed as the code of the fifth gain control position information GC6.

In the table shown inFIG. 98, a code with a particular number of bits is assigned to each value. Furthermore, in the table shown inFIG. 98, a procedure of determining a code for a value other than the values having corresponding assigned codes is defined (more specifically, the code is given by a formula 11+original value). According to this procedure, a 7-bit code is given by a combination of a 2-bit code “11” and a following 5-bit code indicating the gain control position information GC (original value).

In the table shown inFIG. 99, a code with a particular number of bits is assigned to each value. Furthermore, in the table shown inFIG. 99, a procedure of determining a code for a value other than the values having corresponding assigned codes is defined (more specifically, the code is given by a formula 111+original value). According to this procedure, a code is determined which has a total of 8 bits including a 3-bit code “111” and a following 5-bit code indicating the gain control position information GC (original value).

In the next step S304, the encoder101-5determines whether codes have been determined for all gain control position information GC0to GC11, that is, whether all gain control position information GC0to GC11have been encoded. If it is determined that all pieces of gain control position information GCi have not been encoded, the process returns to step S301to perform the step S301and following steps to encode next unencoded gain control position information GCi.

If it is determined in step S304that all gain control position information GC0to GC11have been encoded, the process proceeds to step S305. In step S305, the encoder101-5outputs the codes determined in step S303for the respective gain control position information GC0to GC11to the terminal connected to the switch103.

In the next step S306, the encoder101-5calculates the sum of the numbers of bits of the encoded gain control position information GC0to GC11and outputs the calculated sum to the decision unit102.

For example, in the case of 37 pieces of gain control position information GC shown inFIG. 97, codes with numbers of bits such as those shown inFIG. 97are generated as a result of encoding, and thus the total number of bits of the codes becomes equal to 109. Thus, a signal indicating that the total number of bits is equal to 109 is output to the decision unit102.

If the conventional fixed-length (5-bit) encoding method were employed, the gain control position information GC in the example shown inFIG. 97would be encoded into codes with a total of 185 (=5×37) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 76 than that according to the conventional technique.

In the encoding tables (FIGS. 98 and 99) employed in the present example, some values are encoded using escape codes. Alternatively, specific codes corresponding to respective values may be defined in the table for all values.

In the present example, the difference value VC3 is assumed to have such a characteristic shown in FIG.95. In a case in which the characteristic of the difference value VC3 varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the difference value VC3.

The encoding method employed by the encoder101-6is described.

In some cases, in gain control position information GCi-1and gain control position information GCi, there are an equal number of pieces of gain control position information GC and, besides, Nth gain control position information GCi and corresponding Nth gain control position information GCi-1are equal to each other, as is the case with gain control position information GC0and gain control position information GC1of gain control position information GC0to GC11shown in FIG.100.

In view of the above, the encoder101-6encodes gain control position information GC in such a manner that, in the case in which, in gain control position information GCi-1and gain control position information GCi, there are an equal number of pieces of gain control position information GC and, besides, Nth gain control position information GCi and corresponding Nth gain control position information GCi-1are equal to each other, only a flag (encoding flag) set to a value (0, in this specific example) indicating the above fact is encoded.

The operation of the encoder106-6is described below with reference to a flow chart shown in FIG.101.

In step S301, the encoder101-6detects gain control position information GCi of one frequency band from the input gain control information G0to G11. The encoder101-6then determines whether there are an equal number of pieces of gain control position information GC in both gain control position information GCi and gain control position information GCi-1detected in previous execution of step S301, and besides Nth gain control position information GCi and corresponding Nth gain control position information GCi-1are equal to each other. If it is determined that there are an equal number of pieces of gain control position information GC, and Nth gain control position information GCi and corresponding Nth gain control position information GCi-1are equal to each other, the process proceeds to step S312. In step S312, the encoding flag associated with the gain control position information GCi is set to a value (0, in this specific example) so as to indicate the above fact.

For example, in the case of gain control position information GC1and gain control position information GC0in the example shown inFIG. 100, there are equally 3 pieces of gain control position information GC, and first, second, and third gain control position information GC1(=7, 9, 11) are equal to first, second, and third gain control position information GC0(=7, 9, 11), respectively, and thus the encoding flag associated with the gain control position information GC1is set to 0.

On the other hand, if it is determined in step S311that the number of pieces of gain control position information GC is different between gain control position information GCi and gain control position information GCi-1, or Nth gain control position information GCi is not equal to corresponding Nth gain control position information GCi-1, the process proceeds to step S313. In step S313, the encoder101-6sets the encoding flag associated with the gain control position information GCi to a value (1, in this specific example) so as to indicate the above fact.

For example, in the case of gain control position information GC2and gain control position information GC1in the example shown inFIG. 100, the number of pieces of gain control position information GC is different between them, and thus the encoding flag associated with the gain control position information GC2is set to 1.

In the next step S314, the encoder101-6encodes the gain control position information GCi in a similar manner as with, for example, the encoder101-3.

That is, the encoder101-6determines the difference value VC1 of (N+1)th gain control position information GCi by subtracting Nth gain control position information GCi from the (N+1)th gain control position information GCi. As for first gain control position information GCi, the difference value VC1 thereof is defined as being equal to the value of the first gain control position information GCi.

The encoder101-6retrieves a code corresponding to the difference value VC1 of Nth gain control position information GCi from a table similar to that shown inFIG. 88or a table similar to that shown inFIG. 89depending on whether the Nth gain control position information GCi indicates the position of an attack portion AT or a release portion RE, and the encoder101-6employs the retrieved code as the code of the Nth gain control position information GCi.

If the encoding flag has been set to 0 in step S312, or if the code of gain control position information GCi has been determined in step S314, the process proceeds to step S315. In step S315, the encoder101-6determines whether all encoding flags have been set to 0 or 1 and codes have been determined for all pieces of gain control position information GCi corresponding to the encoding flags set to 1, that is, the encoder101-6determines whether encoding has been completed for all pieces of gain control position information GC0to GC11. If it is determined that all pieces of gain control position information GCi have not been encoded, the process returns to step S311to perform the step S311and following steps to encode next unencoded gain control position information GCi.

If it is determined in step S315that all gain control position information GC0to GC11have been encoded, the process proceeds to step S316. In step S316, the encoder101-6outputs the encoding flag set to 0 or 1 and the codes to the terminal connected to the switch103.

In the next step S317, the encoder101-6calculates the sum of the numbers of bits of the encoded gain control position information GC0to GC11and outputs the calculated sum to the decision unit102.

For example, in the case of 35 pieces of gain control position information GC shown inFIG. 100, 11 1-bit encoding flags (there is no encoding flags associated with gain control position information GC0in this specific case) and codes with numbers of bits such as those shown inFIG. 100are generated as the result of the encoding, and thus a signal indicating that the total number of bits is equal to 72 is output to the decision unit102.

If the conventional fixed-length (5-bit) encoding method were employed, the gain control position information GC in the example shown inFIG. 100would be encoded into codes with a total of 175 (=5×35) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 103 than that according to the conventional technique.

Although in the case where there are equal number of pieces of gain control position information GC in both gain control position information GCi and gain control position information GCi-1but Nth gain control position information GCi and Nth gain control position information GCi-1are not equal to each other, the encoder101-6encodes gain control position information GCi in a similar manner to the encoder101-3, each piece of gain control position information GCi may be encoded into a code with a fixed bit length (5 bits).

The encoding method employed by the encoder101-7is described.

In most cases, plural pieces of gain control position information GCi take values which are close to each other as is the case with gain control position information GC3, shown inFIG. 102, of gain control position information GC0to GC11. Therefore, values obtained by subtracting the minimum value of the values of gain control position information GCi from the values of respective pieces of gain control position information GCi become small enough to represent with a small number of bits.

In view of the above, the encoder101-7encodes gain control position information GC in such a manner that the minimum value of the gain control position information GC0to GC11is subtracted from Nth gain control position information GCi, the resultant difference is expressed using a particular number of bits, and the resultant expression is employed as the code of the Nth gain control position information GCi.

The operation of the encoder101-7is described below with reference to a flow chart shown in FIG.103.

In step S321, the encoder101-7detects gain control position information GCi of one frequency band from the input gain control information G0to G11.

In the next step S322, the encoder101-7determines a code to be assigned to the detected gain control position information GCi. The details of the process in step S322are shown in the form of a flow chart in FIG.104.

In step S331, the encoder101-7detects maximum and minimum values of the gain control position information GCi.

In the example shown inFIG. 102, 8 is detected as the maximum value and 5 is detected as the minimum value.

In step S332, the encoder101-7calculates the difference between the maximum and minimum values detected in step S331and determines the number of bits which can represent the difference.

In the example shown inFIG. 102, the difference between the maximum value (8) and the minimum value (5) is equal to 3, and thus the number of bits which can represent the difference is 2.

In step S333, the encoder101-7subtracts the minimum value detected in step S331from respective values of gain control position information GCi and represents the resultant difference values using as many bits as the necessary number of bits determined in sep S332. The resultant values are employed as codes for the respective pieces of gain control position information GCi. Because the necessary number of bits is defined as the number of bits which can represent the difference between the maximum value and the minimum value, the value obtained by subtracting the minimum value from any gain control position information GCi can be represented using as many bits as the necessary number of bits.

In the example shown inFIG. 102, 0, 1, 2, and 3 obtained by subtracting 5 from first gain control position information GC3(=5), second gain control position information GC3(=6), third gain control position information GC3(=7), and fourth gain control position information GC3(=8), respectively, are expressed using 2 bits, and resultant 2-bit expressions are employed as codes of first gain control position information GC3to fourth gain control position information GC3, respectively.

Thereafter, the process proceeds to step S323shown in FIG.103.

In step S323, the encoder101-7determines whether codes have been determined for all gain control position information GC0to GC11, that is, whether all gain control position information GC0to GC11have been encoded. If it is determined that all pieces of gain control position information GCi have not been encoded, the process returns to step S321to perform the step S321and following steps to encode next unencoded gain control position information GCi.

If it is determined in step S323that all gain control position information GC0to GC11have been encoded, the process proceeds to step S324. In step S324, The data indicating the minimum value detected in step S331, the data indicating the necessary number of bits calculated in step S332, and the codes, determined in step S333, of gain control position information GC0to GC11represented by as many bits as the necessary number of bits are output from the encoder101-7to the terminal connected to the switch103.

In the next step S325, the encoder101-7calculates the sum of the numbers of bits of the encoded gain control position information GC0to GC11and outputs the calculated sum to the decision unit102.

For example, in the case of gain control position information GC3shown inFIG. 102, 2-bit data indicating a necessary number of bits, 5-bit data indicating a minimum value, and 4 2-bit codes (represented by as many bits as the necessary number of bits are generated as the result of the encoding, and thus a signal indicating that the total number of bits is equal to 15 (=2+5+2×4) is output to the decision unit102.

If the conventional fixed-length (5-bit) encoding method were employed, the gain control position information GC in the example shown inFIG. 102would be encoded into codes with a total of 20 (=5×4) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 5 than that according to the conventional technique.

The encoding method employed by the encoder101-8is described.

Gain control position information GC0to GC11have high probabilities of taking values close to each other, as is the case with gain control position information GC0to GC11shown inFIG. 105, and thus subtraction of the minimum value (3, in the example shown inFIG. 105) of the gain control position information GC0to GC11from the values of respective pieces of gain control position information GCi result in small values which can be represented using a small number of bits.

In view of the above, the encoder101-8encodes gain control position information GC in such a manner that the minimum value of the gain control position information GC0to GC11is subtracted from gain control position information GCi, the resultant difference is expressed using a particular number of bits, and the resultant expression is employed as the code of the gain control position information GCi.

The operation of the encoder101-8is described below with reference to a flow chart shown in FIG.106.

In step S341, the encoder101-8extracts gain control position information GC0to GC11from the input gain control information G0to G11and detects maximum and minimum values of the extracted gain control position information GC0to GC11.

In the example shown inFIG. 105, 10 is detected as the maximum value and 3 is detected as the minimum value.

In step S342, the encoder101-8calculates the difference between the maximum and minimum values detected in step S341and determines the number of bits which can represent the difference.

In the example shown inFIG. 105, the difference between the maximum value (10) and the minimum value (3) is equal to 7, and thus the necessary number of bits is 3.

In step S343, the encoder101-8subtracts the minimum value detected in step S341from the respective values of gain control position information GC0to GC11and represents the resultant difference values using as many bits as the necessary number of bits determined in sep S342. The resultant values are employed as codes for the respective pieces of gain control position information GC. Because the necessary number of bits is defined as the number of bits which can represent the difference between the maximum value and the minimum value, the value obtained by subtracting the minimum value from any gain control position information GC can be represented using as many bits as the necessary number of bits.

In step S344, the data indicating the minimum value detected in step S341, the data indicating the necessary number of bits calculated in step S342, and the codes of respective pieces of gain control position information, determined in step S343, of gain control position information GC0to GC11represented by as many bits as the necessary number of bits are output from the encoder101-8to the terminal connected the switch103.

In the example shown inFIG. 105, as shown inFIG. 107, 5-bit data indicating a minimum value (=3), 2-bit data indicating a necessary number of bits (2 bits), and 22 codes expressed in 3 bits (equal to the necessary number of bits) are output to the terminal connected the switch103.

In the next step S345, the encoder101-8calculates the sum of the numbers of bits of the encoded gain control position information GC0to GC11and outputs the calculated sum to the decision unit102.

For example, in the case of 22 pieces of gain control position information GC shown inFIG. 105, 2-bit data indicating a necessary number of bits, 5-bit data indicating a minimum value, and 22 codes represented in 3 bits (equal to the necessary number of bits) are generated as the result of the encoding, and thus a signal indicating that the total number of bits is equal to 73 (=2+5+3×22) is output to the decision unit102.

If the conventional fixed-length (5-bit) encoding method were employed, the gain control position information GC in the example shown inFIG. 105would be encoded into codes with a total of 110 (=5×22) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 37 than that according to the conventional technique.

The encoding method employed by the encoder101-9is described.

In most cases, in the stereo audio signal, the gain control position information GCLi of the left-channel signal and the gain control position information GCRi of the right-channel signal in the same frequency band are equal or close to each other. Therefore, the absolute value of the difference value WC1 obtained by subtracting the gain control position information GCLi from the gain control position information GCRi has a high probability of becoming equal or nearly equal to 0, as shown in FIG.108.

In view of the above, the encoder101-9encodes gain control position information GCL such that either gain control position information GCL0to GCL11or gain control position information GCR0to GCR11, and codes with small numbers of bits are assigned to difference values WC1 having high occurrence probabilities.

The operation of the encoder101-9is described below with reference to a flow chart shown in FIG.109.

Herein, it is assumed that the encoder101-9encodes gain control position information GCR.

In step S351, the encoder101-9detects gain control position information GCLi of one frequency band from gain control information GL0to GL11of the input left-channel signal and also detects gain control position information GCRi of the same frequency band from gain control information GR0to GR11of the input right-channel signal. The encoder101-9calculates the difference value WC1 by subtracting the detected gain control position information GCLi from the detected gain control position information GCRi.

Hereinafter, for simplicity, the difference value WC1 obtained by subtracting the gain control position information GCLi from the gain control position information GCRi will be referred to simply as the difference value WC1 of the gain control position information GCRi.

For example, in the case of gain control position information GCL3of gain control position information GCL0to GCL11and gain control position information GCR3of gain control position information GCR0to GCR11shown inFIG. 110, the difference value WC1 of first gain control position information GCR3is calculated as 0 as the result of subtraction of first gain control position information GCL3(=7) from the first gain control position information GCR3(=7), and the difference value WC1 of second gain control position information GCR3is calculated as 0 as the result of subtraction of second gain control position information GCL3(=23) from the second gain control position information GCR3(=23).

In the next step S352, the encoder101-9determines whether the gain control position information GCRi indicates the position of an attack portion AT or a release portion RE, in a similar manner to the encoder101-2. If the gain control position information GCRi indicates the position of an attack portion AT, the encoder101-9retrieves a code corresponding to the difference value WC1 calculated in step S351from the table shown inFIG. 111, while if the gain control position information GCRi indicates the position of a release portion RE, the encoder101-9retrieves a code corresponding to the difference value WC1 calculated in step S351from the table shown in FIG.112. The encoder101-9employs the retrieved code as the code for the gain control position information GCRi.

For example, in the case of first gain control position information GCR3(=7) of gain control position information GCR3in the example shown inFIG. 110, the first gain control position information GCR3indicates the position of an attack portion AT and the difference value WC1 thereof is equal to 1, and thus a 1-bit code “0” is employed as the code of the first gain control position information GCR3.

On the other hand, as for the code of second gain control position information GCR3(=23), the second gain control position information GCLR3indicates the position of a release portion RE and the difference value WC1 thereof is equal to 0, and thus a 1-bit code “0” is employed as the code of the second gain control position information GCR3.

In the table shown inFIG. 111, a code with a particular number of bits is assigned to each value. Furthermore, in the table shown inFIG. 111, a procedure of determining a code for a value other than the values having corresponding assigned codes is defined (more specifically, the code is given by a formula 11+original value). According to this procedure, a 7-bit code is given by a combination of a 2-bit code “11” and a following 5-bit code indicating the gain control position information GC (original value, the gain control position information GCR in this specific case).

In the table shown inFIG. 112, a code with a particular number of bits is assigned to each value. Furthermore, in the table shown inFIG. 112, a procedure of determining a code for a value other than the values having corresponding assigned codes is defined (more specifically, the code is given by a formula 111+original value). According to this procedure, an 8-bit code is given by a combination of a 3-bit code “111” and a following 5-bit code indicating the gain control position information GC (original value, the gain control position information GCR in this specific case).

In step S353, the encoder101-9determines whether codes have been determined for all gain control position information GCR0to GCR11, that is, whether all gain control position information GCR0to GCR11have been encoded. If it is determined that all pieces of gain control position information GCR have not been encoded, the process returns to step S351to perform the step S351and following steps to encode next unencoded gain control position information GCR.

If it is determined in step S353that all gain control position information GCR0to GCR11have been encoded, the process proceeds to step S354. In step S354, the encoder101-9outputs the codes determined in step S352for the respective gain control position information GCR0to GCR11to the terminal connected to the switch103.

In step S355, the encoder101-9calculates the sum of the numbers of bits of the encoded gain control position information GCR0to GCR11and outputs the calculated sum to the decision unit102.

For example, in the case of 17 pieces of gain control position information GCR shown inFIG. 110, codes with numbers of bits such as those shown inFIG. 110are generated as a result of encoding, and thus a signal indicating that the total number of bits is equal to 29 is output to the decision unit102.

If the conventional fixed-length (5-bit) encoding method were employed, the gain control position information GC in the example shown inFIG. 110would be encoded into codes with a total of 85 (=5×17) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 56 than that according to the conventional technique.

In the encoding tables (FIGS. 111 and 112) employed in the present example, some values are encoded using escape codes. Alternatively, specific codes corresponding to respective values may be defined in the table for all values.

In the present example, the difference value WC1 is assumed to have such a characteristic shown in FIG.108. In a case in which the characteristic of the difference value WC1 varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the difference value WC1.

The encoding method employed by the encoder101-10is described.

In many cases, in gain control position information GCLi of a left-channel signal and gain control position information GCRi of a right-channel signal in the same frequency band of a stereo audio signal, there are an equal number of pieces of gain control position information GC and, besides, Nth gain control position information GCLi and corresponding Nth gain control position information GCRi are equal to each other, as is the case with gain control position information GCL1and gain control position information GCR1of gain control position information GC0to GC11and gain control position information GCR0to GCR11shown in FIG.113.

In view of the above, the encoder101-10encodes either gain control position information GCL0to GCL11or gain control position information GCR0to GCR11into codes with a fixed bit length, and encodes the other in such manner that when, in gain control position information GCLi and gain control position information GCRi, there are an equal number of pieces of gain control position information GC and, besides, Nth gain control position information GCLi and corresponding Nth gain control position information GCRi are equal to each other, only a flag (encoding flag) set to a value (0, in this specific example) indicating the above fact is encoded.

In the case in which gain control position information GCL is encoded into codes with a fixed bit length, coding of gain control position information GCR is performed in a manner described below with reference to a flow chart shown in FIG.114.

In step S361, the encoder101-10detects gain control position information GCLi in one frequency band from gain control information GL0to GL11of the input left-channel signal and also detects gain control position information GCRi in the same frequency band from gain control information GR0to GR11of the input right-channel signal. The encoder101-10determines whether in gain control position information GCLi and gain control position information GCRi, there are an equal number of pieces of gain control position information GC and, besides, Nth gain control position information GCLi and corresponding Nth gain control position information GCRi are equal to each other. If it is determined that in gain control position information GCLi and gain control position information GCRi, there are an equal number of pieces of gain control position information GC and, besides, Nth gain control position information GCLi and corresponding Nth gain control position information GCRi are equal to each other, the process proceeds to step S362. In step S362, the encoder101-10sets the encoding flag associated with the gain control position information GCRi to a value (0 in this specific example) so as to indicate the above fact.

For example, in the case of gain control position information GCL1and gain control position information GCR1in the example shown inFIG. 113, there are equally 3 pieces of gain control position information GC and, besides, first, second, and third gain control position information GCL1(=4, 5, 13) and corresponding first, second, and third gain control position information GCR1(=4, 5, 13) are equal to each other, and thus the encoding flag associated with the gain control position information GCR1is set to 0.

On the other hand, if it is determined in step S361that in gain control position information GCLi and gain control position information GCRi, the numbers of pieces of gain control position information GC are not equal or Nth gain control position information GCLi and corresponding Nth gain control position information GCRi are not equal to each other, the process proceeds to step S363. In step S363, the encoder101-10sets the encoding flag associated with the gain control position information GCRi to 1.

In the next step S364, the encoder101-10encodes the gain control position information GCRi in a similar manner as to, for example, the encoder101-9.

That is, the encoder101-10calculates the difference value WCi by subtracting the Nth gain control position information GCLi from the Nth gain control position information GCRi.

The encoder101-10retrieves a code corresponding to the difference value WC1 of the Nth gain control position information GCRi from a table similar to that shown inFIG. 111or a table similar to that shown inFIG. 112depending on whether the Nth gain control position information GCRi indicates the position of an attack portion AT or a release portion RE, and the encoder101-10employs the retrieved code as the code of the Nth gain control position information GCRi.

In the case in which an encoding flag has been set to 0 in step S362or in the case in which gain control position information GCRi has been encoded in step S364, the process proceeds to step S365. In step S365, the encoder101-10determines whether all encoding flags have been set to 0 or 1 and codes have been determined for all pieces of gain control position information GCRi corresponding to the encoding flags set to 1, that is, the encoder101-10determines whether encoding has been completed for all pieces of gain control position information GCR0to GCR11. If it is determined that all pieces of gain control position information GCRi have not been encoded, the process returns to step S361to perform the step S361and following steps to encode next unencoded gain control position information GCRi.

If it is determined in step S365that all gain control position information GCR0to GCR11have been encoded, the process proceeds to step S366. In step S366, the encoder101-10outputs the encoding flag set to 0 or 1 and the codes to the terminal connected to the switch103.

In the next step S367, the encoder10-10calculates the sum of the numbers of bits of the encoded gain control position information GCR0to GCR11and outputs the calculated sum to the decision unit102.

For example, in the case of 22 pieces of gain control position information GCR shown inFIG. 113, 12 1-bit encoding flags and codes with number of bits such as those shown inFIG. 113are generated as a result of encoding, and thus a signal indicating that the total number of bits is equal to 31 is output to the decision unit102.

If the conventional fixed-length (5-bit) encoding method were employed, the gain control position information GC in the example shown inFIG. 113would be encoded into codes with a total of 110 (=5×22) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 79 than that according to the conventional technique.

In the present embodiment, in the case in which it is determined that in gain control position information GCLi and gain control position information GCRi, the numbers of pieces of gain control position information GC are not equal, or Nth gain control position information GCLi and corresponding Nth gain control position information GCRi are not equal to each other, encoding of gain control position information GCRi is performed in a similar manner as with the encoder101-9. Alternatively, fixed-bit-length encoding (5-bit encoding) may be employed.

The encoding method employed by the encoder101-11is described.

In some cases, in the stereo audio signal, as shown inFIG. 115, all gain control position information GCL0to GCL11of the left-channel signal become equal to corresponding gain control position information GCR0to GCR11of the right-channel signal.

In view of the above, the encoder101-11encodes either gain control position information GCL0to GCL11or gain control position information GCR0to GCR11into codes with a fixed bit length, but, when gain control amount information GBL0to GBL11are all equal to corresponding gain control amount information GBR0to GBR11, encoding of the other set of gain control amount information is not performed.

In a case in which gain control position information GCL is encoded into codes with a fixed bit length, coding of gain control position information GCR is performed in a manner described below with reference to a flow chart shown in FIG.116.

In step S371, the encoder101-11detects gain control position information GCL0to GCL11and gain control position information GCR0to GCR11from the input gain control information GL0to GL11of the left-channel signal and gain control information GR0to GR11of the right-channel signal, respectively. The encoder101-11then determines whether the gain control position information GCL0to GCL11and the gain control position information GCR0to GCR11are equal to each other between corresponding counterparts. If it is determined that they are all equal to each other as is the case in the example shown inFIG. 115, the process proceeds to step S372.

In step S372, the encoder101-11does not encode the gain control position information GCR0to GCR11, in this case, but the encoder101-11outputs a value of 0 indicating that the number of bits of codes is equal to 0 to the decision unit102.

In a case in which it is determined in step S371that the gain control position information GCL0to GCL11and the gain control position information GCR0to GCR11are not equal to each other between corresponding counterparts, the process proceeds to step S373. In step S373, the encoder101-11encodes the gain control position information GCR0to GCR11, for example, into codes with a fixed bit length (5 bits).

In the next step S374, the encoder101-11outputs the resultant codes of the respective gain control position information GCR0to GCR11to the terminal connected to the switch103.

In step S375, the encoder101-11calculates the sum of the numbers of bits of the encoded gain control position information GCR0to GCR11and outputs the calculated sum to the decision unit102.

In the example shown inFIG. 115, the total number of bits of the codes of the gain control position information GCL is equal to 100 (=5×20). Thus, a signal indicating that the total number of bits is equal to 100 is output to the decision unit102.

After step S372or step S375, the process performed by the encoder101-11is completed.

If the conventional fixed-length (5-bit) encoding method were employed, the gain control position information GC in the example shown inFIG. 115would be encoded into codes with a total of 100 (=5×20) bits. Thus, when the gain control position information GCR is not encoded, the total number of bits of encoded data according to the present invention is smaller by 100 than that according to the conventional technique.

The encoding method employed by the encoder101-12is described.

As described earlier with reference toFIG. 85, in plural pieces of gain control position information GCi, the difference value VC1 obtained by subtracting the Nth gain control position information GCi from the (N+1)th gain control position information GCi has a high probability of becoming equal to a particular value.

Furthermore, in the case of stereo audio signals, as described earlier with reference toFIG. 108, the difference value WC1 obtained by subtracting gain control position information GCLi from gain control position information GCRi in the same frequency band has a high probability of becoming equal to a particular value.

Therefore, the difference value WC2 obtained by subtracting the difference value VC1 of the gain control position information GCLi from the difference value VC1 of the gain control position information GCRi has a high probability of taking a particular value (0 or a value whose absolute value is close to 0), as shown in FIG.117.

In view of the above, the encoder101-12encodes gain control position information GC such that either gain control position information GCL0to GCL11or gain control position information GCR0to GCR11, and codes with small numbers of bits are assigned to difference values WC2 having high occurrence probabilities.

The operation of the encoder101-12is described below with reference to a flow chart shown in FIG.118. Herein, it is assumed that the encoder101-12encodes gain control position information GCR.

In step S381, the encoder101-12detects gain control position information GCLi in one frequency band from gain control information GL0to GL11of the input left-channel signal and also detects gain control position information GCRi in the same frequency band from gain control information GR0to GR11of the input right-channel signal.

Furthermore, the encoder101-12calculates the difference value VC1 of (N+1)th gain control position information GCLi by subtracting Nth gain control position information GCLi from the (N+1)th gain control position information GCLi, and also calculates the difference value VC1 of (N+1)th gain control position information GCRi by subtracting Nth gain control position information GCRi from the (N+1)th gain control position information GCRi.

The difference value VC1 of first gain control position information GCLi is defined as being equal to the value of the first gain control position information GCLi, and the difference value VC1 of first gain control position information GCRi is defined as being equal to the value of the first gain control position information GCRi.

For example, in the case of gain control position information GCL3of gain control position information GCL to GCL11shown inFIG. 119, a value (7, not shown in the figure) equal to the value of first gain control position information GCL3(=7) is employed as the difference value VC1 of the first gain control position information GCL3(=7), and the difference value VC1 of second gain control position information GCL3(=23) is calculated as 16 as the result of subtraction of the first gain control position information GCL3(=7) from the second gain control position information GCL3(=23).

On the other hand, as for gain control position information GCR3of gain control position information GCR0to GCR11, a value (7, not shown in the figure) equal to the value of first gain control position information GCR3(=7) is employed as the difference value VC1 of the first gain control position information GCR3(=7), and the difference value VC1 of second gain control position information GCR3(=23) is calculated as 16 as the result of subtraction of the first gain control position information GCR3(=7) from the second gain control position information GCR3(=23).

In the next step S382, the encoder101-12determines the difference value WC2 by subtracting the difference value VC1 of gain control position information GCLi from the difference value VC1 of gain control position information GCRi.

Hereinafter, for simplicity, the difference value WC2 obtained by subtracting the difference value VC1 of the gain control position information GCLi from the difference value VC1 of the gain control position information GCRi will be referred to simply as the difference value WC2 of the gain control position information GCRi.

For example, in the case of gain control position information GCL3and gain control position information GCR3in the example shown inFIG. 119, the difference value WC2 of first gain control position information GCR3is calculated as 0 as the result of subtraction of the difference value VC1 (=7) of first gain control position information GCL3from the difference value VC1 (=7) of the first gain control position information GCR3, and the difference value WC2 of second gain control position information GCR3is calculated as 0 as the result of subtraction of the difference value VC1 (=16) of second gain control position information GCL3from the difference value VC1 (=16) of the second gain control position information GCR3.

In step S383, the encoder101-12determines whether Nth gain control position information GCRi indicates the position of an attack portion AT or a release portion RE, in a similar manner to the encoder101-2. In the case in which the gain control position information GCRi indicates the position of an attack portion AT, the encoder101-12retrieves a code corresponding to the difference value WC2 of the Nth gain control position information GCRi from a table shown in FIG.120and employs the retrieved code as the code of the gain control position information GCRi.

For example, in the case of gain control position information GCR3in the example shown inFIG. 119, first gain control position information GCL3(=7) indicates the position of an attack portion AT and the difference value WC2 thereof is equal to 0, and thus a 1-bit code “0” is employed as the code of the first gain control position information GCL3.

On the other hand, in a case in which the gain control position information GCRi indicates the position of a release portion RE, a code corresponding to the difference value WC2 of the gain control position information GCRi is retrieved from a table shown in FIG.121and the retrieved code is employed as the code of the gain control position information GCRi.

For example, in the case of gain control position information GCR3in the example shown inFIG. 119, second gain control position information GCL3(=23) indicates the position of a release portion RE and the difference value WC3 thereof is equal to 0, and thus a 1-bit code “0” is employed as the code of the second gain control position information GCL3.

In the table shown inFIG. 120, a code with a particular number of bits is assigned to each value. Furthermore, in the table shown inFIG. 120, a procedure of determining a code for a value other than the values having corresponding assigned codes is defined (more specifically, the code is given by a formula 11+original value). According to this procedure, a 7-bit code is given by a combination of a 2-bit code “11” and a following 5-bit code indicating the gain control position information GC (original value, the gain control position information GCR in this specific case).

In the table shown inFIG. 121, a code with a particular number of bits is assigned to each value. Furthermore, in the table shown inFIG. 121, a procedure of determining a code for a value other than the values having corresponding assigned codes is defined (more specifically, the code is given by a formula 111+original value). According to this procedure, an 8-bit code is given by a combination of a 3-bit code “111” and a following 5-bit code indicating the gain control position information GC (original value, the gain control position information GCR in this specific case).

In the next step S384, the encoder101-12determines whether codes have been determined for all gain control position information GCR0to GCR11, that is, whether all gain control position information GCR0to GCR11have been encoded. If it is determined that all pieces of gain control position information GCRi have not been encoded, the process returns to step S381to perform the step S381and following steps to encode next unencoded gain control position information GCRi.

If it is determined in step S384that all gain control position information GCR0to GCR11have been encoded, the process proceeds to step S385. In step S385, the encoder101-12outputs the codes determined in step S383for the respective gain control position information GCR0to GCR11to the terminal connected to the switch103.

In step S386, the encoder101-12calculates the sum of the numbers of bits of the encoded gain control position information GCR0to GCR11and outputs the calculated sum to the decision unit102.

For example, in the case of 22 pieces of gain control position information GCR shown inFIG. 119, codes with numbers of bits such as those shown inFIG. 119are generated as a result of encoding, and thus the total number of bits of the codes becomes equal to 48. Thus, a signal indicating that the total number of bits is equal to 48 is output to the decision unit102.

If the conventional fixed-length (5-bit) encoding method were employed, the gain control position information GC in the example shown inFIG. 119would be encoded into codes with a total of 110 (=5×22) bits. Thus, the total number of bits of encoded data according to the present invention is smaller by 62 than that according to the conventional technique. In the encoding tables (FIGS. 120 and 121) employed in the present example, some values are encoded using escape codes. Alternatively, specific codes corresponding to respective values may be defined in the table for all values.

In the present example, the difference value WC2 is assumed to have such a characteristic shown in FIG.117. In a case in which the characteristic of the difference value WC2 varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the difference value WC2.

The encoding method employed by the encoder101-13is described.

As described earlier with reference toFIG. 90, the difference value VC2 obtained by subtracting gain control position information GCi-1of a lower frequency band immediately adjacent to gain control position information GCi from the gain control position information GCi has a high probability of becoming equal to a particular value.

Furthermore, in the case of stereo audio signals, as described earlier with reference toFIG. 108, the difference value WC1 obtained by subtracting gain control position information GCLi from gain control position information GCRi in the same frequency band has a high probability of becoming equal to a particular value.

Therefore, the difference value WC3 obtained by subtracting the difference value VC2 of the gain control position information GCLi from the difference value VC2 of the gain control position information GCRi has a high probability of taking a particular value (0 or a value whose absolute value is close to 0), as shown in FIG.122.

In view of the above, the encoder101-13encodes gain control position information GC such that either gain control position information GCL0to GCL11or gain control position information GCR0to GCR11, and codes with small numbers of bits are assigned to difference values WC3 having high occurrence probabilities.

The operation of the encoder101-13is described below with reference to a flow chart shown in FIG.123. Herein, it is assumed that the encoder101-13encodes gain control position information GCR.

In step S391, the encoder101-13detects gain control position information GCLi in one frequency band from gain control information GL0to GL11of the input left-channel signal and also detects gain control position information GCRi in the same frequency band from gain control information GR0to GR11of the input right-channel signal.

The encoder101-13then determines the difference value VC2 of the gain control position information GCLi by subtracting, from the gain control position information GCLi, the gain control position information GCLi-1of the encoding unit Ai-1which is in a lower frequency band adjacent to the frequency band of the encoding unit Ai and which was detected in previous execution of step S391.

The encoder101-13also determines the difference value VC2 of the gain control position information GCRi by subtracting, from the gain control position information GCRi, the gain control position information GCRi-1of the encoding unit Ai-1and which was detected in previous execution of step S391.

For example, in the case of gain control position information GCL3of gain control position information GCL0to GCL11shown inFIG. 124, the difference value VC2 of first gain control position information GCL3is given by a value (=−1, not shown) obtained by subtracting first gain control position information GCL2(=8) from the first gain control position information GCL3(=7), and the difference value VC2 of second gain control position information GCL3is given by a value (=11, not shown) obtained by subtracting second gain control position information GCL2(=10) from the second gain control position information GCL3(=21).

Furthermore, in the case of gain control position information GCR3of gain control position information GCR0to GCR11shown inFIG. 124, the difference value VC2 of first gain control position information GCR3is given by a value (=−1, not shown) obtained by subtracting first gain control position information GCR2(=8) from the first gain control position information GCR3(=7), and the difference value VC2 of second gain control position information GCR3is given by a value (=13, not shown) obtained by subtracting second gain control position information GCR2(=10) from the second gain control position information GCR3(=23).

In the next step S392, the encoder101-13determines the difference value WC3 by subtracting the difference value VC2 of the gain control position information GCLi from the difference value VC2 of the gain control position information GCRi.

Hereinafter, for simplicity, the difference value WC3 obtained by subtracting the difference value VC2 of the gain control position information GCLi from the difference value VC2 of the gain control position information GCRi will be referred to simply as the difference value WC3 of the gain control position information GCRi.

For example, in the case of gain control position information GCL3and gain control position information GCR3in the example shown inFIG. 124, the difference value WC3 of first gain control position information GCR3is given by a value (=0) obtained by subtracting the difference value VC2 (=−1) of first gain control position information GCL3(=7) from the difference value VC2 (=−1) of the first gain control position information GCR3(=7), and the difference value WC3 of second gain control position information GCR3is given by a value (=2) obtained by subtracting the difference value VC2 (=11) of second gain control position information GCL3(=21) from the difference value VC2 (=13) of the second gain control position information GCR3(=23).

In step S393, the encoder101-13determines whether the gain control position information GCRi indicates the position of an attack portion AT or a release portion RE, in a similar manner to the encoder101-2. In a case in which the gain control position information GCRi indicates the position of an attack portion AT, the encoder101-13retrieves a code corresponding to the difference value WC3 of the gain control position information GCRi from a table shown in FIG.125and employs the retrieved code as the code for the gain control position information GCRi.

For example, in the case of first gain control position information GCR3(=7) of gain control position information GCR3in the example shown inFIG. 124, the first gain control position information GCR3indicates the position of an attack portion AT and the difference value WC3 thereof is equal to 0, and thus a 1-bit code “0” is employed as the code of the first gain control position information GCR3.

On the other hand, in a case in which the gain control position information GCRi indicates the position of a release portion RE, a code corresponding to the difference value WC3 of the gain control position information GCRi is retrieved from a table shown in FIG.126and the retrieved code is employed as the code of the gain control position information GCRi.

For example, in the case of second gain control position information GCR3(=23) of the gain control position information GCR3in the example shown inFIG. 124, the second gain control position information GCR3indicates the position of a release portion RE and the difference value WC3 thereof is equal to 2, and thus a 2-bit code “110” is employed as the code of the second gain control position information GCR3.

In the table shown inFIG. 125, a 1-bit code “0” is assigned to a value of 0. Furthermore, in the table shown inFIG. 125, a procedure of determining a code for a value other 0 is defined (more specifically, the code is given by a formula 1+original value). According to this procedure, a 5-bit code is given by a combination of a 1-bit code “1” and a following 5-bit code indicating the gain control position information GC (original value, the gain control position information GCR in this specific case).

In the table shown inFIG. 126, a 1-bit code “0” is assigned to a value of 0 and a 2-bit code “10” is assigned to a value of 2. Furthermore, in the table shown inFIG. 126, a procedure of determining a code for a value other 0 and 2 is defined (more specifically, the code is given by a formula 11+original value). According to this procedure, a 7-bit code is given by a combination of a 2-bit code “11” and a following 5-bit code indicating the gain control position information GC (original value, the gain control position information GCR in this specific case).

In the next step S394, the encoder101-13determines whether codes have been determined for all gain control position information GCR0to GCR11, that is, whether all gain control position information GCR0to GCR11have been encoded. If it is determined that all pieces of gain control position information GCRi have not been encoded, the process returns to step S391to perform the step S391and following steps to encode next unencoded gain control position information GCRi.

If it is determined in step S394that all gain control position information GCR0to GCR11have been encoded, the process proceeds to step S395. In step S395, the encoder101-13outputs the codes determined in step S393for the respective gain control position information GCR0to GCR11to the terminal connected to the switch103.

In step S396, the encoder101-13calculates the sum of the numbers of bits of the encoded gain control position information GCR0to GCR11and outputs the calculated sum to the decision unit102.

For example, in the case of 22 pieces of gain control position information GCR shown inFIG. 124, codes with numbers of bits such as those shown inFIG. 124are generated as a result of encoding, and thus a signal indicating that the total number of bits is equal to 50 is output to the decision unit102.

If the conventional fixed-length (5-bit) encoding method were employed, the gain control position information GCR in the example shown inFIG. 124would be encoded into codes with a total of 110 (=5×22) bits. Thus, in this example, the total number of bits of encoded data according to the present invention is smaller by 60 than that according to the conventional technique.

In the encoding tables (FIGS. 125 and 126) employed in the present example, some values are encoded using escape codes. Alternatively, specific codes corresponding to respective values may be defined in the table for all values.

In the present example, the difference value WC3 is assumed to have such a characteristic shown in FIG.122. In a case in which the characteristic of the difference value WC3 varies from one encoding unit Ai to another, the coding table may be switched depending on the characteristic of the difference value WC3.

In addition to above-described various methods employed by the gain control position information encoder73to encode the gain control position information, there may be provided an additional encoder for encoding the gain control number into a code with a fixed bit length according to the conventional technique.

FIG. 127shows an example of a construction of a decoding apparatus151according to the present invention. In addition to the parts employed in the decoding apparatus2shown inFIG. 5, the encoding apparatus151further includes gain control information decoder161. The other parts are similar to those of the decoding apparatus2shown in FIG.5and thus they are not described in further detail herein.

The demultiplexer31processes encoded data so as to separate it into decoded normalized coefficients B0to B11, decoded quantization step size information D0to D11, decoded quantized coefficients F0to F11, codes into which gain control information G0to G11have been encoded (hereinafter, such codes will be referred to as encoded gain control information GX), and information indicating the encoding method applied to the gain control information G (hereinafter, referred to as gain control information encoding information GY).

The separated normalized coefficients B0to B11, quantization step size information D0to D11, and quantized coefficients F0to F11are supplied to corresponding dequantizers/denormalizers32-1to32-12from the demultiplexer31, while the encoded gain control information GX and the gain control information encoding information GY are supplied to the gain control information decoder161.

The dequantizer/denormalizer32dequantizes the quantized coefficients F by employing a quantization step size corresponding to that indicated by the quantization step size information D and multiplies the normalized data C obtained via the dequantization by a value corresponding to the normalized coefficient B (thereby denormalizing the normalized data C. The signal obtained as a result of the above process is supplied to the inverse spectrum converter33.

FIG. 128shows the construction of the gain control information decoder161, in which the encoded gain control information GX and the gain control information encoding information GY received from the demultiplexer31are applied to a gain control number decoder171, a gain control amount information decoder172, and a gain control position information decoder173of the gain control information decoder161.

The gain control number decoder171decodes the encoded gain control number GAX included in the input encoded gain control information GX in accordance with the gain control number encoding information GAY included in the input gain control information encoding information GY. That is, the gain control number decoder171performs decoding corresponding to the encoding performed on the gain control number GA by the encoder51. The gain control numbers GA0to GA11obtained via the decoding process are supplied to inverse spectrum converters33-1to33-12, respectively, in synchronization with respective gain control amount information GB0to GB11output from the gain control amount information decoder172and respective gain control position information GC0to GC11output from the gain control position information decoder173.

The gain control amount information decoder172decodes the encoded gain control amount information GBX included in the input encoded gain control information GX in accordance with the gain control amount information encoding information GBY included in the input gain control information encoding information GY. That is, the gain control amount information decoder172performs decoding corresponding to the encoding performed on the gain control amount information GB by the encoder51. The gain control amount information GB0to GB11obtained via the decoding process are supplied to inverse spectrum converters33-1to33-12, respectively, in synchronization with respective gain control numbers GA0to GA11output from the gain control number decoder171and respective gain control position information GC0to GC11output from the gain control position information decoder173.

The gain control position information decoder173decodes the encoded gain control position information GCX included in the input encoded gain control information GX in accordance with the input gain control position information encoding information GCY included in the input gain control information encoding information GY. That is, the gain control position information decoder173performs decoding corresponding to the encoding performed on the gain control position information GC by the encoder51. The gain control position information GC0to GC11obtained via the decoding process are supplied to inverse spectrum converters33-1to33-12, respectively, in synchronization with respective gain control numbers GA0to GA11output from the gain control number decoder171and respective gain control amount information GB0to GB11output from the gain control amount information decoder172.

Referring again toFIG. 127, the inverse spectrum converter33performs an inverse spectrum conversion which is an inverse process of the spectrum conversion performed in the encoding apparatus51.

Furthermore, the inverse spectrum converter33performs a gain control adjustment on the signal obtained as the result of the inverse spectrum conversion in accordance with the gain control information G received from the gain control information decoder161. An encoding unit A obtained as the result is output to a band combiner34.

The band combiner34combines the encoding units A received from the inverse spectrum converter33such that overlapped sample data of the block are interfered with each other, thereby reconstructing an audio signal.

FIG. 129shows an example of a construction of the gain control number decoder171. Although in the present example, the gain control number decoder171includes nine decoders181-1to181-8, the number of decoders is not limited to eight, but the gain control number decoder171may include an arbitrary plural number of decoders181.

The encoded gain control information GX is input to the eight decoders181-1to181-8, as required. In the respective decoders181-1to181-8, the encoded gain control number GAX included in the input encoded gain control information GX is subjected to decoding processes corresponding to the encoding processes performed by the respective encoders81-1to81-8(FIG. 9) of the gain control number encoder71(FIG. 8) of the gain control information encoder61in the encoding apparatus51. The decoded results are output from terminals connected to a switch184.

A decision unit182detects, from the gain control number encoding information GAY included in the input gain control information encoding information GY, encoding information associated with the encoded gain control number GAX (more specifically, detects which one of encoders81encoded the gain control number GAX or detects which table was used in the encoding of the gain control number GAX). In accordance with the detected encoding information, the decision unit182selects a decoder181to be used in decoding.

The decision unit182controls the switch183so that the encoded gain control information GX is input to the selected decoder181and also controls the switch184so that the output from the selected decoder181is properly supplied to inverse spectrum converters33.

FIG. 130shows an example of a construction of the gain control amount information decoder172. Although in the present example, the gain control amount information decoder172includes twelve decoders191-1to191-12, the number of decoders is not limited to twelve, but the gain control amount information decoder172may include an arbitrary plural number of decoders191.

The encoded gain control information GX is input to the twelve decoders191-1to191-12, as required. In the respective decoders191-1to191-12, the encoded gain control amount information GBX included in the input encoded gain control information GX is subjected to decoding processes corresponding to the encoding processes performed by the respective encoders91-1to91-12(FIG. 35) of the gain control amount information encoder72of the gain control information encoder61in the encoding apparatus51. The decoded results are output from terminals connected to a switch194.

A decision unit192detects, from the gain control amount information encoding information GBY included in the input gain control information encoding information GY, encoding information associated with the encoded gain control amount information GBX (more specifically, detects which one of encoders91encoded the gain control amount information GBX or detects which table was used in the encoding of the gain control amount information GBX In accordance with the detected encoding information, the decision unit192selects a decoder191to be used in decoding.

The decision unit192controls the switch193so that the encoded gain control information GX is input to the selected decoder191and also controls the switch194so that the output from the selected decoder191is properly supplied to inverse spectrum converters33.

FIG. 131shows an example of a construction of the gain control position information decoder173. Although in the present example, the gain control position information decoder173includes twelve decoders201-1to201-12, the number of decoders is not limited to twelve, but the gain control position information decoder173may include an arbitrary plural number of decoders201.

The encoded gain control information GX is input to the twelve decoders201-1to201-12, as required. In the respective decoders201-1to201-12, the encoded gain control position information GCX included in the input encoded gain control information GX is subjected to decoding processes corresponding to the encoding processes performed by the respective encoders101-1to101-12(FIG. 76) of the gain control position information encoder73of the gain control information encoder61in the encoding apparatus51. The decoded results are output from terminals connected to a switch204.

A decision unit202detects, from the gain control position information encoding information GCY included in the input gain control information encoding information GY, encoding information associated with the encoded gain control position information GCX (more specifically, detects which one of encoders101encoded the gain control position information GCX or detects which table was used in the encoding of the gain control position information GCX). In accordance with the detected encoding information, the decision unit202selects a decoder201to be used in decoding.

The decision unit202controls the switch203so that the encoded gain control information GX is input to the selected decoder201and also controls the switch204so that the output from the selected decoder201is properly supplied to inverse spectrum converters33.

FIG. 132shows another example of a construction of the encoding apparatus51. In addition to the parts employed in the encoding apparatus51shown inFIG. 7, the encoding apparatus51further includes a normalized coefficient encoder251and a quantization step size information encoder252.

The normalizers13-1to13-12detect a signal component having a greatest absolute value from the spectral component signals S0to S11every unit of time and normalize the spectral component signals S0to S11by employing relative values of coefficients with respect to the detected greatest value as the normalized spectral component signals B0to B11.

The quantizers13-1to13-12supply the normalized data C0to C11obtained by normalizing the spectral component signals S0to S11to respective quantizers15-1to15-12corresponding to the respective bands, and supply the calculated normalized coefficients B0to B11to the normalized coefficient encoder251.

On the basis of the spectral component signals S0to S11received from the spectrum converters12-1to12-12, a quantization step size setting unit14determines quantization step sizes to be used in quantization of the normalized data C0to C11, and outputs quantization step size information D0to D11indicating the determined quantization step sizes to the corresponding quantizers15-1to15-12and also to the quantization step size information encoder252.

The normalized coefficient encoder251encodes the normalized coefficients B0to B11received from the normalizers13-1to13-12by means of various different encoding methods. The normalized coefficient encoder251detects encoded normalized coefficients B0to B11which have been encoded into the least number of bits of those encoded by means of various difference encoding methods, and the normalized coefficient encoder251outputs the detected encoded normalized coefficients B0to B11to the multiplexer16.

The quantization step size information encoder252encodes the quantization step size information D0to D11received from the quantization step size setting unit14by means of various different encoding methods. The quantization step size information encoder252detects encoded quantization step size information D0to D11which have been encoded into the least number of bits of those encoded by means of various difference encoding methods, and the normalized coefficient encoder251outputs the detected encoded quantization step size information D0to D11to the multiplexer16.

That is, in the present example, not only the gain control information G but also the normalized coefficient B and the quantization step size information D are encoded into variable-length codes to further improve encoding efficiency associated with the quantized coefficient F.

FIG. 133shows an example of a construction of a decoding apparatus151for decoding the encoded data generated by the encoding apparatus51shown in FIG.132. This decoding apparatus151further includes a normalized coefficient decoder351and a quantization step size information decoder352in addition to the parts employed in the decoding apparatus151shown in FIG.127.

The demultiplexer31decodes encoded data and separates the decoded data into encoded gain control information G0to G11(encoded gain control information GX), information indicating the encoding method applied to the gain control information G (gain control information encoding information GY), encoded normalized coefficients B0to B11(hereinafter, referred to simply as encoded normalized coefficients), information indicating the encoding method applied to the normalized coefficients B (hereinafter, referred to as normalized coefficient encoding information), encoded quantization step size information D0to D11(hereinafter, referred to as encoded quantization step size information, information indicating the encoding method applied to the quantization step size information D (hereinafter, referred to as quantization step size information encoding information), and decoded quantized coefficients F0to F11.

The demultiplexer31outputs the encoded gain control information GX and the gain control information encoding information GY to the gain control information decoder161, the encoded normalized coefficients and the encoded normalized coefficient encoding information to a normalized coefficient decoder351, and the encoded quantization step size information and the quantization step size information encoding information to a quantization step size information decoder352.

The demultiplexer31also outputs the respective quantized coefficients F0to F11to corresponding dequantizers/denormalizers32-1to32-14.

The normalized coefficient decoder351decodes the encoded normalized coefficients received from the demultiplexer31, by a decoding method corresponding to the normalized coefficient encoding information, that is, a decoding method corresponding to the encoding method employed by the normalized coefficient encoder251of the encoding apparatus51in the encoding of the normalized coefficient B. The resultant decoded normalized coefficients B0to B11are respectively output to the corresponding dequantizers/denormalizers32-1to32-12.

The quantization step size information decoder352decodes the encoded quantization step size information received from the demultiplexer31by a decoding method corresponding to the quantization step size information encoding information, that is, by the decoding method corresponding to the encoding method employed by the quantization step size information encoder252of the encoding apparatus51in the encoding of the quantization step size information D. The resultant decoded quantization step size information D0to D11are respectively output to the corresponding dequantizers/denormalizers32-1to32-12.

The process described above may be performed by hardware or software. In the case in which the processes are performed by software, a software program is installed on a computer, and the computer executes the program so as to realize the functions of the encoding apparatus51or the decoding apparatus151described above.

FIG. 134is a block diagram showing a construction of a computer501used to realize the functions of the encoding apparatus51or the decoding apparatus151described above. An input/output interface516is connected to a CPU (Central Processing Unit)511via a bus515. If the CPU511receives, via the input/output interface516, a command issued by a user using an input unit518including a keyboard, a mouse, or the like, the CPU511loads a program into a RAM (Random Access Memory)513from a ROM (Random Only Memory)512, a hard disk514, or a removable storage medium such as a magnetic disk531, an optical disk532, a magnetooptical disk533, or a semiconductor memory534mounted on a drive520and executes the loaded program thereby performing various processes described above. The CPU511outputs the result of the process, as required, to an output unit517such as an LCD (Liquid Crystal Display) via the input/output interface516. The program may be supplied to users in various manners. For example, the program may be stored in advance in the hard disk514or the ROM512and the program may be supplied to users together with the computer501, or the program may be supplied in the form of a package medium such as a magnetic disk531, an optical disk532, a magnetooptical disk533, or a semiconductor memory534. The program may also be downloaded onto the hard disk514via a communication unit519and via a satellite or a network.

In the present description, the steps described in the program stored in the storage medium may be performed either in time sequence in accordance with the order described in the program or in a parallel or separate fashion.

Industrial Applicability

The present invention makes it possible to achieve an improvement in encoding efficiency.