Audio decoding device, audio decoding method, audio decoding program, audio encoding device, audio encoding method, and audio encoding program

In an audio decoding device of an embodiment, a plurality of decoding units execute different audio decoding schemes, respectively, to generate audio signals from coded sequences. An extraction unit extracts long-term encoding scheme information from a stream. The stream has a plurality of frames each including a coded sequence of an audio signal. The long-term encoding scheme information is a unit information for multiple frames and indicates that a common audio encoding scheme was used to generate coded sequences of the multiple frames. According to the extracted long-term encoding scheme information, a selection unit selects, from the plurality of decoding units, a decoding unit to be used commonly to decode the coded sequences of the multiple frames.

TECHNICAL FIELD

A variety of aspects of the present invention relate to an audio decoding device, audio decoding method, audio decoding program, audio encoding device, audio encoding method, and audio encoding program.

BACKGROUND ART

In order to efficiently encode both speech and music signals, a complex audio encoding system is found effective which is used to switch between an encoding scheme suitable for speech signal and an encoding scheme suitable for music signal.

Patent Literature 1 below describes such a complex audio encoding system. In the audio encoding system described in Patent Literature 1, each frame is added with information indicative of the type of an encoding scheme used for generation of a coded sequence for the frame.

The audio encoding in MPEG USAC (Unified Speech and Audio Coding) uses three encoding processes, i.e., FD (Modified AAC (Advanced Audio Coding)), TCX (transform coded excitation), and ACELP (Algebraic Code Excited Linear Prediction). In MPEG USAC, TCX and ACELP are collectively recognized as LPD. In MPEG USAC, each frame is added with 1-bit information to indicate whether FD or LPD was used. When LPD is used in MPEG USAC, each frame is added with 4-bit information to define a procedure of using a combination of TCX and ACELP.

Furthermore, AMR-WB+ (Extended Adaptive Multi-Rate Wideband) of Third Generation Partnership Project (3GPP) uses two encoding schemes, i.e., TCX and ACELP. In AMR-WB+, each frame is added with 2-bit information to discern use of TCX or ACELP.

CITATION LIST

SUMMARY OF THE INVENTION

Technical Problem

There are audio signals in some cases which consist mainly of speech signals based on human voice, and there are audio signals in some other cases which consist mainly of music signals. In encoding such audio signals, a common encoding scheme is expected to be used for multiple frames. For such audio signals, there is demand for a technique to enable more efficient information transmission from the encoder side to the decoder side, for such audio signals.

It is an object of various aspects of the present invention to provide an audio encoding device, audio encoding method, and audio encoding program capable of generating a small-size stream and an audio decoding device, audio decoding method, and audio decoding program capable of using a small-size stream.

Solution to Problem

An aspect of the present invention relates to audio encoding and may include an audio encoding device, audio encoding method, and audio encoding program described below:

An audio encoding device according to an aspect of the present invention comprises a plurality of encoding units, a selection unit, a generation unit, and an output unit. The plurality of encoding units each perform a different audio encoding scheme to generate a coded sequence from audio signals. The selection unit selects, from the plurality of encoding units, an encoding unit which may be used commonly to encode audio signals of multiple frames, or selects from the same a set of encoding units which may each be used commonly to encode audio signals of multiple super-frames including a plurality of frames. The generation unit generates long-term encoding scheme information. The long-term encoding scheme information is a unit of information for multiple frames and indicates that a common audio encoding scheme was used to generate coded sequences of the multiple frames. Alternatively, the long-term encoding scheme information is a unit of information for multiple super-frames and indicates that a set of common audio encoding schemes were used to generate coded sequences of the multiple super-frames. The output unit outputs a stream which includes the coded sequences of the multiple frames generated by the encoding unit selected by the selection unit, or the coded sequences of the multiple super-frames generated by the set of encoding units selected by the selection unit, and the long-term encoding scheme information.

An audio encoding method according to another aspect of the present invention comprises: (a) a step of selecting, from a plurality of audio encoding schemes each different from each other, an audio encoding scheme which may be used commonly to encode audio signals of multiple frames, or selecting from the same a set of audio encoding schemes which may each be used commonly to encode audio signals of multiple super-frames which include a plurality of frames; (b) a step of encoding the audio signals of the multiple frames with the selected audio encoding scheme to generate coded sequences of the multiple frames, or encoding the audio signals of the multiple super-frames with the selected set of audio encoding schemes to generate coded sequences of the multiple super-frames; (c) a step of generating a unit of long-term encoding scheme information for the multiple frames indicative of the common audio encoding scheme used to generate the coded sequences of the multiple frames, or a unit of long-term encoding scheme information for the multiple super-frames indicative of the set of common audio encoding processes used to generate the coded sequences of the multiple super-frames; and (d) a step of outputting a stream including the coded sequences of the multiple frames or the coded sequences of the multiple super-frames, and the long-term encoding scheme information.

An audio encoding program according to another aspect of the present invention causes a computer to function as a plurality of encoding units, a selection unit, a generation unit, and an output unit.

Since the audio encoding device, the audio encoding method, and the audio encoding program according to the aspects of the present invention employ long-term encoding scheme information, the encoder side can notify the common audio encoding scheme used to generate the coded sequences of the multiple frames or the set of common audio encoding schemes used to generate the coded sequences of the multiple super-frames. With the long-term encoding scheme information so notified, the decoder side can select a common audio decoding scheme or a common set of audio decoding schemes. Therefore, it is possible to reduce an amount of information included in the stream and used to specify the audio encoding scheme.

In an embodiment, the stream may be configured to include multiple frames in which each of the frames coming subsequent to the lead frame does not have to include information for specifying an audio encoding scheme used to generate a coded sequence of the subsequent frames.

In another embodiment, an encoding unit (or a predetermined audio encoding scheme) may be pre-selected for the multiple frames from the plurality of encoding units (or the plurality of audio encoding schemes), and the stream may include no information for specifying the audio encoding scheme used to generate the coded sequences of the multiple frames. This embodiment enables a further reduction in the information amount of the stream. In another embodiment, the long-term encoding scheme information may be 1-bit information. This embodiment enables a further reduction in the information amount of the stream.

Aspects of the present invention relate to audio decoding and may include an audio decoding device, audio decoding method, and audio decoding program.

An audio decoding device according to an aspect of the present invention comprises a plurality of decoding units, an extraction unit, and a selection unit. The plurality of decoding units each perform a different audio decoding scheme to generate audio signals from coded sequences. The extraction unit extracts long-term encoding scheme information from a stream. The stream has multiple frames each including a coded sequence of an audio signal and/or multiple super-frames each including a plurality of frames. The long-term encoding scheme information is a unit of long-term encoding scheme information for multiple frames and indicates that a common audio encoding scheme was used to generate coded sequences of the multiple frames, or the long-term encoding scheme information is a unit of long-term encoding scheme information for multiple super-frames and indicates that a set of common audio encoding schemes were used to generate coded sequences of the multiple super-frames. The selection unit selects, from the plurality of decoding units, a decoding unit to be used commonly to decode the coded sequences of the multiple frames in response to extraction of the long-term encoding scheme information. Alternatively, the selection unit selects, from the plurality of decoding units, a set of decoding units to be used commonly to decode the coded sequences of the multiple super-frames.

An audio decoding method according to another aspect of the present invention comprises: (a) a step of extracting, from a stream having multiple frames each including a coded sequence of an audio signal and/or multiple super-frames each including a plurality of frames, a single unit long-term encoding scheme information for the multiple frames which indicates a common audio encoding used to generate the coded sequences of the multiple frames, or a single unit long-term encoding scheme information for the multiple super-frames which indicates a set of common audio encoding schemes used to generate the coded sequences of the multiple super-frames; (b) in response to extraction of the long-term encoding scheme information, a step of selecting, from a plurality of different audio decoding schemes, an audio decoding scheme used commonly to decode the coded sequences of the multiple frames or selecting from the same a set of audio decoding schemes used commonly to decode the coded sequences of the multiple super-frames; and (c) a step of decoding the coded sequences of the multiple frames with the selected audio decoding scheme or decoding the coded sequences of the multiple super-frames with the set of selected audio decoding schemes.

An audio decoding program according to another aspect of the present invention causes a computer to function as the plurality of decoding units, the extraction unit and the selection unit.

The audio decoding device, audio decoding method, and audio decoding program according to another aspect of the present invention can generate the audio signals from the stream generated based on the aforementioned aspects of the present invention concerning encoding.

In an embodiment, the stream may be configured so that each of the frames coming subsequent to the lead frame in the plurality of frames does not include information for specifying an audio encoding scheme used to generate coded sequences of the subsequent frames.

In another embodiment, a decoding unit (or a predetermined audio decoding scheme) may be pre-selected form the multiple frames from the plurality of decoding units (or the plurality of audio decoding schemes), and the stream may include no information for specifying the audio encoding scheme used to generate the coded sequences of the multiple frames. This embodiment enables a further reduction in the amount of information in the stream. In another embodiment, the long-term encoding scheme information may be 1-bit information. This embodiment enables a further reduction in the amount of information in the stream.

Advantageous Effect of Invention

As described above, the aspects of the present invention provide an audio encoding device, an audio encoding method, and an audio encoding program which generate a smaller size stream, and provide an audio decoding device, an audio decoding method, and an audio decoding program which use the smaller size stream.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Various embodiments will be described below in detail with reference to the drawings. Identical or equivalent portions will be denoted by the same reference signs throughout the drawings.

FIG. 1is a drawing showing an audio encoding device according to an embodiment. The audio encoding device10shown inFIG. 1is a device that encodes audio signals of multiple frames fed to an input terminal In1, using a common audio encoding scheme. As shown inFIG. 1, the audio encoding device10is formed with a plurality of encoding units10a1-10an, a selection unit10b, a generation unit10c, and an output unit10d. The number n herein is an integer not less than 2.

The encoding units10a1-10aneach perform a different audio encoding scheme to generate coded sequences from the audio signals. These audio encoding schemes to be adopted may be any audio encoding schemes. For example, the audio encoding schemes adoptable herein may include Modified AAC encoding scheme, ACELP encoding scheme, and TCX encoding scheme.

The selection unit10bselects one encoding unit from the encoding units10a1-10anaccording to input information fed to an input terminal In2. The input information is, for example, information entered by a user. In one embodiment, this input information may be information for specifying an audio encoding scheme used commonly for audio signals of multiple frames. The selection unit10bcontrols a switch SW to selectively connect the input terminal In1to an encoding unit of the encoding units10a1-10anto perform an audio encoding scheme specified by the input information.

The generation unit10cgenerates long-term encoding scheme information, based on the input information. The long-term encoding scheme information indicates an audio encoding scheme used commonly to generate coded sequences of the multiple frames. The long-term encoding scheme information may be a unique word identifiable by the decoder side. In one embodiment, it may be any information that enables the decoder side to identify an audio encoding scheme used commonly to generate coded sequences of the multiple frames.

The output unit10doutputs a stream which includes the coded sequences of the multiple frames generated by the selected encoding unit and the long-term encoding scheme information generated by the generation unit10c.

FIG. 2is a drawing showing an exemplary stream generated by the audio encoding device according to one embodiment. The stream shown inFIG. 2contains the first to the m-th frame. In this example, m is an integer not less than 2. In the description hereinafter, the frames in a stream will sometimes be referred to as output frames. Each output frame contains, as to an input audio signal, a coded sequence generated from the audio signal of a frame corresponding to the output frame. The first frame of the stream may include the long-term encoding scheme information as parameter information.

Described below is an operation of the audio encoding device10and an audio encoding method of an embodiment.FIG. 3is a flowchart showing the audio encoding method according to an embodiment. In the embodiment, as shown inFIG. 3, in step S10-1, the selection unit10bselects one encoding unit from the encoding units10a1-10an, based on the input information.

Next, in step S10-2, the generation unit10cgenerates long-term encoding scheme information, based on the input information. In step S10-3, the output unit10dadds the long-term encoding scheme information as parameter information to the first frame.

Next, in step S10-4, the encoding unit selected by the selection unit10bencodes an audio signal of a current encoding target frame to generate a coded sequence. In subsequent step S10-5, the output unit10dadds the coded sequence, generated by the encoding unit, into an output frame in a stream corresponding to the encoding target frame and outputs the output frame.

In subsequent step S10-5, it is determined whether there is any frame left to be encoded. The process ends when there is no frame left uncoded. On the other hand, when there is a further frame left to be encoded, the processes sequential from step S10-4are repeated for the target uncoded frame.

According to the audio encoding device10and the audio encoding method of an embodiment described above, the long-term encoding scheme information is included only in the first frame in the stream. Namely, no information for specifying the used audio encoding scheme is included in the frames subsequent to the first frame in the stream. Therefore, it is possible to generate an efficient smaller size stream.

Described below is a program that causes a computer to operate as the audio encoding device10.FIG. 4is a drawing showing an audio encoding program according to an embodiment.FIG. 5is a drawing showing the hardware configuration of a computer according to an embodiment.FIG. 6is a perspective view showing the computer according to the embodiment. The audio encoding program P10shown inFIG. 4causes the computer C10shown inFIG. 5to operate as the audio encoding device10. The program described in the present specification can operates any device, other than the computer shown inFIG. 5, such as a cell phone or a mobile information terminal, according to the program.

The audio encoding program P10may be stored in a recording medium SM. The recording medium SM may, for example, be a recording medium such as a floppy disk, CD-ROM, DVD, or ROM, or a semiconductor memory or the like.

As shown inFIG. 5, the computer C10may be provided with a reading device C12such as a floppy disk drive unit, CD-ROM drive unit, or DVD drive unit, a working memory (RAM) C14in which an operating system resides, a memory C16to store a program recorded in the recording medium SM, a monitor device C18such as a display, a mouse C20and a keyboard C22as input devices, a communication device C24to perform transmission and reception of data or the like, and a CPU C26to control the execution of the program.

When the recording medium SM is incorporated into the reading device C12, the computer C10becomes accessible to the audio encoding program P10stored in the recording medium SM, through the reading device C12, and becomes able to operate as the audio encoding device10according to the program P10.

As shown inFIG. 6, the audio encoding program P10may be provided through a network in the form of a computer data signal CW superimposed on a carrier wave. In this case, the computer C10can store the audio encoding program P10received by the communication device C24into the memory C16and execute the program P10.

As shown inFIG. 4, the audio encoding program P10is provided with a plurality of encoding modules M10a1-M10an, a selection module M10b, a generation module M10c, and an output module M10d.

In one embodiment, the encoding module sections M10a1-M10an, the selection module M10b, the generation module M10c, and the output module M10dcause the computer C10to perform the same functions as performed by the encoding units10a1-10an, the selection unit10b, the generation unit10c, and the output unit10d, respectively. According to this audio encoding program P10, the computer C10becomes able to operate as the audio encoding device10.

A modified embodiment of the audio encoding device10will be described below.FIG. 7is a drawing showing an audio encoding device according to the modification embodiment. The encoding unit (encoding scheme) of the audio encoding device10is selected based on input information. On the other hand, an encoding unit of an audio encoding device10A shown inFIG. 7is selected based on a result of an analysis made on an audio signal. For this purpose, the audio encoding device10A is provided with an analysis unit10e.

The analysis unit10eanalyzes audio signals of multiple frames to determine an audio encoding scheme suitable to encode the audio signals of the multiple frames. The analysis unit10esupplies information for specifying the determined audio encoding scheme to the selection unit10bto instruct the selection unit10bto select a encoding unit to execute the audio encoding scheme. Furthermore, the analysis unit10esupplies the information for specifying the determined audio encoding scheme to the generation unit10cto instruct the generation unit10cto generate a long-term encoding scheme information.

The analysis unit10emay analyze, for example, a tonality, a pitch period, a temporal envelope, or a transient component (sudden signal rise/fall) of an audio signal. For example, when a tonality of the audio signal is stronger than a predetermined tonality, the analysis unit10emay determine to use an audio encoding scheme that performs encoding in the frequency domain. Furthermore, for example, when a pitch period of the audio signal is within a predetermined range, the analysis unit10emay determine to use an audio encoding scheme suitable to encode the audio signal. Furthermore, for example, when a variation of the temporal envelope of the audio signal is larger than a predetermined variation or when the audio signal includes a transient component, the analysis unit10emay determine to use an audio encoding scheme that performs encoding in the time domain.

Described below is an audio decoding device that decodes a stream generated by the audio encoding device10.FIG. 8is a drawing showing an audio decoding device according to an embodiment. An audio decoding device12shown inFIG. 8is comprised of a plurality of decoding units12a1-12an, an extraction unit12b, and a selection unit12c. The decoding units12a1-12aneach execute a different audio decoding scheme to generate audio signals from coded sequences. The schemes performed by the decoding units12a1-12anare complementary to the schemes performed by the encoding units10a1-10an.

The extraction unit12bextracts a long-term encoding scheme information (cf.FIG. 3) from a stream fed to an input terminal In. The extraction unit12bsupplies the extracted long-term encoding scheme information to the selection unit12cand outputs the rest of the stream exclusive of the long-term encoding scheme information to a switch SW.

The selection unit12ccontrols a switch SW, based on the long-term encoding scheme information. The selection unit12cselects, from the decoding units12a1-12an, a decoding unit to execute a decoding scheme specified based on the long-term encoding scheme information. The selection unit12ccontrols the switch SW so as to connect multiple frames in the stream to the selected decoding unit.

Described below is an operation of the audio decoding device12and an audio decoding method according to an embodiment.FIG. 9is a flowchart showing an audio decoding method according to an embodiment. In the embodiment, as shown inFIG. 9, in step S12-1, the extraction unit12bextracts a long-term encoding scheme information from a stream. In step S12-2, the selection unit12cselects one decoding unit from the decoding units12a1-12anaccording to the extracted long-term encoding scheme information.

In step S12-3, the selected decoding unit decodes a coded sequence of a decoding target frame. Next, it is determined in step S12-4whether there is any frame left to be decoded. When there is no frame left undecoded, the process ends. On the other hand, when there is a frame left to be decoded, the processes including step S12-3are repeated for a target frame, using the decoding unit selected in step S12-2.

Described below is an audio decoding program that causes a computer to operate as the audio decoding device12.FIG. 10shows an audio decoding program according to one embodiment.

An audio decoding program P12shown inFIG. 10may be executed in the computer shown inFIGS. 5 and 6. The audio decoding program P12may be provided in the same manner as the audio encoding program P10is provided.

As shown inFIG. 10, the audio decoding program P12is comprised of decoding modules M12a1-M12an, an extraction module M12b, and a selection module M12c. The decoding modules M12a1-M12an, the extraction module M12b, and the selection module M12ccause the computer C10to perform the same functions as performed by the decoding units12a1-12an, the extraction unit12b, and the selection unit12c, respectively.

Described below is an audio encoding device according to another embodiment.FIG. 11is a drawing showing an audio encoding device according to another embodiment. An audio encoding device14shown inFIG. 11may be used in an extension of MPEG USAC.

FIG. 12shows a stream generated according to the conventional MPEG USAC and a stream generated by the audio encoding device shown inFIG. 11. As shown inFIG. 12, in the conventional MPEG USAC, each frame in the stream is added with information i.e., with 1-bit core_mode, indicating whether FD (Modified AAC) or LPD (ACELP or TCX) was used. In the conventional MPEG USAC, a frame on which LPD is performed has a super-frame structure including four frames. When LPD is performed, a super-frame is added with information i.e., 4-bit lpd_mode, indicating whether ACELP or TXC was performed to encode each of frames in the super-frame.

The audio encoding device14shown inFIG. 11encodes audio signals of all frames by a common audio encoding scheme. The audio encoding device14also selectively perform an audio encoding scheme on the respective frames, frame by frame, in the same manner as in the case of the conventional MPEG_USAC. In one embodiment, the audio encoding device may use LPD, i.e., a set of audio encoding schemes, commonly on every super-frame.

As shown inFIG. 11, the audio encoding device14is comprised of an ACELP encoding unit14a1, a TCX encoding unit14a2, a Modified AAC encoding unit14a3, a selection unit14b, a generation unit14c, an output unit14d, a header generation unit14e, a first judgment unit14f, a core_mode generation unit14g, a second judgment unit14h, an lpd_mode generation unit14i, an MPS encoding unit14m, and an SBR encoding unit14n.

The MPS encoding unit14mreceives an audio signal fed to an input terminal In1. The audio signal fed to the MPS encoding unit14mmay be a multichannel audio signal of two or more channels. The MPS encoding unit14mexpresses a multichannel audio signal of each frame with an audio signal of channels whose channel number is less than the number of channels in the multichannel signal and a parameter for decoding the multichannel audio signal from the audio signal of channels whose channel number is less than the aforementioned number.

When the multichannel audio signal is a stereo signal, the MPS encoding unit14mdownmixes the stereo signal to a monaural audio signal. The MPS encoding unit14mgenerates a level difference, a phase difference, and/or a correlation value between the monaural signal and each channel of the stereo signal, as a parameter for decoding the stereo signal from the monaural signal. The MPS encoding unit14moutputs the generated monaural signal to the SBR encoding unit14nand outputs encoded data obtained by encoding the generated parameter to the output unit14d. The stereo signal may be expressed with the monaural signal and a residual signal and with the parameter.

The SBR encoding unit14nreceives the audio signal of each frame from the MPS encoding unit14m. The audio signal received by the SBR encoding unit14nmay, for example, be the aforementioned monaural signal. When the audio signal fed to the input terminal In1is a monaural signal, the SBR encoding unit14naccepts the audio signal. With reference to a predetermined frequency, the SBR encoding unit14ngenerates a low frequency band audio signal and a high frequency band audio signal from the input audio signal. Furthermore, the SBR encoding unit14ncalculates a parameter for generating the high frequency band audio signal from the low frequency band audio signal. The parameter to be used herein can, for example, be any information such as frequency information indicative of the predetermined frequency, time-frequency resolution information, spectrum envelope information, additive noise information, and additive sinusoidal information. The SBR encoding unit14noutputs the low frequency band audio signal to a switch SW1. Furthermore, the SBR encoding unit14noutputs encoded data obtained by encoding the calculated parameter to the output unit14d.

The encoding unit14a1encodes the audio signal with the ACELP encoding scheme to generate a coded sequence. The encoding unit14a2encodes the audio signal with the TCX encoding scheme to generate a coded sequence. The encoding unit14a3encodes the audio signal with the Modified AAC encoding scheme to generate a coded sequence.

The selection unit14bselects an encoding unit to encode audio signals of multiple frames fed to the switch SW1, according to the input information fed to the input terminal In2. In the present embodiment, the input information may be entered by a user. The input information may indicate whether multiple frames are to be encoded with a common encoding scheme.

In the present embodiment, when the input information indicates that multiple frames are to be encoded with a common audio encoding scheme, the selection unit14bselects a predetermined encoding unit to execute the predetermined encoding scheme. For example, when the input information indicates that multiple frames are to be encoded by a common audio encoding scheme, as described, the selection unit14bcontrols the switch SW1to select the ACELP encoding unit14a1as the predetermined encoding unit. In the present embodiment, therefore, when the input information indicates that multiple frames are to be encoded by a common audio encoding scheme, the ACELP encoding unit14a1encodes the audio signals of the multiple frames.

On the other hand, when the input information indicates that multiple frames are not to be encoded by a common audio encoding scheme, the selection unit14bconnects the audio signal of each frame fed to the switch SW1to a path leading to the first judgment unit14fand others.

The generation unit14cgenerates the long-term encoding scheme information, based on the input information. As shown inFIG. 12, the long-term encoding scheme information to be used may be a 1-bit GEM_ID. When the input information indicates that multiple frames are to be encoded by a common audio encoding scheme, the generation unit14csets GEM_ID to the value “1.” On the other hand, when the input information indicates that multiple frames are not to be encoded by a common audio encoding scheme, the generation unit14csets GEM_ID to the value “0.”

The header generation unit14egenerates a header to be included in a stream, and adds the set value of GEM_ID into the header. As shown inFIG. 12, this header is included in the first frame, when outputted from the output unit14d.

When the input information indicates that multiple frames are not to be encoded by a common audio encoding scheme, the first judgment unit14freceives an audio signal of an encoding target frame via the SW1. The first judgment unit14fanalyzes the audio signal of the encoding target frame to judge whether the audio signal is to be encoded by the Modified AAC encoding unit14a3.

When the first judgment unit14fdetermines that the audio signal of the encoding target frame is to be encoded by the Modified AAC encoding unit14a3, it controls a switch SW2to connect the frame to the Modified AAC encoding unit14a3.

On the other hand, when the first judgment unit14fdetermines that the audio signal of the encoding target frame is not to be encoded by the Modified AAC encoding unit14a3, it controls the switch SW2to connect the frame to the second judgment unit14hand a switch SW3. In this case, the encoding target frame is divided into four frames in a subsequent process and is handled as a super-frame including the four frames.

The first judgment unit14fmay, for example, analyzes the audio signal of the encoding target frame and when the audio signal has tone components over a predetermined amount, selects the Modified AAC encoding unit14a3as an encoding unit for the speech signal of the frame.

The core_mode generation unit14ggenerates core_mode according to the judgment result by the first judgment unit14f. As shown inFIG. 12, core_mode is 1-bit information. When the first judgment unit14fdetermines that the audio signal of the encoding target frame is to be encoded by the Modified AAC encoding unit14a3, the core_mode generation unit14gsets core_mode to the value “0.” On the other hand, when the first judgment unit14fdetermines that the audio signal of the judgment target frame is not to be encoded by the Modified AAC encoding unit14a3, the core_mode generation unit14gsets core_mode to the value “1.” This core_mode is added as parameter information to an output frame in a stream corresponding to the encoding target frame, when outputted from the output unit14d.

The second judgment unit14hreceives an audio signal of an encoding target super-frame via the switch SW2. The second judgment unit14hjudges whether an audio signal of each frame in the encoding target super-frame is to be encoded by the ACELP encoding unit14a1or by the TCX encoding unit14a2.

When the second judgment unit14hdetermines that the audio signal of the encoding target frame is to be encoded by the ACELP encoding unit14a1, it controls the switch SW3to connect the audio signal of the frame to the ACELP encoding unit14a1. On the other hand, when the second judgment unit14hdetermines that the audio signal of the encoding target frame is to be encoded by the TCX encoding unit14a2, it controls the switch SW3to connect the audio signal of the frame to the TCX encoding unit14a2.

For example, when the audio signal of the encoding target frame is a signal with a strong voice component, when a temporal envelope of the audio signal varies greater than a predetermined variation in a short period, or when the audio signal contains a transient component, the second judgment unit14hmay determine that the audio signal is to be encoded by the ACELP encoding unit14a1. Otherwise, the second judgment unit14hmay determine that the audio signal is to be encoded by the TCX encoding unit14a2. The audio signal may be determined to include a strong voice component when a pitch period of the audio signal is within a predetermined range, when an autocorrelation among pitch periods is stronger than a predetermined autocorrelation, or when a zero-cross rate is smaller than a predetermined rate.

The lpd_mode generation unit14igenerates lpd_mode according to the judgment result by the second judgment unit14h. As shown inFIG. 12, lpd_mode is 4-bit information. The lpd_mode generation unit14isets the value of lpd_mode to a predetermined value corresponding to the judgment result from the second judgment unit14hon the audio signal of each frame in the super-frame. The value of lpd_mode set by the lpd_mode generation unit14iis added to an output super-frame in a stream corresponding to the encoding target super-frame, when outputted from the output unit14d.

The output unit14doutputs a stream. The stream contains the first frame with the header including the aforementioned GEM_ID and a corresponding coded sequence and contains the second to m-th frames (m is an integer not less than 2) added with respective corresponding coded sequences. Furthermore, the output unit14dadds in each output frame the encoded data of the parameter generated by the MPS encoding unit14mand the encoded data of the parameter generated by the SBR encoding unit14n.

Described below is an operation of the audio encoding device14and an audio encoding method according to another embodiment.FIG. 13is a flowchart of the audio encoding method according to the embodiment.

In one embodiment, as shown inFIG. 13, in step S14-1, the generation unit14cgenerates (or sets) GEM_ID as described above, based on the input information. In subsequent step S14-2, the header generation unit14egenerates a header including the set GEM_ID.

Next, when it is determined by a judgment in step S14-pthat an audio signal fed to the input terminal In1is a multichannel signal, step S14-mis carried out in which the MPS encoding unit14mgenerates, from the multichannel audio signal of the input encoding target frame, an audio signal of channels whose channel number is less than the number of channels of the multichannel signal and a parameter for decoding of the multichannel audio signal from the audio signal of channels whose channel number is less than the foregoing number, as described above. The MPS encoding unit14mgenerates encoded data of the parameter. This encoded data is added in a corresponding output frame by the output unit14d. On the other hand, when the audio signal fed to the input terminal In1is a monaural signal, the MPS encoding unit14mdoes not operate such that the audio signal fed to the input terminal In1is fed to the SBR encoding unit14n.

Next, in step S14-n, the SBR encoding unit14ngenerates a low frequency band audio signal from the input audio signal and a parameter for generation of a high frequency band audio signal from the low frequency band audio signal, as described above. The SBR encoding unit14ngenerates encoded data of the parameter. This encoded data is added in a corresponding output frame by the output unit14d.

Next, in step S14-3, the selection unit14bjudges whether audio signals of multiple frames, i.e., low frequency band audio signals of multiple frames outputted from the SBR encoding unit14n, are to be encoded by a common audio encoding scheme, based on the input information.

When in step S14-3, the input information indicates that audio signals of multiple frames are to be encoded by a common audio encoding scheme, i.e., when the value of GEM_ID is “1,” the selection unit14bselects the ACELP encoding unit14a1.

Next, in step S14-4, the ACELP encoding unit14a1selected by the selection unit14bencodes an audio signal of an encoding target frame to generate a coded sequence.

Next, in step S14-5, the output unit14ddetermines whether a header is to be added to a frame. In step S14-5, when the encoding target frame is the first frame, the output unit14ddetermines that the header is to be added to the first frame in the stream corresponding to the encoding target frame, and in subsequent step S14-6, the output unit14dadds the header and coded sequence in the first frame and outputs the first frame. On the other hand, when the target frame is the second frame or a frame subsequent thereto, no header is added and, in step S14-7, the output unit14dadds a coded sequence in the frame and outputs it.

Next, it is determined in step S14-8whether there is any frame left to be encoded. When there is no frame left uncoded, the process ends. On the other hand, there is a frame left to be encoded, the process from step S14-pis repeated for a target frame left to be encoded.

In the present embodiment, as described above, while the value of GEM_ID is “1,” the ACELP encoding unit14a1is continuously used to encode all audio signals of multiple frames.

When it is determined in step S14-3that the value of GEM_ID is “0,” i.e., when the input information indicates that each frame is to be processed by an individual encoding scheme method, step S14-9is carried out in which the first judgment unit14fjudges whether the audio signal of the encoding target frame, i.e., the low frequency band audio signal of the encoding target frame outputted from the SBR encoding unit14nis to be encoded by the Modified AAC encoding unit14a3. In subsequent step S14-10, the core_mode generation unit14gsets the value of core_mode to a value according to the judgment result by the first judgment unit14f.

Next, it is determined in step S14-11whether the judgment result by the first judgment unit14findicates that the audio signal of the encoding target frame is to be encoded by the Modified AAC encoding unit14a3. When the judgment result by the first judgment unit14findicates that the audio signal of the encoding target frame is to be encoded by the Modified AAC encoding unit14a3, subsequent step S14-12is carried out in which the audio signal of the encoding target frame is encoded by the Modified AAC encoding unit14a3.

Next, in step S14-13, the output unit14dadds core_mode to an output frame (or super-frame) in the stream corresponding to the encoding target frame. Then, the process proceeds to step S14-5.

When, in step S14-11, the judgment result by the first judgment unit14findicates that the audio signal of the encoding target frame is not to be encoded by the Modified AAC encoding unit14a3, the process from step S14-14is carried out so as to process the encoding target frame as a super-frame.

In step S14-14, the second judgment unit14hjudges whether each frame in the super-frame is to be encoded by the ACELP encoding unit14a1or by the TCX encoding unit14a2. In subsequent step S14-15, the lpd_mode generation unit14isets lpd_mode to a value according to the judgment result by the second judgment unit14h.

Next, it is judged in step S14-16whether the judgment result by the second judgment unit14hindicates that the encoding target frame in the super-frame is to be encoded by the ACELP encoding unit14a1or indicates that the encoding target frame is to be encoded by the TCX encoding unit14a2.

When the judgment result by the second judgment unit14hindicates that the encoding target frame is to be encoded by the ACELP encoding unit14a1, step S14-17is carried out in which the audio signal of the encoding target frame is encoded by the ACELP encoding unit14a1. On the other hand, when the judgment result by the second judgment unit14hindicates that the encoding target frame is to be encoded by the TCX encoding unit14a2, step S14-18is carried out in which the audio signal of the encoding target frame is encoded by the TCX encoding unit14a2.

Next, in step S14-19, lpd_mode is added to an output super-frame in the stream corresponding to the encoding target super-frame. Then the process proceeds to step S14-13.

According to the audio encoding device14and the audio encoding method described above, since GEM_ID set to “1” is included in the header, the decoder side is notified that audio signals of multiple frames were encoded only by the ACELP encoding unit, eliminating the need to include information for specifying the audio encoding scheme used in each frame. Therefore, a smaller size stream is generated.

Described below is an audio encoding program that causes a computer to operate as the audio encoding device14.FIG. 14is a drawing showing the audio encoding program according to another embodiment.

The audio encoding program P14shown inFIG. 14may be executed in the computer shown inFIGS. 5 and 6. The audio encoding program P14may be provided in the same manner as the audio encoding program P10.

As shown inFIG. 14, the audio encoding program P14is comprises of an ACELP encoding module M14a1, a TCX encoding module M14a2, a Modified AAC encoding module M14a3, a selection module M14b, a generation module M14c, an output module M14d, a header generation module M14e, a first judgment module M14f, a core_mode generation module M14g, a second judgment module M14h, an lpd_mode generation module M14i, an MPS encoding module M14m, and an SBR encoding module14n.

Described below is an audio decoding device that decodes a stream generated by the audio encoding device14.FIG. 15is a drawing showing an audio decoding device according to another embodiment. an audio decoding device16shown inFIG. 15is comprised of an ACELP decoding unit16a1, a TCX decoding unit16a2, a Modified AAC decoding unit16a3, an extraction unit16b, a selection unit16c, a header analysis unit16d, a core_mode extraction unit16e, a first selection unit16f, an lpd_mode extraction unit16g, a second selection unit16h, an MPS decoding unit16m, and an SBR decoding unit16n.

The ACELP decoding unit16a1decodes a coded sequence in a frame by the ACELP decoding scheme to generate an audio signal. The TCX decoding unit16a2decodes a coded sequence in a frame by the TCX decoding scheme to generate an audio signal. The Modified AAC decoding unit16a3decodes a coded sequence in a frame by the Modified AAC decoding scheme to generate an audio signal. In one embodiment, the audio signals outputted from these decoding units are the low frequency band audio signals described above with reference to the audio encoding device14.

The header analysis unit16dseparates the header from the first frame. The header analysis unit16dprovides the separated header to the extraction unit16band outputs the first frame from which the header is separated, and the subsequent frames to the switch SW1, the MPS decoding unit16m, and the SBR decoding unit16n.

The extraction unit16bextracts GEM_ID from the header. The selection unit16cselects a decoding unit to be used to decode coded sequences of multiple frames, according to extracted GEM_ID. Specifically, when the value of GEM_ID is “1,” the selection unit16ccontrols the switch SW1to connect all the frames to the ACELP decoding unit16a1. On the other hand, when the value of GEM_ID is “0,” the selection unit16ccontrols the switch SW1to connect a decoding target frame (or super-frame) to the core_mode extraction unit16e.

The core_mode extraction unit16eextracts core_mode from the decoding target frame (or super-frame) and provides extracted core_mode to the first selection unit16f. The first selection unit16fcontrols the switch SW2according to the provided value of core_mode. Specifically, when the value of core_mode is “0,” the first selection unit16fcontrols the switch SW2to connect the decoding target frame to the Modified AAC decoding unit16a3. Thereafter, the decoding target frame is fed to the Modified AAC decoding unit16a3. On the other hand, when the value of core_mode is “1,” the first selection unit16fcontrols the switch SW2to connect the decoding target super-frame to the lpd_mode extraction unit16g.

The lpd_mode extraction unit16gextracts lpd_mode from the decoding target frame, i.e., from the super-frame. The lpd_mode extraction unit16gconnects extracted lpd_mode to the second selection unit16h. The second selection unit16hconnects each frame in the decoding target super-frame outputted from the lpd_mode extraction unit16gto the ACELP decoding unit16a1or to the TCX decoding unit16a2, according to input lpd_mode.

Specifically, the second selection unit16hrefers to a predetermined table associated with value of lpd_mode to set a value of mod[k] (k=0, 1, 2, or 3). Then, the second selection unit16hcontrols the switch SW3according to the value of mod[k] to connect each frame in the decoding target super-frame to the ACELP decoding unit16a1or to the TCX decoding unit16a2. The relationship between the values of mod[k] and a selection of either the ACELP decoding unit16a1or the TCX decoding unit16a2will be described later.

The SBR decoding unit16nreceives the low frequency band audio signals from the decoding units16a1,16a2, and16a3. The SBR decoding unit16nalso decodes encoded data in the decoding target frame to restore a parameter. The SBR decoding unit16ngenerates a high frequency band audio signal, using the low frequency band audio signal and the restored parameter. The SBR decoding unit16ncombines the high frequency band audio signal and the low frequency band audio signal to generate an audio signal.

The MPS decoding unit16mreceives the audio signal from the SBR decoding unit16n. This audio signal may be a monaural audio signal when the audio signal to be restored is a stereo signal. The MPS decoding unit16malso decodes encoded data in the decoding target frame to restore a parameter. The MPS decoding unit16mgenerates a multichannel audio signal, using the audio signal and restored parameter received from the SBR decoding unit16n, and outputs the multichannel audio signal. When the audio signal to be restored is a monaural signal, the MPS decoding unit16mdoes not operate and outputs the audio signal generated by the SBR decoding unit16n.

Described below is an operation of the audio decoding device16and an audio decoding method according to another embodiment.FIG. 16is a flowchart of the audio decoding method according to another embodiment.

In the embodiment, as shown inFIG. 16, in step S16-1, the header analysis unit16dseparates a header from a stream. In subsequent step S16-2, the extraction unit16bextracts GEM_ID from the header provided from the header analysis unit16d.

Next, in step S16-3, the selection unit16cselects a decoding unit to decode multiple frames, according to the value of GEM_ID extracted by the extraction unit16b. Specifically, when the value of GEM_ID is “1,” the selection unit16cselects the ACELP decoding unit16a1. In this case, in step S16-4, the ACELP decoding unit16a1decodes a coded sequence in the decoding target frame. The audio signal generated in step S16-4is the aforementioned low frequency band audio signal.

Next, in step S16-n, the SBR decoding unit16ndecodes encoded data in the decoding target frame to restore a parameter. In step S16-n, the SBR decoding unit16ngenerates a high frequency band audio signal, using the inputted low frequency band audio signal and the restored parameter. In step S16-n, the SBR decoding unit16ncombines the high frequency band audio signal and the low frequency band audio signal to generate an audio signal.

Next, when it is determined in step S16-pthat the target to be processed is a multichannel signal, subsequent step S16-mis carried out in which the MPS decoding unit16mdecodes encoded data in the decoding target frame to restore a parameter. In step S16-m, the MPS decoding unit16mgenerates a multichannel audio signal, using the audio signal and restored parameter received from the SBR decoding unit16n, and outputs the multichannel audio signal. On the other hand, when the processing target is determined to be a monaural signal, the SBR decoding unit16noutputs the generated audio signal.

Next, it is judged in step S16-5whether there is any frame left to be decoded. When there is no frame left to be decoded, the process ends. On the other hand, when there is a frame left to be decoded, the process from step S16-4is repeated for the target frame left to be decoded. By this operation, when the value of GEM_ID is “1,” coded sequences of multiple frames are decoded by a common decoding unit, i.e., by the ACELP decoding unit16a1.

Returning to step S16-3, when the value of GEM_ID is “0,” the selection unit16cconnects the decoding target frame to the core_mode extraction unit16e. In this case, in step S16-6, the core_mode extraction unit16eextracts core_mode from the decoding target frame.

Next, in step S16-7, the first selection unit16fselects either the Modified AAC decoding unit16a3or the lpd_mode extraction unit16g, according to extracted core_mode. Specifically, when the value of core_mode is “0,” the first selection unit16fselects the Modified AAC decoding unit16a3to connect the decoding target frame to the Modified AAC decoding unit16a3. In this case, in subsequent step S16-8, a coded sequence in the target frame to be processed is decoded by the Modified AAC decoding unit16a3. The audio signal generated in this step S16-8is the aforementioned low frequency band audio signal. Subsequent to this step S16-8, the aforementioned SBR decoding scheme (step S16-n) and MPS decoding scheme (step S16-m) are carried out.

Next, it is judged in step S16-9whether there is any frame left to be decoded, and the process ends when there is no frame left to be decoded. On the other hand, when there is a frame left to be decoded, the process from step S16-6is repeated for the target frame left to be decoded.

Returning to step S16-7, when the value of core_mode is “1,” the first selection unit16fselects the lpd_mode extraction unit16gto connect the decoding target frame to the lpd_mode extraction unit16g. In this case, the decoding target frame is processed as a super-frame.

Next, in step S16-10, the lpd_mode extraction unit16gextracts lpd_mode from the decoding target super-frame. Then, the second selection unit16hsets mod[k] (k=0, 1, 2, or 3) according to extracted lpd_mode.

Next, in step S16-11, the second selection unit16hsets the value of k to “0.” In subsequent step S16-12, the second selection unit16hjudges whether the value of mod[k] is larger than 0. When the value of mod[k] is not larger than 0, the second selection unit16hselects the ACELP decoding unit16a1. On the other hand, when the value of mod[k] is larger than 0, the second selection unit16hselects the TCX decoding unit16a2.

When the ACELP decoding unit16a1is selected, subsequent step S16-13is carried out in which the ACELP decoding unit16a1decodes the coded sequence of the decoding target frame in the super-frame. Next, in step S16-14, the value of k is set to k+1. On the other hand, when the TCX decoding unit16a2is selected, subsequent step S16-15is carried out in which the TCX decoding unit16a2decodes the coded sequence of the decoding target frame in the super-frame. In step S16-16, the value of k is updated to k+a (mod[k]). As to the relationship between mod[k] and a(mod[k]), reference should be made toFIG. 17.

It is then judged in step S16-17whether the value of k is smaller than 4. When the value of k is smaller than 4, the process from step S16-12is repeated for the subsequent frame in the super-frame. On the other hand, when the value of k is not less than 4, the process proceeds to step S16-n.

Described below is an audio decoding program for causing a computer to operate as the audio decoding device16.FIG. 18is a drawing showing the audio decoding program according to another embodiment.

The audio decoding program P16shown inFIG. 18may be executed in the computer shown inFIGS. 5 and 6. The audio decoding program P16can be provided in the same manner as the audio encoding program P10.

As shown inFIG. 18, the audio decoding program P16is comprised of an ACELP decoding module M16a1, a TCX decoding module M16a2, a Modified AAC decoding module M16a3, an extraction module M16b, a selection module M16c, a header analysis module M16d, a core_mode extraction module M16e, a first selection module M16f, an lpd_mode extraction module M16g, a second selection module M16h, an MPS decoding module M16m, and an SBR decoding module M16n.

Described below is an audio encoding device according to another embodiment.FIG. 19is a drawing showing an audio encoding device according to another embodiment. An audio encoding device18shown inFIG. 19may be used as an extension of AMR-WB+.

FIG. 20is a drawing showing a stream generated according to the conventional AMR-WB+ and a stream generated by the audio encoding device shown inFIG. 19. In AMR-WB+, as shown inFIG. 20, each frame is provided with 2-bit Mode bits. Mode bits indicates that either the ACELP encoding scheme or the TCX encoding scheme is to be selected, depending upon its value.

On the other hand, the audio encoding device18shown inFIG. 19encodes audio signals of all frames by a common audio encoding scheme. Furthermore, the audio encoding device18also selects an audio encoding scheme used for the respective frames, from one to another.

As shown inFIG. 19, the audio encoding device18is provided with an ACELP encoding unit18a1and a TCX encoding unit18a2. The ACELP encoding unit18a1encodes an audio signal by the ACELP encoding scheme to generate a coded sequence. The TCX encoding unit18a2encodes an audio signal by the TCX encoding scheme to generate a coded sequence. The audio encoding device18is further comprised of a selection unit18b, a generation unit18c, an output unit18d, a header generation unit18e, an encoding scheme judgment unit18f, a Mode bits generation unit18g, an analysis unit18m, a downmix unit18n, a high frequency band encoding unit18p, and a stereo encoding unit18q.

The analysis unit18mdivides, referring to a predetermined frequency, an audio signal of each frame fed to the input terminal In1into a low frequency band audio signal and a high frequency band audio signal. When the audio signal fed to the input terminal In1is a monaural audio signal, the analysis unit18moutputs the generated low frequency band audio signal to a switch SW1and outputs the high frequency band audio signal to the high frequency band encoding unit18p. On the other hand, when the audio signal fed to the input terminal In1is a stereo signal, the analysis unit18moutputs the generated low frequency band audio signal (stereo signal) to the downmix unit18n.

When the audio signal fed to the input terminal In1is a stereo signal, the downmix unit18ndown-mixes the low frequency band audio signal (stereo signal) to a monaural audio signal. The downmix unit18noutputs the generated monaural audio signal to the switch SW1. The downmix unit18ndivides, referring to a predetermined frequency, the low frequency band audio signal into audio signals of two frequency bands. The downmix unit18noutputs an audio signal (monaural signal) of a lower frequency band out of the two frequency band audio signals and the right channel audio signal to the stereo encoding unit18q.

The stereo encoding unit18qcalculates a side signal, which is a difference signal between the lower frequency band monaural audio signal of the two frequency band audio signals and the right channel audio signal. The stereo encoding unit18qcalculates a balance factor indicative of a level difference between the monaural audio signal and the side signal, encodes the balance factor and a waveform of the side signal, respectively, by predetermined methods, and outputs encoded data to the output unit18d. The stereo encoding unit18qcalculates a parameter for a decoding device to generate a stereo audio signal from the lower frequency band audio signal of the two frequency band audio signals and outputs encoded data of the parameter to the output unit18d.

The selection unit18bhas the same function as that of the selection unit14b. Specifically, when the input information indicates that multiple frames are to be encoded by a common audio encoding scheme, the selection unit18bcontrols the switch SW1to connect audio signals of all frames fed to the switch SW1to the ACELP encoding unit18a1. On the other hand, when the input information indicates that multiple frames are not to be encoded by a common encoding scheme, the selection unit18bcontrols the switch SW1to connect an audio signal of each frame fed to the switch SW1to a path leading to the encoding scheme judgment unit18fand others.

The generation unit18csets GEM_ID in the same manner as set by the generation unit14c. The header generation unit18egenerates a header compatible with AMR-WB+ including GEM_ID generated by the generation unit18c. This header is outputted as the head of the stream by the output unit18d. In the present embodiment, GEM_ID may be included in an unused region in AMR_WBPSampleEntry_fields of the header.

When the input information indicates that multiple frames are not to be encoded by a common encoding scheme, the encoding scheme judgment unit18freceives an audio signal of an encoding target frame via the SW1.

The encoding scheme judgment unit18fprocesses the encoding target frame as a super-frame such that the encoding target frame is divided into four or less frames. The encoding scheme judgment unit18fanalyzes an audio signal of each frame in the super-frame to judge whether the audio signal is to be encoded by the ACELP encoding unit18a1or to be encoded by the TCX encoding unit18a2. This analysis may be the same analysis as performed by the aforementioned second judgment unit14h.

When the judgment unit18fdetermines that the audio signal of the frame is to be encoded by the ACELP encoding unit18a1, it controls the switch SW2to connect the audio signal of the frame to the ACELP encoding unit18a1. On the other hand, when the judgment unit18fdetermines that the audio signal of the frame is to be encoded by the TCX encoding unit18a2, it controls the switch SW2to connect the audio signal of the frame to the TCX encoding unit18a2.

The Mode bits generation unit18ggenerates K pieces of Mode Bits[k] (k=0 to K−1) having values according to the judgment result by the encoding scheme judgment unit18f. The value of K herein is an integer not more than 4 and may be a number corresponding to the number of frames in the super-frame. Furthermore, Mode bits[k] is 2-bit information indicating that either the ACELP encoding scheme or the TCX encoding scheme was used to encode the audio signal of the encoding target frame.

The output unit18doutputs a stream with a header and multiple frames of corresponding coded sequences. When the value of GEM_ID is 0, the output unit18dadds Mode bits[k] in the output frame. Furthermore, the output unit18dadds in a corresponding frame the encoded data generated by the high frequency band encoding unit18pand the encoded data generated by the stereo encoding unit18.

Described below is an operation of the audio encoding device18and an audio encoding method according to an embodiment.FIG. 21is a flowchart of the audio encoding method according to still another embodiment.

In the embodiment, as shown inFIG. 21, step S18-1, which is equivalent to step S14-1, is carried out first. Next, in step S18-2, the header generation unit18egenerates a header of AMR-WB+ including GEM_ID, as described above. In subsequent step S18-3, the output unit18doutputs the generated header as the head of a stream.

Next, in step S18-m, the analysis unit18mdivides an audio signal of an encoding target frame fed to the input terminal In1into a low frequency band audio signal and a high frequency band audio signal, as described above. In step S18-m, when the audio signal fed to the input terminal In1is a monaural audio signal, the analysis unit18moutputs the generated low frequency band audio signal to the switch SW1and outputs the high frequency band audio signal to the high frequency band encoding unit18p. On the other hand, when the audio signal fed to the input terminal In1is a stereo signal, the analysis unit18moutputs the generated low frequency band audio signal (stereo signal) to the downmix unit18n.

Next, when it is determined in step S18-rthat the audio signal fed to the input terminal In1is a monaural signal, the aforementioned process by the high frequency band encoding unit18pis carried out in step S18-p, and the encoded data generated by the high frequency band encoding unit18pis outputted from the output unit18d. On the other hand, when the audio signal fed to the input terminal In1is a stereo signal, the aforementioned process by the downmix unit18nis carried out in step S18-n, the aforementioned process by the stereo encoding unit18qis carried out in subsequent step S18-q, the encoded data generated by the stereo encoding unit18qis outputted from the output unit18d, and the processing proceeds to step S18-p.

Next, in step S18-4, the selection unit18bjudges whether the value of GEM_ID is “0.” When the value of GEM_ID is not “0,” i.e., when the value of GEM_ID is “1,” the selection unit18bselects the ACELP encoding unit18a1. Next, in step S18-5, the ACELP encoding unit18a1thus selected encodes the audio signal of the frame (low frequency band audio signal). In subsequent step S18-6, the output unit18doutputs a frame including the generated coded sequence. When the value of GEM_ID is “1,” audio signals (low frequency band audio signals) of all frames are encoded by the ACELP encoding unit18a1, after it is judged in step S18-7whether there is any frame left to be encoded, and the encoded signals are outputted.

Returning to step S18-4, when the value of GEM_ID is “0,” subsequent step S18-8is carried out in which the encoding scheme judgment unit18fjudges whether an encoding target frame, i.e., an audio signal of each frame in the super-frame (low frequency band audio signal) is to be encoded by the ACELP encoding scheme or by the TCX encoding scheme.

Next, in step S18-9, the Mode bits generation unit18ggenerates Mode bits[k] having a value according to the judgment result by the encoding scheme judgment unit18f.

Next, it is judged in step S18-10whether the judgment result in step S18-8indicates that the audio signal of the encoding target frame is to be encoded by the TCX encoding scheme, i.e., by the TCX encoding unit18a2.

When the judgment result in step S18-8indicates that the audio signal of the encoding target frame is to be encoded by the TCX encoding unit18a2, subsequent step S18-11is carried out in which the TCX encoding unit18a2encodes the audio signal (low frequency band audio signal) of the frame. On the other hand, when the judgment result does not indicate that the audio signal of the encoding target frame is to be encoded by the TCX encoding unit18a2, subsequent step S18-12is carried out in which the ACELP encoding unit18a1encodes the audio signal (low frequency band audio signal) of the frame. The processes from step S18-10to step S18-12are carried out for each of frames in the super-frame.

Next, in step S18-13, the output unit18dadds Mode bits[k] to the coded sequence generated in step S18-11or in step S18-12. Then the process proceeds to step S18-6.

In the audio encoding device18and the audio encoding method described above, GEM_ID set to “1” is also included in the header, whereby the decoder side is notified that audio signals of multiple frames were encoded only by the ACELP encoding unit. Therefore, the stream is generated in a smaller size.

Described below is an audio encoding program for causing a computer to operate as the audio encoding device18.FIG. 22shows an audio encoding program according to another embodiment.

The audio encoding program P18shown inFIG. 22may be executed in the computer shown inFIGS. 5 and 6. Furthermore, the audio encoding program P18may be provided in the same manner as the audio encoding program P10.

The audio encoding program P18is comprised of an ACELP encoding module M18a1, a TCX encoding module M18a2, a selection module M18b, a generation module M18c, an output module M18d, a header generation module M18e, an encoding scheme judgment module M18f, a Mode bits generation module M18g, an analysis module M18m, a downmix module M18n, a high frequency band encoding module M18p, and a stereo encoding module M18q.

Described below is an audio decoding device that decodes a stream generated by the audio encoding device18.FIG. 23shows an audio decoding device according to another embodiment. The audio decoding device20shown inFIG. 23is comprised of an ACELP decoding unit20a1and a TCX decoding unit20a2. The ACELP decoding unit20a1decodes a coded sequence in a frame by the ACELP decoding scheme to generate an audio signal (low frequency band audio signal). The TCX decoding unit20a2decodes a coded sequence in a frame by the TCX decoding scheme to generate an audio signal (low frequency band audio signal). The audio decoding device20is further comprised of an extraction unit20b, a selection unit20c, a header analysis unit20d, a Mode bits extraction unit20e, a decoding scheme selection unit20f, a high frequency band decoding unit20p, a stereo decoding unit20q, and a synthesis unit20m.

The header analysis unit20dreceives the stream shown inFIG. 20and separates the header from the stream. The header analysis unit20dprovides the separated header to the extraction unit20b. Furthermore, the header analysis unit20doutputs each frame in the stream from which the header is separated to a switch SW1, the high frequency band decoding unit20p, and the stereo decoding unit20q.

The extraction unit20bextracts GEM_ID from the header. When the value of GEM_ID extracted is “1,” the selection unit20ccontrols the switch SW1to connect multiple frames to the ACELP decoding unit20a1. Thereby, coded sequences of all frames are decoded by the ACELP decoding unit20a1when the value of GEM_ID is “1.”

On the other hand, when the value of GEM_ID is “0,” the selection unit20ccontrols the switch SW1to connect each frame to the Mode bits extraction unit20e. The Mode bits extraction unit20eextracts Mode bits[k] for each input frame, i.e., each frame in a super-frame and provides it to the decoding scheme selection unit20f.

The decoding scheme selection unit20fcontrols a switch SW2according to the value of Mode bits[k]. Specifically, when the decoding scheme selection unit20fdetermines from the value of Mode bits[k] that the ACELP decoding scheme is to be selected, it controls the switch SW2to connect the decoding target frame to the ACELP decoding unit20a1. On the other hand, when the decoding scheme selection unit20fdetermines from the value of Mode bits[k] that the TCX decoding scheme is to be selected, it controls the switch SW2to connect the decoding target frame to the TCX decoding unit20a2.

The high frequency band decoding unit20pdecodes the encoded data included in the decoding target frame to restore the aforementioned parameter. The high frequency band decoding unit20pgenerates the high frequency band audio signal, using the restored parameter and the low frequency band audio signal decoded by the ACELP decoding unit20a1and/or by the TCX decoding unit20a2, and outputs the high frequency band audio signal to the synthesis unit20m.

The stereo decoding unit20qdecodes the encoded data included in the decoding target frame to restore the aforementioned parameter, the balance factor, and the waveform of the side signal. The stereo decoding unit20qgenerates a stereo signal, using the restored parameter, balance factor, and waveform of the side signal, and the low frequency band monaural audio signal decoded by the ACELP decoding unit20a1and/or by the TCX decoding unit20a2.

The synthesis unit20mcombines the low frequency band audio signal restored by the ACELP decoding unit20a1and/or by the TCX decoding unit20a2with the high frequency band audio signal generated by the high frequency band decoding unit20pin order to generate a decoded audio signal. When a stereo signal is a target signal to be processed, the synthesis unit20mgenerates a stereo audio signal, also using the input signal (stereo signal) from the stereo decoding unit20q.

Described below is an operation of the audio decoding device20and an audio decoding method according to an embodiment.FIG. 24is a flowchart of the audio decoding method according to another embodiment.

In an embodiment, as shown inFIG. 24, step S20-1is carried out first in which the header analysis unit20dseparates a header from a stream.

Next, in step S20-2, the extraction unit20bextracts GEM_ID from the header. In subsequent step S20-3, the selection unit20ccontrols a switch SW1according to the value of GEM_ID.

Specifically, when the value of GEM_ID is “1,” the selection unit20ccontrols the switch SW1to select the ACELP decoding unit20a1as a decoding unit to decode coded sequences of multiple frames in the stream. In this case, in subsequent step S20-4, the ACELP decoding unit20a1decodes a coded sequence of a decoding target frame. Thereby, a low frequency band audio signal is restored.

Next, in step S20-p, the high frequency band decoding unit20prestores a parameter from the encoded data included in the decoding target frame. In step S20-p, the high frequency band decoding unit20pgenerates a high frequency band audio signal, using the restored parameter and the low frequency band audio signal restored by the ACELP decoding unit20a1, and outputs the high frequency band audio signal to the synthesis unit20m.

Next, when it is determined in step S20-rthat a stereo signal is a target signal to be processed, subsequent step S20-qis carried out in which the stereo decoding unit20qdecodes the encoded data included in the decoding target frame to restore the aforementioned parameter, the balance factor, and the waveform of the side signal. In step S20-q, the stereo decoding unit20qrestores a stereo signal, using the restored parameter, balance factor, and waveform of the side signal, and the low frequency band monaural audio signal restored by the ACELP decoding unit20a1.

Next, in step S20-m, the synthesis unit20mcombines the low frequency band audio signal restored by the ACELP decoding unit20a1and the high frequency band audio signal generated by the high frequency band decoding unit20pto generate a decoded audio signal. When a stereo signal is a target signal to be processed, the synthesis unit20mrestores a stereo audio signal, also using the input signal (stereo signal) from the stereo decoding unit20q.

When it is judged in step S20-5that there is no frame left to be decoded, the process ends. On the other hand, when there is a frame left to be decoded, the processes from step S20-4are repeated for a target unprocessed frame.

Returning to step S20-3, when the value of GEM_ID is “0,” the selection unit20ccontrols the switch SW1to connect each frame in the stream to the Mode bits extraction unit20e. In this case, in subsequent step S20-6, the Mode bits extraction unit20eextracts Mode bits[k] from the decoding target super-frame. Mode bits[k] may be extracted from the super-frame at once or may be extracted one at a time in its order during decoding of each frame in the super-frame.

Next, in step S20-7, the decoding scheme selection unit20fsets the value of k to “0.” In subsequent step S20-8, the decoding scheme selection unit20fjudges whether the value of Mode bits[k] is larger than 0. When the value of Mode bits[k] is not larger than 0, subsequent step S20-9is carried out in which the ACELP decoding unit20a1decodes a coded sequence of a decoding target frame in the super-frame. On the other hand, when the value of Mode bits[k] is larger than 0, the TCX decoding unit20a2decodes the coded sequence of the decoding target frame in the super-frame.

Next, in step S20-11, the decoding scheme selection unit20fupdates the value of k to k+a(Mode bits[k]). The relationship between the values of Mode bits[k] and a(Mode bits[k]) herein may be equivalent to the relation between mod[k] and a(mod[k]) shown inFIG. 17.

Next, in step S20-12, the decoding scheme selection unit20fjudges whether the value of k is smaller than 4. When the value of k is smaller than 4, the processes from step S20-8are continued for a target subsequent frame in the super-frame. On the other hand, when the value of k is not less than 4, step S20-pis carried out in which the high frequency band decoding unit20prestores the parameter from the encoded data included in the decoding target frame. In step S20-p, the high frequency band decoding unit20pgenerates a high frequency band audio signal from the parameter and the low frequency band audio signal restored by the decoding unit20a1or by the decoding unit20a2, and outputs the high frequency band audio signal to the synthesis unit20m.

Next, when it is determined in step S20-rthat a stereo signal is a target signal to be processed, subsequent step S20-qis carried out in which the stereo decoding unit20qdecodes the encoded data included in the decoding target frame to restore the aforementioned parameter, the balance factor, and the waveform of the side signal. In step S20-q, the stereo decoding unit20qrestores a stereo signal, using the restored parameter, balance factor, and waveform of the side signal, and the low frequency band monaural audio signal restored by the decoding unit20a1or by the decoding unit20a2.

Next, in step S20-m, the synthesis unit20msynthesizes a decoded audio signal from the low frequency band audio signal restored by the decoding unit20a1or by the decoding unit20a2, and the high frequency band audio signal generated by the high frequency band decoding unit20p. When a stereo signal is a target signal to be processed, the synthesis unit20mrestores a stereo audio signal, also using an input signal (stereo signal) from the stereo decoding unit20q. Then the process proceeds to step S20-13.

It is judged in step S20-13whether there is any frame let to be decoded. When there is no frame left to be decoded, the process is terminated. On the other hand, when there is a frame let to be decoded, the processes from step S20-6are executed for a target frame (super-frame).

Described below is an audio decoding program that causes a computer to operate as the audio decoding device20.FIG. 25shows an audio decoding program according to another embodiment.

The audio decoding program P20shown inFIG. 25may be executed in the computer shown inFIGS. 5 and 6. The audio decoding program P20can be provided in the same manner as the audio encoding program P10.

The audio decoding program P20is comprised of an ACELP decoding module M20a1, a TCX decoding module M20a2, an extraction module M20b, a selection module M20c, a header analysis module M20d, a Mode bits extraction module M20e, a decoding scheme selection module M20f, a high frequency band decoding module M20p, a stereo decoding module M20q, and a synthesis module M20m.

Described below is an audio encoding device of another embodiment.FIG. 26shows an audio encoding device according to another embodiment. The audio encoding device22shown inFIG. 26can implement switching between an audio encoding scheme used to encode audio signals of a first plurality of frames and an audio encoding scheme used to encode audio signals of subsequent second plurality of frames.

Like the audio encoding device10, the audio encoding device22is comprised of the encoding units10a1-10an. The audio encoding device22is further comprised of a generation unit22c, a selection unit22b, an output unit22d, and an inspection unit22e.

The inspection unit22emonitors an input inputted in the input terminal In2and receives input information fed to the input terminal In2. The input information is information for specifying an audio encoding scheme used commonly to encode multiple frames.

The selection unit22bselects an encoding unit according to the input information. Specifically, the selection unit22bcontrols a switch SW to connect an audio signal fed to the input terminal In1to an encoding unit to execute the audio encoding scheme specified by the input information. The selection unit22bcontinues selection of a single encoding unit until next input information is fed to the inspection unit22e.

Every time the inspection unit22ereceives input information, the generation unit22cgenerates, based on the input information, the long-term encoding scheme information which indicates that a common encoding scheme was used for multiple frames.

When the generation unit22cgenerates the long-term encoding scheme information, the output unit22dadds the long-term encoding scheme information to multiple frames.FIG. 27shows a stream generated by the audio encoding device shown inFIG. 26. As shown inFIG. 27, the long-term encoding scheme information is added to a lead frame of the multiple frames. In the example shown inFIG. 27, the multiple frames consisting of the first frame to the (l−1)th frame are encoded by a common encoding scheme, the encoding scheme is switched to another at the l-th frame, and the multiple frames from the l-th frame to the m-th frame are encoded by a common encoding scheme.

Described below is an operation of the audio encoding device22and an audio encoding method according to an embodiment.FIG. 28is a flowchart showing an audio encoding method according to another embodiment.

In the embodiment, as shown inFIG. 28, in step S22-1, the inspection unit22emonitors inputted input information. When the input information is received, step S22-2is carried out in which the selection unit22bselects an encoding unit according to the input information.

Next, in step S22-3, the selection unit22bgenerates the long-term encoding scheme information, based on the input information. The long-term encoding scheme information may be added to a lead frame of the multiple frames by the output unit22din step S22-4.

In step S22-5, an audio signal of an encoding target frame is then encoded by the selected encoding unit. Until next input information is fed, the audio signal of the encoding target frame is encoded without passing through the processes of steps S22-2to S22-4.

Next, in step S22-6, the encoded coded sequence is added in a frame in a bit stream corresponding to the encoding target frame and is outputted from the output unit22d.

Next, it is judged in step S22-7whether there is any frame left to be encoded. When there is no frame left uncoded, the process ends. On the other hand, when there is a frame left to be encoded, the processes from step S22-1are performed.

Described below is an audio encoding program that cause a computer to operate as the audio encoding device22.FIG. 29shows an audio encoding program according to another embodiment.

The audio encoding program P22shown inFIG. 29may be executed in the computer shown inFIGS. 5 and 6. The audio encoding program P22can be provided in the same manner as the audio encoding program P10.

As shown inFIG. 29, the audio encoding program P22is comprised of encoding modules M10a1-10an, a generation module M22c, a selection module M22b, an output module M22d, and an inspection module M22e.

The encoding modules M10a1-10an, the generation module M22c, the selection module M22b, the output module M22d, and the inspection module M22ecause the computer C10to perform the same functions as performed by the encoding units10a1-10an, the generation unit22c, the selection unit22b, the output unit22d, and the inspection unit22e, respectively.

Described below is an audio decoding device that decodes a stream generated by the audio encoding device22.FIG. 30shows an audio decoding device according to another embodiment.

Like the audio decoding device12, an audio decoding device24shown inFIG. 30is comprised of the decoding units12a1-12an. The audio decoding device24is further comprised of an extraction unit24b, a selection unit24c, and an inspection unit24d.

The inspection unit24ddetermines whether the long-term encoding scheme information is included in each frame in a stream fed to the input terminal In. When the inspection unit24ddetermines that the long-term encoding scheme information is included in a frame, the extraction unit24bextracts the long-term encoding scheme information from the frame. The extraction unit24bsends the frame to a switch SW after the long-term encoding scheme information is extracted.

When the extraction unit24bextracts the long-term encoding scheme information, the selection unit24ccontrols the switch SW, based on the long-term encoding scheme information, to select a decoding unit to execute an audio decoding scheme corresponding to an encoding scheme specified. Until the inspection unit24dextracts next long-term encoding scheme information, the selection unit24ccontinues selecting a single decoding unit and continues decoding coded sequences of multiple frames by a common audio decoding scheme.

Described below is an operation of the audio decoding device24and an audio decoding method according to an embodiment.FIG. 31is a flowchart showing the audio decoding method according to another embodiment.

In the embodiment as shown inFIG. 31, in step S24-1, the inspection unit24dmonitors whether long-term encoding scheme information is included in an input frame. When the inspection unit24ddetects the long-term encoding scheme information, subsequent step S24-2is carried out in which the extraction unit24bextracts the long-term encoding scheme information from the frame.

Next, in step S24-3, the selection unit24cselects an appropriate decoding unit, based on the long-term encoding scheme information extracted. In subsequent step S24-4, the selected decoding unit decodes a coded sequence of a decoding target frame.

It is then judged in step S24-5whether there is any frame left to be decoded. When there is no frame left to be decoded, the process ends. On the other hand, when there is a frame left to be decoded, the processes from step S24-1are executed.

In the present embodiment, when it is determined in step S24-1that the long-term encoding scheme information is not added to the frame, the process of step S24-4is executed without passing through the processes of step S24-2and step S24-3.

Described below is an audio decoding program that causes a computer to operate as the audio decoding device24.FIG. 32shows an audio decoding program according to another embodiment.

The audio decoding program P24shown inFIG. 32may be executed in the computer shown inFIGS. 5 and 6. The audio decoding program P24can be provided in the same manner as the audio encoding program P10.

As shown inFIG. 32, the audio decoding program P24is comprised of the decoding modules M12a1-12an, an extraction module M24b, a selection module M24c, and an inspection module M24d.

Described below is an audio encoding device according to another embodiment.FIG. 33shows an audio encoding device according to another embodiment.FIG. 34shows streams generated according to the conventional MPEG USAC and a stream generated by the audio encoding device shown inFIG. 33.

The aforementioned audio encoding device14can either encode audio signals of all frames by a single common audio encoding scheme or encode an audio signal of each frame by a respective audio encoding scheme.

On the other hand, the audio encoding device26shown inFIG. 33uses a common audio encoding scheme for some frames of the multiple frames. The audio encoding device26also uses respective audio encoding schemes for some frames of the frames. Furthermore, the audio encoding device26uses a common audio encoding scheme for multiple frames coming amid all the frames.

As shown inFIG. 33, like the audio encoding device14, the audio encoding device26is comprised of the ACELP encoding unit14a1, the TCX encoding unit14a2, the Modified AAC encoding unit14a3, the first judgment unit14f, the core_mode generation unit14g, the second judgment unit14h, the lpd_mode generation unit14i, the MPS encoding unit14m, and the SBR encoding unit14n. The audio encoding device26is further comprised of an inspection unit26j, a selection unit26b, a generation unit26c, an output unit26d, and a header generation unit26e. Among the elements of the audio encoding device26, elements different from those of the audio encoding device14will be described below.

The inspection unit26jinspects whether there is input information fed to the input terminal In2. The input information is information indicating whether audio signals of multiple frames are to be encoded by a common audio encoding scheme.

When the inspection unit26jdetects the input information, the selection unit26bcontrols a switch SW1. Specifically, when the detected input information indicates that audio signals of multiple frames are to be encoded by a common audio encoding scheme, the selection unit26bcontrols the switch SW1to connect the switch SW1to the ACELP encoding unit14a1. On the other hand, when the detected input information indicates that audio signals of multiple frames are not to be encoded by a common audio encoding scheme, the selection unit26bcontrols the switch SW1to connect the switch SW1to a path leading to the first judgment unit14fand others.

When the inspection unit26jdetects the input information, the generation unit26cgenerates GEM_ID for an output frame corresponding to an encoding target frame found at that point. Specifically, when the detected input information indicates that audio signals of multiple frames are to be encoded by a common audio encoding scheme, the generation unit26csets the value of GEM_ID to “1.” On the other hand, when the detected input information indicates that audio signals of multiple frames are not to be encoded by a common audio encoding scheme, the generation unit26csets the value of GEM_ID to “0.”

When the inspection unit26jdetects the input information, the header generation unit26egenerates a header of an output frame corresponding to an encoding target frame found at that point and adds GEM_ID generated by the generation unit26cin the header.

The output unit26doutputs an output frame including a generated coded sequence. Furthermore, the output unit26dadds in each output frame encoded data of a parameter generated by the MPS encoding unit14mand encoded data of a parameter generated by the SBR encoding unit14n. When the input information is detected by the inspection unit26j, the output frame contains the header generated by the header generation unit26e.

Described below are an operation of the audio encoding device26and an audio encoding method according to another embodiment.FIG. 35is a flowchart showing an audio encoding method according to another embodiment.

In the flow shown inFIG. 35, the processes of steps S14-3to4, steps S14-9to19, and step S14-mto step S14-nare the same as those shown inFIG. 13. The processes different from those in the flow shown inFIG. 13will be described below.

In the embodiment as shown inFIG. 35, in step S26-a, the value of GEM_ID is initialized. The value of GEM_ID may be initialized, for example, to “0.” In step S26-1, the inspection unit26jmonitors the input information as described above. When an input of the input information is detected, subsequent step S26-2is carried out in which the generation unit26cgenerates GEM_ID according to the input information, and thereafter step S26-3is carried out in which the header generation unit26egenerates a header including GEM_ID thus generated. On the other hand, when there is no input information detected, the process proceeds to step S14-p, without passing through the processes of steps S26-2and S26-3.

In step S26-4, it is determined whether a header is to be added. When the inspection unit26jdetects the input information, a header including GEM_ID is added in step S26-5to an output frame corresponding to an encoding target frame found at that point, and the frame including the header is outputted. On the other hand, when no input information is detected, an output frame corresponding to an encoding target frame found at that point is outputted as it is in step S26-6.

It is then judged in step S26-7whether there is any frame left to be encoded. When there is no frame left uncoded, the process ends. On the other hand, when there is a frame left to be encoded, the processes from step S26-1are executed for a target frame left to be encoded.

According to the audio encoding device26and the audio encoding method of the embodiment described above, multiple frames are encoded by a common audio encoding scheme, some frames thereafter are encoded by respective audio encoding schemes, and multiple frames subsequent thereto are encoded by a common audio encoding scheme.

The audio encoding device26determines an audio encoding scheme to be used to encode audio signals of multiple frames, based on the input information. However, in the present invention, an audio encoding scheme to be used commonly for multiple frames may be determined based on the result of an analysis on an audio signal of each frame. For example, an analysis unit to analyze an audio signal of each frame is provided between the input terminal In1and the switch SW1and, the selection unit26band the generation unit26c, and others may be made to operate based on the analysis result. The aforementioned analysis technique may be applied to this analysis.

It should be noted that audio signals of all frames may be connected to the path including the first judgment unit14fand output frames including coded sequences may be stored in the output unit26d. In this case, using the judgment results by the first judgment unit14fand the second judgment unit14h, operations, such setting of lpd_mode, core_mode, and so on, and generation and addition of the header, may be performed ex-post for each frame.

It should be noted that after an analysis is performed on a predetermined number of frames, or judgments are performed on the predetermined number of frames by the first judgment unit14fand the second judgment unit, an encoding scheme commonly to be used for multiple frames including the predetermined number of frames may be predicted, using the analysis result or the judgment results on the predetermined number of frames.

Whether a common encoding scheme or respective encoding schemes are executed for multiple frames may be determined so as to reduce an amount of additional information including core_mode, lpd_mode, and the header or the like.

Described below is an audio encoding program that cause a computer to operate as the audio encoding device26.FIG. 36shows an audio encoding program according to another embodiment.

The audio encoding program P26shown inFIG. 36may be executed in the computer shown inFIGS. 5 and 6. The audio encoding program P26can be provided in the same manner as the audio encoding program P10.

As shown inFIG. 36, the audio encoding program P26is comprised of the ACELP encoding module M14a1, the TCX encoding module M14a2, the Modified AAC encoding module M14a3, the first judgment module M14f, the core_mode generation module M14g, the second judgment module M14h, the lpd_mode generation module M14i, the MPS encoding module M14m, the SBR encoding module M14n, an inspection module M26j, a selection module M26b, a generation module M26c, an output module M26d, and a header generation module M26e.

Described below is an audio decoding device that decodes a stream generated by the audio encoding device26.FIG. 37shows an audio decoding device according to another embodiment.

Like the audio decoding device16, the audio decoding device28shown inFIG. 37is comprised of the ACELP decoding unit16a1, the TCX decoding unit16a2, the Modified AAC decoding unit16a3, the core_mode extraction unit16e, the first selection unit16f, the lpd_mode extraction unit16g, the second selection unit16h, the MPS decoding unit16m, and the SBR decoding unit16n. The audio decoding device28is further comprised of a header inspection unit28j, a header analysis unit28d, an extraction unit28b, and a selection unit28c. Among the elements of the audio decoding device28, elements different from those of the audio decoding device16will be described below.

The header inspection unit28jmonitors whether there is a header in each frame fed to the input terminal In. When the header inspection unit28jdetects that there is a header in a frame, the header analysis unit28dseparates the header. The extraction unit28bextracts GEM_ID from the extracted header.

The selection unit28ccontrols a switch SW1according to extracted GEM_ID. Specifically, when the value of GEM_ID is “1,” the selection unit28ccontrols the switch SW1to connect the frame sent from the header analysis unit28d, to the ACELP decoding unit16a1until next GEM_ID is extracted.

On the other hand, when the value of GEM_ID is “0,” the selection unit28cconnects the frame sent from the header analysis unit28dto the core_mode extraction unit16e.

Described below is operations of the audio decoding device28and an audio decoding method according to another embodiment.FIG. 38is a flowchart showing an audio decoding method according to another embodiment.

The processes specified by reference signs including “S16” inFIG. 38are the same processes as the corresponding processes found inFIG. 16. Among the processes inFIG. 38, processes different from those shown inFIG. 16will be described below.

In the embodiment as shown inFIG. 38, in step S28-1, the header inspection unit28jmonitors whether there is a header included in an input frame. When a header is included in a frame, subsequent step S28-2is carried out in which the header analysis unit28dseparates the header from the frame. In step S28-3, the extraction unit28bthen extracts GEM_ID from the header. On the other hand, when there is no header found in the frame, step S28-4is carried in which GEM_ID extracted immediately before is copied, and copied GEM_ID is used thereafter.

It is judged in step S28-5whether there is any frame left to be decoded. When there is no frame left to be decoded, the process ends. On the other hand, when there is a frame left to be decoded, the processes from step S28-1are executed for a target frame left to be decoded.

It is judged in step S28-6whether there is any frame left to be decoded. When there is no frame left to be decoded, the process ends. On the other hand, when there is a frame left to be decoded, the processes from step S28-1are executed for a target frame left to be decoded.

Described below is an audio decoding program that causes a computer to operate as the audio decoding device28.FIG. 39shows an audio decoding program according to another embodiment.

An audio decoding program P28shown inFIG. 39may be executed in the computer shown inFIGS. 5 and 6. The audio decoding program P28can be provided in the same manner as the audio encoding program P10.

As shown inFIG. 39, the audio decoding program P28is comprised of the ACELP decoding module M16a1, the TCX decoding module M16a2, the Modified AAC decoding module M16a3, the core_mode extraction module M16e, the first selection module M16f, the lpd_mode extraction module M16g, the second selection module M16h, the MPS decoding module M16m, the SBR decoding module M16n, a header inspection module M28j, a header analysis module M28d, an extraction module M28b, and a selection module M28c.

Described below is an audio encoding device according to another embodiment.FIG. 40shows an audio encoding device according to another embodiment.FIG. 41shows a stream generated by the audio encoding device shown inFIG. 40.

The audio encoding device30shown inFIG. 40has the elements of the audio encoding device22, except an output unit30d. Namely, in the audio encoding device30, when GEM_ID is generated, the output unit30doutputs an output frame as an output frame of a first frame type including the long-term encoding scheme information. On the other hand, if the long-term encoding scheme information is not generated, the output unit30doutputs an output frame as an output frame of a second frame type including no long-term encoding scheme information.

FIG. 42is a flowchart showing an audio encoding method according to another embodiment. Described below with reference toFIG. 42are operations of the audio encoding device30and the audio encoding method according to another embodiment. It is noted that the processes shown inFIG. 42are the same as those shown inFIG. 28, except the processes of step S30-1and step S30-2. Therefore, step S30-1and step S30-2will be described below.

When input information is fed in step S22-1, step S30-1is carried out in which the output unit30dsets an output frame corresponding to an encoding target frame found at that point to the first frame type that includes the long-term encoding scheme information. On the other hand, when no input information is fed in step S22-1, step S30-2is carried out in which the output unit30dsets an output frame corresponding to an encoding target frame found at that point to the second frame type including no long-term encoding scheme information. In an embodiment, the input information is inputted when the first frame of the audio signal is inputted, and an output frame corresponding to the first frame is set to the first frame type.

When the frame type is changed depending upon the presence or absence of the long-term encoding scheme information as described above, it also becomes possible to notify the decoder side of the long-term encoding scheme information.

Described below is an audio encoding program that cause a computer to operate as the audio encoding device30.FIG. 43shows an audio encoding program according to another embodiment.

The audio encoding program P30shown inFIG. 43may be executed in the computer shown inFIGS. 5 and 6. Furthermore, the audio encoding program P30can be provided in the same manner as the audio encoding program P10.

As shown inFIG. 43, the audio encoding program P30is comprised of the encoding modules M10a1-10an, the generation module M22c, the selection module M22b, an output module M30d, and the inspection module M22e.

Described below is an audio decoding device that decodes a stream generated by the audio encoding device30.FIG. 44shows an audio decoding device according to another embodiment. The audio decoding device32shown inFIG. 44has the elements in the audio decoding device24, except an extraction unit32band a frame type inspection unit32d. The extraction unit32band the frame type inspection unit32dwill be described below.

The frame type inspection unit32dinspects a frame type of each frame in a stream fed to the input terminal In. Specifically, when the decoding target frame is a frame of the first frame type, the frame type inspection unit32dprovides the frame to the extraction unit30band the switch SW1. On the other hand, when the decoding target frame is a frame of the second frame type, the frame type inspection unit32dsends the frame to the switch SW1only. The extraction unit32bextracts the long-term encoding scheme information from inside the frame received from the frame type inspection unit32dand provides the long-term encoding scheme information to the selection unit24c.

FIG. 45is a flowchart of an audio decoding method according to another embodiment. Described below with reference toFIG. 45are operations of the audio decoding device32and an audio decoding method according to another embodiment. It is noted that in the processes shown inFIG. 45, the processes represented by reference characters including “S24” are the processes shown inFIG. 31. Described below are step S32-1and step S32-2, which are not shown inFIG. 31.

In step S32-1, the frame type inspection unit32danalyzes whether the decoding target frame is a frame of the first frame type. When it is judged in subsequent step S32-2that the decoding target frame is a frame of the first frame type, step S24-2is carried out in which the extraction unit32bextracts the long-term encoding scheme information from the frame. On the other hand, when it is determined in step S32-2that the decoding target frame is not a frame of the first frame type, the process proceeds to step S24-4. Namely, once a decoding unit is selected in step S24-3, the common decoding unit is continuously used until a next frame of the first frame type is fed.

Described below is an audio decoding program that causes a computer to operate as the audio decoding device32.FIG. 46shows an audio decoding program according to another embodiment.

An audio decoding program P32shown inFIG. 46may be executed in the computer shown inFIGS. 5 and 6. Furthermore, the audio decoding program P32can be provided in the same manner as the audio encoding program P10.

As shown inFIG. 46, the audio decoding program P24is comprised of the decoding modules M12a1-12an, an extraction module M32b, the selection module M24c, and a frame type inspection module M32d.

The decoding modules M12a1-12an, the extraction module M32b, the selection module M24c, and the frame type inspection module M32dcause the computer C10to perform the same functions as performed by the decoding units12a1-12an, the extraction unit32b, the selection unit24c, and the frame type inspection unit32d, respectively.

Described below is an audio encoding device according to another embodiment.FIG. 47shows an audio encoding device according to another embodiment. The audio encoding device34shown inFIG. 47is different from the audio encoding device18in the points described below. Namely, the audio encoding device34uses a common audio encoding scheme for some continuous frames of input frames and uses respective audio encoding schemes for some other frames. The audio encoding device34uses a common audio encoding scheme for first plurality of frames, uses respective audio encoding schemes for some subsequent frames, and uses a common audio encoding scheme for second plurality of frames subsequent thereto.FIG. 48shows a stream generated according to conventional AMR-WB+ and a stream generated by the audio encoding device shown inFIG. 47. As shown inFIG. 48, the audio encoding device34outputs frames of the first frame type including GEM_ID and frames of the second frame type not including GEM_ID.

As shown inFIG. 47, like the audio encoding device18, the audio encoding device34is comprised of the ACELP encoding unit18a1, the TCX encoding unit18a2, the encoding scheme judgment unit18f, the Mode bits generation unit18g, the analysis unit18m, the downmix unit18n, the high frequency band encoding unit18p, and the stereo encoding unit18q. The audio encoding device34is further comprised of an inspection unit34e, a selection unit34b, a generation unit34c, and an output unit34d. Described below are elements among the elements of the audio encoding device34which are different from those of the audio encoding device18.

The inspection unit34emonitors an input of input information to the input terminal In2. The input information indicates whether a common encoding scheme is to be used for audio signals of multiple frames. When the inspection unit detects an input of the input information, the selection unit34bdetermines whether the input information indicates that a common encoding scheme is to be used for audio signals of multiple frames. When the input information indicates that a common encoding scheme is to be used for audio signals of multiple frames, the selection unit34bcontrols the switch SW1to connect the switch SW1to the ACELP encoding unit18a1. This connection is maintained until an input of next input information is detected. On the other hand, when the input information does not indicate that a common encoding scheme is to be used for audio signals of multiple frames, i.e., when the input information indicates that respective encoding schemes are to be used for respective encoding target frames, the selection unit34bconnects the switch SW1to a path including the encoding scheme judgment unit18fand others.

When the inspection unit detects an input of the input information, the generation unit34cgenerates GEM_ID having a value according to the input information. Specifically, when the input information indicates that a common encoding scheme is to be used for audio signals of multiple frames, the generation unit34csets the value of GEM_ID to “1.” On the other hand, when the input information does not indicate that a common encoding scheme is to be used for audio signals of multiple frames, the generation unit34csets the value of GEM_ID to “0.”

When the inspection unit34edetects the input information, the output unit34dadopts an output frame corresponding to an encoding target frame found at that point as an output frame of the first frame type, adds GEM_ID generated by the generation unit34cin the output frame, and adds a coded sequence of an audio signal of the encoding target frame in the output frame. When the value of GEM_ID is 0, the output unit34dadds Mode bits[k] in the output frame. On the other hand, when the inspection unit34edetects no input information, the output unit adopts an output frame corresponding to the encoding target frame found at that point as an output frame of the second frame type and adds a coded sequence of an audio signal of the encoding target frame in the output frame. The output unit34doutputs the output frame generated as described above.

FIG. 49is a flowchart of an audio encoding method according to another embodiment. Described below with respect toFIG. 49are operations of the audio encoding device34and the audio encoding method according to 1 another embodiment. It is noted that in the processes shown inFIG. 49, the processes represented by reference characters including “S18” are the processes shown inFIG. 21. Described below are the processes among the processes in the flow shown inFIG. 49which are different from those inFIG. 21.

In the embodiment as shown inFIG. 49, in step S34-1, the inspection unit34emonitors an input of input information to the input terminal In2. When an input of input information is detected, subsequent step S34-2is carried out in which an output frame corresponding to the encoding target frame is adopted as an output frame of the first frame type. On the other hand, when an input of input information is not detected, subsequent step S34-3is carried out in which an output frame corresponding to the encoding target frame is adopted as an output frame of the second frame type.

It is then judged in step S34-4whether the input information indicates that encoding schemes are designated for respective frames. Namely, it is judged whether the input information indicates that a common encoding scheme is to be used for multiple frames. When the input information indicates that a common encoding scheme is to be used for multiple frames, subsequent step S34-5is carried out in which the value of GEM_ID is set to “1.” On the other hand, when the input information does not indicate that a common encoding scheme is to be used for multiple frames, subsequent step S34-6is carried out in which the value of GEM_ID is set to “0.”

It is judged in step S34-7whether GEM_ID is to be added. Specifically, if the encoding target frame being processed is the one found when an input of input information is detected, subsequent step S34-8is carried out in which GEM_ID is added and an output frame of the first frame type including a coded sequence is outputted. On the other hand, if the encoding target frame being processed is one found when an input of input information is detected, subsequent step S34-9is carried out in which an output frame of the second frame type including a coded sequence is outputted.

It is then judged in step S34-10whether there is any frame left to be encoded. When there is no frame left uncoded, the process ends. On the other hand, when there is a frame left to be encoded, the processes from step S34-1are executed for a target frame.

Describe below is an audio encoding program that cause a computer to operate as the audio encoding device34.FIG. 50shows an audio encoding program according to another embodiment.

The audio encoding program P34shown inFIG. 50may be executed in the computer shown inFIGS. 5 and 6. Furthermore, the audio encoding program P34can be provided in the same manner as the audio encoding program P10.

An audio encoding program P34is comprised of the ACELP encoding module M18a1, the TCX encoding module M18a2, a selection module M34b, a generation module M34c, an output module M34d, the encoding scheme judgment module M18f, the Mode bits generation module M18g, the analysis module M18m, the downmix module M18n, the high frequency band encoding module M18p, and the stereo encoding module M18q.

Described below is an audio decoding device that decodes a stream generated by the audio encoding device34.FIG. 51shows an audio decoding device according to another embodiment.

Like the audio decoding device20, an audio decoding device36shown inFIG. 51is comprised of the ACELP decoding unit20a1, the TCX decoding unit20a2, the Mode bits extraction unit20e, the decoding scheme selection unit20f, the high frequency band decoding unit20p, the stereo decoding unit20q, and the synthesis unit20m. The audio decoding device36is further comprised of a frame type inspection unit36d, an extraction unit36b, and a selection unit36c. Described below are elements among the elements of the audio decoding device36which are different from those of the audio decoding device20.

The frame type inspection unit36dinspects a frame type of each frame in a stream fed to the input terminal In. The frame type inspection unit36dsends a frame of the first frame type to the extraction unit36b, the switch SW1, the high frequency band decoding unit20p, and the stereo decoding unit20q. On the other hand, the frame type inspection unit36dsends a frame of the second frame type to the switch SW1, the high frequency band decoding unit20p, and the stereo decoding unit20qonly.

The extraction unit36bextracts GEM_ID from the frame received from the frame type inspection unit36d. The selection unit36ccontrols the switch SW1according to the value of GEM_ID extracted. Specifically, when the value of GEM_ID is “1,” the selection unit36ccontrols the switch SW1to connect the decoding target frame to the ACELP decoding unit20a1. When the value of GEM_ID is “1,” the ACELP decoding unit20a1is continuously selected until a next frame of the first frame type is fed. On the other hand, when the value of GEM_ID is “0,” the selection unit36ccontrols the switch SW1to connect the decoding target frame to the Mode bits extraction unit20e.

FIG. 52is a flowchart of an audio decoding method according to another embodiment. Described below with reference toFIG. 52are operations of the audio decoding device36and the audio decoding method according to another embodiment. It is noted that in the processes shown inFIG. 52, the processes including “S20” are the processes shown inFIG. 24. Described below are the processes among the processes in the flow shown inFIG. 52which are different from those shown inFIG. 24.

In the embodiment as shown inFIG. 52, in step S36-1, the frame type inspection unit36djudges whether the decoding target frame is a frame of the first frame type. When the decoding target frame is a frame of the first frame type, subsequent step S36-2is carried out in which the extraction unit36bextracts GEM_ID. On the other hand, when the decoding target frame is a frame of the second frame type, subsequent step S36-3is carried out in which existing GEM_ID is copied and used in the subsequent processes.

It is judged in step S36-4whether there is any frame left to be decoded. When there is no frame left to be decoded, the process ends. On the other hand, there is a frame left to be decoded, the processes from step S36-1are executed for a target frame.

Described below is an audio decoding program that causes a computer to operate as the audio decoding device36.FIG. 53shows an audio decoding program according to another embodiment.

The audio decoding program P36shown inFIG. 53may be executed in the computer shown inFIGS. 5 and 6. The audio decoding program P36can be provided in the same manner as the audio encoding program P10.

The audio decoding program P36is comprised of the ACELP decoding module M20a1, the TCX decoding module M20a2, an extraction module M36b, a selection module M36c, a frame type inspection module M36d, the Mode bits extraction module M20e, the decoding scheme selection module M20f, the high frequency band decoding module M20p, the stereo decoding module M20q, and the synthesis module M20m.

The various embodiments of the present invention have been described above. It should be noted that the present invention is not limited to the above-described embodiments and may be modified in many ways. For example, in some of the above-described embodiments, the ACELP encoding scheme and the ACELP decoding scheme are selected as an encoding scheme and a decoding scheme used commonly for multiple frames. However, the encoding scheme and decoding scheme used commonly are not always limited to the ACELP encoding scheme and decoding scheme. They may be any audio encoding scheme and audio decoding scheme. Furthermore, aforementioned GEM_ID may be GEM_ID set in any bit size and value.