The present invention relates to a coding method and a decoding method for audio signals, such as speech signals, and a device and a program using the methods and, in particular, to a technique for compensating for information lost during coding and transmission of information, in which a code obtained by using a portion of lost information is added to a code transmitted to recover lost information during decoding.
When data is lost during coding of an input signal at a low bit rate or during transmission of such coded data, an extremely large difference between the input signal and a decoded signal (coding distortion) can be caused by lack of bits or lost bits. A large coding distortion can be perceived as uncomfortable noise. In one existing technique for concealing noise caused by data losses during transmission, a certain feature quantity of a signal is obtained and a previous decoded signal having a feature quantity close to that of the decoded signal is copied (Patent literature 1).
A speech feature quantity coding part 50 quantizes the speech feature quantity so that the speech feature quantity can be expressed by a predetermined number of bits, and then transforms the quantized speech feature quantity to a code. The coded speech feature quantity is sent to a shift buffer 60. The shift buffer 60 holds the speech feature quantity codes of a prespecified number of frames. When delay control information, which will be described later, is input in the shift buffer 60, the shift buffer 60 sends the code of the speech feature quantity of the speech signal of a frame the number of frames earlier specified in the delay control information, that is, a past frame, to the packet building part 70. A remaining buffer capacity coding part 20 receives a remaining buffer capacity and codes the remaining buffer capacity. The remaining buffer capacity code is also sent to the packet building part 70. The packet building part 70 uses the code of the speech signal waveform, the code of the speech feature quantity, the delay control information and the remaining buffer capacity code to build a packet. A packet transmitting part 80 receives the packet information built by the packet building part 70 and sends out the packet information onto a packet communication network as a speech packet.
A packet receiving part 81 of the speech signal receiver 2 receives the speech packet through the packet communication network and stores the speech packet in a receiver buffer 71. The code of the speech signal waveform contained in the received speech packet is sent to a speech packet decoding part 31, where the code is decoded. In a frame in which no packet loss has occurred, the signal output from the speech packet decoding part 31 is output as an output speech signal through a selector switch 32. A remaining buffer capacity decoding part 21 obtains, from the remaining buffer capacity code contained in the received speech packet, delay control information that specifies the number of frames by which auxiliary information is to be delayed and added to a packet. The obtained delay control information is sent to the shift buffer 60 and the packet building part 70 in
A loss detecting part 90 detects a packet loss. Packets received at the packet receiving part 81 are stored in the receiver buffer 71 in the order of packet number, that is, frame number. The packets stored are read from the receiver buffer 71 and, if a packet to be read is missing, the loss detecting part 90 determines that a packet loss has occurred immediately before the reading operation and turns the selector switch 32 to the output side of the loss processing control part. The invention in Patent literature 1 performs the process described above to conceal noise caused by data loss during transmission.
The loss processing control part functions as follows. Suppose that a packet loss has occurred in frame n. When a packet loss occurs, a receiver buffer searching part 100 searches through the received packets stored in the receiver buffer 71 for a packet that is close in time to the lost frame n (a packet with the timestamp closest to that of the lost packet) among the packets received in frame n+1 or later frames. The code of a speech signal waveform contained in the packet is decoded by a read-ahead speech waveform decoding part 32 to obtain a speech signal waveform. The receiver buffer searching part 100 further searches through the packets stored in the receiver buffer 71 for a packet to which auxiliary information corresponding to the speech signal in the lost frame n has been added. If such a packet is found by the packet search, a speech feature quantity decoding part 51 decodes the found auxiliary information corresponding to the speech signal in the lost frame n into pitch information and power information of the speech signal in the lost frame n and sends the pitch information and the power information to a lost signal generating part 110. On the other hand, the output speech signal is stored in an output speech buffer 130. If such packet is not found by the packet search, the pitch period of the output signal in the output speech buffer 130 is analyzed by a pitch extracting part 120. The pitch extracted by the pitch extracting part 120 is the pitch corresponding to the speech signal in the frame n−1 immediately preceding the lost frame. The pitch corresponding to the speech signal in the immediately preceding frame n−1 is sent to the lost signal generating part 110. The lost signal generating part 110 uses the pitch information sent from the speech feature quantity decoding part 51 or the pitch extracting part 120 to extract a speech waveform from the output speech buffer on a pitch-by-pitch basis and generates a speech waveform corresponding to the lost packet. Thus, more natural decoded speech can be obtained in case of packet loss, because the waveform is repeated on a pitch-by-pitch basis of the speech waveform corresponding to the lost packet, rather than repeating a waveform on a pitch-by-pitch basis of the packet immediately before the lost packet.
The invention in Patent literature 1 encodes a feature quantity such as a pitch or power and transmits the feature quantity with a time delay. Therefore, if a packet to be decoded is missing, the invention in Patent literature 1 can synthesize a signal close to the lost signal by decoding a coded feature quantity and obtaining a signal that has a value close to the feature quantity from the receiver buffer. However, the invention in Patent literature 1 has a problem that processing for generating high-quality decoded speech cannot be performed with an encoder and a decoder alone because some feature quantity needs to be encoded and transmitted and information concerning the receiver buffer needs to be communicated to the transmitter.
A coding method of the present invention includes a source signal sequence generating step, a signal coding step, a signal decoding step, a local decoding coefficient searching step, and a code multiplexing step. The source signal sequence generating step generates a signal sequence including a predetermined number of signals from an audio signal and outputs the signal sequence as a source signal sequence to be coded. For example, an audio signal is divided into frames, each containing a predetermined number of signals, and the sequence signals making up one frame is output as a source signal sequence to be coded. Alternatively, a frame may be further divided into sub-frames and a signal sequence making up each sub-frame may be output as a source signal sequence to be coded. Alternatively, a signal sequence in a frame or in neighboring several frames may be frequency-transformed to a frequency-domain signal sequence and the frequency-domain signal sequence may be output as a source signal sequence to be coded. Alternatively, a frequency-domain signal sequence may be divided into sub-bands and frequency-domain signals making up a sub-band may be output as a source signal sequence to be coded. The signal coding step codes each source signal sequence and outputs a code index. The signal decoding step decodes the code index and outputs a decoded signal sequence. The local decoding coefficient searching step outputs replication shift information from the source signal sequence and the decoded signal sequence. The code multiplexing step multiplexes at least the code index and the replication shift information to generate a transmitter signal.
The local decoding coefficient searching step includes a replication determining sub-step, a candidate replication shift signal sequence generating sub-step, a distance calculating sub-step, and a minimum distance shift amount finding sub-step. The replication determining sub-step determines, for each source signal sequence, whether or not a candidate replication shift signal sequence is to be generated from a decoded signal sequence, and outputs a replication determination flag. For example, if the power of the decoded signal sequence is less than or equal to a threshold value, the replication determining sub-step may output a replication determination flag indicating that a candidate replication shift signal sequence is to be generated. Alternatively, if the power of the difference between the source signal sequence and the decoded signal sequence is greater than a threshold value, the replication determining sub-step may output a replication determination flag indicating that a candidate replication shift signal sequence is to be generated. Alternatively, the signal decoding step may calculate the number of bits to be allocated to each source signal sequence and output the number of bits as bit allocation information and the replication determination step may output a replication determination flag indicating that a candidate replication shift signal sequence is to be generated if the number of bits to be allocated to the source signal sequence is less than or equal to a threshold value.
The candidate replication shift signal sequence generating sub-step generates a candidate replication shift signal sequence for each predetermined candidate shift amount if the replication determination flag indicates that a candidate replication shift signal sequence is to be generated. For example, a candidate replication shift signal sequence {dot over (S)}τ[k] (where k=0, . . . , L−1 and L is the number of signals in the source signal sequence) may be obtained from a decoded signal sequence Ŝ[k]. If the source signal sequence is one of sub-band frequency-domain signal sequences S(w)[k] into which a frequency-domain signal sequence has been divided according to frequency bands (where w=0, . . . , W−1, k=0, . . . , L′−1, W is the number of divisions, and L′ is the number of signals included in one sub-band frequency-domain signal sequence), the candidate replication shift signal sequence generating step may use a decoded signal sequence Ŝ(w)[k] corresponding to a sub-band frequency-domain signal sequence provided by dividing the same frequency domain signal sequence to obtain a candidate replication shift signal sequence {dot over (S)}τ(w)[k].
The distance calculating sub-step calculates a parameter representing the distance between predetermined signal sequences. The parameter representing the distance between predetermined signal sequences may be a parameter representing the distance between a candidate replication shift signal sequence and the source signal sequence or may be a parameter representing the distance between the source signal sequence and a candidate complementary decoded signal sequence which is a candidate replication shift signal sequence plus a decoded signal sequence. Alternatively, a signal sequence may be considered a vector and the parameter representing the distance between signal sequences may be the sum of squares of the difference between elements of the vector (Euclidean distance) or may be the inner product of two signal sequences. The minimum distance shift amount finding sub-step obtains a signal shift amount that minimizes the distance from the results of calculation at the distance calculating sub-step (the parameter representing the distance). The signal shift amount to be selected depends on the method of calculation used at the distance calculating sub-step (the parameter representing the distance). If the parameter representing the distance is Euclidean distance, a signal shift amount that minimizes the parameter representing the distance may be selected. If the parameter representing the distance is inner product, a signal shift amount that maximizes the parameter representing the distance may be selected.
A decoding method of the present invention includes a code demultiplexing step, a signal decoding step, a local decoding coefficient replicating step, and a recovered signal generating step. The code demultiplexing step reads a code index and replication shift information from a received signal and output the code index and the replication shift information. If the received signal also includes replication determination flag, the code demultiplexing step also outputs the replication determination flag. The signal decoding step decodes the code index and outputs a decoded signal sequence. The local decoding coefficient replicating step generates a complementary decoded signal sequence from the decoded signal sequence and the replication shift information. The recovered signal generating step generates a recovered signal which is a signal representing original audio information from the complementary decoded signal sequence. The complementary decoded signal sequence corresponds to the source signal sequence, examples of which have been given in the description of the coding method. That is, the complementary decoded signal sequence may be a signal sequence making up a frame, a signal sequence making up a sub-frame, a frequency-domain signal sequence, or a signal sequence making up a sub-band, for example. The recovered signal generating step recovers any of these types of complementary decoded signal sequences to the original audio signal and may perform processing that is determined appropriately for the type of the complementary decoded signal sequence.
The local decoding coefficient replicating step includes a replication determining sub-step, a replication shift signal sequence generating sub-step, and a complementary decoded signal sequence generating sub-step. The replication determining sub-step determines whether or not a replication shift signal sequence is to be generated from a decoded signal sequence or from the result of bit allocation performed using a first decoded signal, and outputs a replication determination flag. If the received signal also includes a replication determination flag, the replication determining sub-step is not required.
The replication shift signal sequence generating sub-step generates a replication shift signal sequence on the basis of the shift amount indicated by the replication shift information if the replication determination flag indicates that a candidate replication shift signal sequence is to be generated. For example, a candidate replication shift signal sequence {dot over (S)}τ[k] may be obtained from a decoded signal sequence Ŝ[k] and the shift amount indicated by the replication shift information. If a decoded signal sequence Ŝ(w)[k] is a signal sequence corresponding to a sub-band frequency-domain signal sequence S(w)[k] provided by dividing a frequency-domain signal sequence according to frequency bands, the replication shift signal sequence generating sub-step may obtain the replication shift signal sequence {dot over (S)}(w)[k] by using a decoded signal sequence Ŝ(w)[k] corresponding to a sub-band frequency-domain signal sequence provided by dividing the same frequency-domain signal sequence.
The complementary decoded signal sequence generating sub-step sets the replication shift signal sequence as a complementary decoded signal sequence and outputs the complementary decoded signal if the replication determination flag indicates that a candidate replication shift signal sequence is to be generated. If the replication determination flag indicates that a candidate replicated signal sequence is not to be generated, the complementary decoded signal sequence generating sub-step sets and outputs the decoded signal sequence as a complementary decoded signal sequence. The complementary decoded signal sequence generating sub-step may add the decoded signal sequence and the replication shift signal sequence together and output the sum as a complementary decoded signal sequence if the replication determination flag indicates that a candidate replication shift signal sequence is to be generated.
According to the coding method and the decoding method of the present invention, a signal obtained by shifting a decoded signal in time domain or frequency domain is copied or added to the decoded signal to reduce coding distortion and reduce auditory noise.
Because the signal to be copied is obtained by shifting the decoded signal in time domain or frequency domain, the following effects can be attained. The number of bits required for reducing noise can be reduced because bits for sending the signal to be copied are not required. In particular, when a frequency band is divided into frequency band equal-sized blocks (hereinafter referred to as “sub-bands”), signals corresponding to the sub-bands have correlation to one another. Therefore, particularly in high frequency bands such as 4 to 14 kHz, auditory noise can be reduced by copying or adding a signal in a neighboring sub-band to a sub-band to generate a signal of the sub-band. For a signal in time domain, when a frame is divided into equal-sized blocks (hereinafter referred to as “sub-frames”), signals corresponding to the sub-frames have correlation to one another. Therefore, auditory noise can be reduced by copying or adding the signal in a neighboring sub-frame to a sub-frame to generate a signal of the sub-frame.
Furthermore, since the signal to be copied or added to the decoded signal is generated by shifting the decoded signal in time domain or frequency domain and the amount of the shift when the distance between the input signal and a new decoded signal generated from the original decoded signal and the generated decoded signal is minimum is coded with a small number of bits and transmitted, the signal to be added or copied to the decoded signal for reducing coding distortion can be specified with a small number of bits.
Thus, auditory noise caused by a frequency band or a time range that has a large coding distortion can be reduced and the subjective quality of the decoded signal can be improved by using only a small number of bits.
Embodiments of the present invention will be described below in detail. Like numerals are given to components having like functions and repeated description of those components will be omitted. The term “signal sequence” in the following description refers to one of sets of predetermined number of signals into which a signal is divided for coding and decoding. A signal sequence can be considered a vector having a predetermined number of elements. In this case, the individual signals are considered the elements of the vector. The term “signal(s)” refers to a series of signals not divided into sets of predetermined number of signals or to a single signal.
Coding Device
The coding device 100 includes a frame building part 1010, a signal coding part 1030, a signal decoding part 1031, a local decoding coefficient searching part 1000, and a code multiplexing part 1040. The frame building part 1010 converts an audio signal captured through a sensor such as a microphone to audio signal samples in digital form and combines a predetermined number L of audio signal samples together to build a frame. The frame building part 1010 applies time-frequency transform to each frame and outputs a frequency-domain signal sequence S[k] (k=0, . . . , L−1) corresponding to the predetermined number L of audio signal samples (S1010). The time-frequency transform may be discrete Fourier transform, discrete cosine transform, or modified discrete cosine transform (MDCT).
The signal coding part 1030 encodes each source signal sequence and outputs a code index (S1030). For example, the signal coding part 1030 assumes a frequency-domain signal sequence S[k] (k=0, . . . , L−1) to be an L-dimensional vector, performs vector quantization on the frequency-domain signal vector and outputs a code index Ic. In the vector quantization, a codevector that is at the minimum distance to the frequency-domain signal vector is selected from the codebook and the index of the selected codevector is output as the code index Ic. If Euclidean distance is used as the definition of the parameter representing the distance, a codevector is selected according to Equation (1) given below.
If the inner product between vectors is used as the definition of the parameter representing the distance, a codevector is selected according to Equation (2).
Here, the pth codevector stored in the codebook is represented by C(p)=(C0(p), C1(p), . . . , CL−1(p)). Ck(p) represents the pth element of the pth vector.
The signal decoding part 1031 decodes the code index and outputs a decoded signal sequence (S1031). For example, the signal decoding part 1031 reads a codevector C(c)=(C0(c), C1(c), . . . , CL−1(c)) corresponding to the code index Ic from the codebook and outputs a decoded signal sequence Ŝ[k] (k=0, . . . , L−1). The decoded signal sequence Ŝ[k] can be obtained by using the codevector C(c) as: Ŝ[0]=C0(c), Ŝ[1]=C1(c), . . . , Ŝ[L−1]=CL−1(c).
The local decoding coefficient searching part 1000 outputs a replication shift information τr from a frequency-domain signal sequence S[k], which is the source signal sequence, and the decoded signal sequence Ŝ[k] (S1000). As illustrated in
P=Σ
k=0
L−1
Ŝ
2
[k] (3)
The candidate replication shift signal sequence generating part 1002 does not perform processing if the replication determination flag Flagd indicates that a candidate replication shift signal sequence is not to be generated (if Flagd=0). If the replication determination flag Flagd indicates that a candidate replication shift signal sequence is to be generated (if Flagd=1), the candidate replication shift signal sequence generating part 1002 generates a candidate replication shift signal sequence {dot over (S)}τ[k] for each predetermined candidate signal shift amount τ=τ0, . . . , τM (S1002). For example, a candidate replication shift signal sequence {dot over (S)}τ[k] may be obtained as:
{dot over (S)}
τ
[k]=Ŝ[−L−τ+k]
The distance calculating part 1003 calculates a parameter representing the distance between each candidate replication shift signal sequence {dot over (S)}τ[k] and the frequency-domain signal sequence S[k] (hereinafter referred to as the “distance parameter”) (S1003). The distance parameter may be calculated using a method such as those given below. Each signal sequence may be considered a vector and d[τ] (τ=τ0, . . . , τM), which is a distance parameter between two vectors, may be calculated according to Equation (4) or (5). Equation (4) represents the Euclidean distance and Equation (5) represents the inner product. However, the equation for calculating the distance parameter is not limited to these equations.
d[τ]=Σ
k=0
L−1(S[k]−{dot over (S)}τ[k])2 (4)
d[τ]=Σ
k=0
L−1(S[k]·{dot over (S)}τ[k]) (5)
If the distance parameter is calculated according to Equation (4), the minimum distance shift amount finding part 1004 obtains a signal shift amount τ that minimizes the distance parameter d[τ] and outputs the signal shift amount τ as replication shift information τr (S1004). Specifically, the replication shift information τr is obtained according to Equation (6).
If the distance parameter is calculated according to Equation (5), the minimum distance shift amount finding part 1004 obtains a signal shift amount τ that maximizes the distance parameter d[τ] and outputs the signal shift amount τ as replication shift information τr (S1004). Specifically, the replication shift information τr is obtained according to Equation (7).
The code multiplexing part 1040 multiplexes code indices Ic and replication shift information τr to generate a transmitter signal (S1040). Specifically, the code multiplexing part 1040 receives code indices Ic and replication shift information τr as inputs and arranges them in a predetermined order to generate one dataset. If the signal is transmitted through a network such as an IP network, the code multiplexing part 1040 adds required header information to generate packets.
Decoding Device
The decoding device 200 includes a code demultiplexing part 2041, a signal decoding part 2031, a local decoding coefficient replicating part 2100, a frequency-time transform part 2021, and an overlap-add part 2011. The combination of the frequency-time transform part 2021 and the overlap-add part 2011 will be referred to as a recovered signal generating part 2012. The code demultiplexing part 2041 reads a code index Ic and replication shift information τr from a received signal and outputs them (S2041). The signal decoding part 2031 decodes the code index Ic and outputs a decoded signal sequence Ŝ[k] (k=0, . . . , L−1) (S2031).
The local decoding coefficient replicating part 2100 generates a complementary decoded signal sequence S˜[k] (k=0, . . . , L−1) from the decoded signal sequence Ŝ[k] and the replication shift information τr (S2100). As illustrated in
If the replication determination flag Flagd indicates that a candidate replication shift signal sequence is to be generated (if Flagd=1), the replication shift signal sequence generating part 2002 generates a replication shift signal sequence {dot over (S)}τ[k] on the basis of the shift amount τ indicated by the replication shift information τr (S2002). For example, the candidate replication shift signal sequence {dot over (S)}τ[k] may be obtained from the decoded signal sequence Ŝ[k] and the shift amount τ indicated by the replication shift information as:
{dot over (S)}
τ
[k]=Ŝ[−L−τ+k]
If the replication determination flag Flagd indicates that a candidate replication shift signal sequence is to be generated (if Flagd=1), the complementary decoded signal sequence generating part 2006 sets the replication shift signal sequence {dot over (S)}[k] as a complementary decoded signal sequence {tilde over (S)}[k] and outputs the complementary decode signal {tilde over (S)}[k] (S2006), if the replication determination flag Flagd indicates that a candidate replication shift signal sequence is not to be generated (if Flagd=0), the complementary decoded signal sequence generating part 2006 sets the decoded signal sequence Ŝ[k] as a complementary decoded signal sequence {tilde over (S)}[k] and outputs the complementary decoded signal sequence {tilde over (S)}[k] (S2006). Specifically, one of the following equations
is used to obtain a complementary decoded signal sequence {tilde over (S)}[k].
The recovered signal generating part 2012 generates a recovered signal, which is a signal representing original audio information, from the complementary decoded signal sequence {tilde over (S)}[k] (S2012). In the present embodiment, the source signal sequence is a frequency-domain signal sequence S[k]. That is, the complementary decoded signal sequence {tilde over (S)}[k] is a signal in frequency domain. The recovered signal generating part 2012 therefore includes the frequency-time transform part 2021 and the overlap-add part 2011. The frequency-time transform part 2021 transforms the frequency-domain signal sequence S[k] to a time-domain signal sequence including L samples (S2021). The overlap-add part 2011 overlaps a half of each frame length of a signal obtained by multiplying the time-domain signal sequence by a window function with a half of the next frame and adds the overlapped portions together to calculate a recovered signal and provides the recovered signal (S2011).
The coding device and the decoding device of the first embodiment reduce coding distortion and auditory noise by shifting a decoded signal in time domain or frequency domain and copying or adding the signal resulted from the shifting to the decoded signal. Accordingly, auditory noise can be reduced and a decoded signal with improved subjective quality can be provided using only a small number of bits.
The coding device 100′ and the decoding device 200′ are similar to the coding device 100 and the decoding device 200, respectively, with the only difference being signal sequences to be coded. Therefore, only the processes performed by a source signal sequence generating part 1012′ and a recovered signal generating part 2012′ are different from those in the coding device 100 and the decoding device 200.
The source signal sequence generating part 1012′ is formed by a frame building part 1010′. The frame building part 1010′ converts an audio signal captured through a sensor such as a microphone to audio signal samples in digital form and combines a predetermined number L of audio signal samples together to build a frame. The frame building part 1010′ outputs signal sequences s[k] (k=0, . . . , L−1) in frames (hereinafter referred to as “frame signal sequences”) (S1010′). The processes performed by the other components of the coding device 100′ are the same as those of the coding device 100.
In the decoding device 200′, a complementary decoded signal sequence {tilde over (s)}[k] (k=0, . . . , L−1) corresponds to a frame signal sequence s[k]. That is, a complementary decoded signal sequence {tilde over (s)}[k] in the variation is a time-domain signal sequence. Accordingly, the recovered signal generating part 2012′ does not require a frequency-time transform part and includes only an overlap-add part 2011. The overlap-add part 2011 overlaps a half of each frame length of a signal obtained by multiplying the time-domain signal sequence by a window function with a half of the next frame and adds the overlapped portions together to calculate a recovered signal and provides the recovered signal (S2011).
With the configuration described above, the coding device and the decoding device of the variation have the same effects as the coding and decoding devices of the first embodiment.
Coding Device
The coding device 150 includes a frame building part 1010, a signal coding part 1030, a signal decoding part 1031, a local decoding coefficient searching part 1500, and a code multiplexing part 1540. The frame building part 1010, the signal coding part 1030 and the signal decoding part 1031 are the same as those of the coding device 100 of the first embodiment.
The local decoding coefficient searching part 1500 outputs replication shift information τr and a replication determination flag Flagd from a frequency-domain signal sequence S[k], which is a source signal sequence to be coded, and a decoded signal sequence Ŝ[k] (S1500). As illustrated in
P=Σ
k=0
L−1(S[k]−Ŝ[k])2 (9)
The candidate replication shift signal sequence generating part 1002 is the same as that of the first embodiment. The distance calculating part 1503 adds the candidate replication shift signal sequence and the decoded signal sequence Ŝ[k] to obtain a candidate complementary decoded signal sequence {tilde over (S)}τ[k] and calculates a parameter representing the distance between the candidate complementary decoded signal sequence {tilde over (S)}τ[k] and the frequency-domain signal sequence S[k] (S1503). The distance parameter may be calculated using a method such as those given below. Each signal sequence may be considered a vector and d[τ] (τ=τ0, . . . , τM), which is a distance parameter between two vectors, may be calculated according to Equation (10) or (11). Equation (10) represents the Euclidean distance and Equation (11) represents the inner product. However, the equation for calculating the distance parameter is not limited to these equations.
The minimum distance shift amount finding part 1004 is the same as that of the first embodiment.
The code multiplexing part 1540 multiplexes code indices replication shift information τr and replication determination flags Flagd to generate a transmitter signal (S1040). Specifically, the code multiplexing part 1540 receives code indices IC, replication shift information τr and replication determination flags Flagd as inputs and arranges them in a predetermined order to generate one dataset. If the signal is transmitted through a network such as an IP network, the code multiplexing part 1540 adds required header information to generate packets.
Decoding Device
A decoding device 250 includes a code demultiplexing part 2541, a signal decoding part 2031, a local decoding coefficient replicating part 2500, a frequency-time transform part 2021, and an overlap-add part 2011. The combination of the frequency-time transform part 2021 and the overlap-add part 2011 will be referred to as a recovered signal generating part 2012. The code demultiplexing part 2541 reads a code index Ic, replication shift information τr and replication determination flag Flagd from a received signal and outputs them (S2541). The signal decoding part 2031 is the same as that of the first embodiment.
The local decoding coefficient replicating part 2500 generates a complementary decoded signal sequence {tilde over (S)}[k] (k=0, . . . , L−1) from a decoded signal sequence Ŝ[k], the replication shift information τr, and the replication determination flag Flagd (S2500). As illustrated in
As illustrated in
{tilde over (S)}[k]=Ŝ[k]+{dot over (S)}
τ
[k] (k=0, . . . , L−1) (12)
is calculated to obtain the complementary decoded signal sequences {tilde over (S)}[k].
The recovered signal generating part 2012 is the same as that of the first embodiment.
With the configuration described above, coding distortion due to a large difference between a source signal sequence and a decoded signal sequence can be reduced.
Coding Device
The coding device 300 includes a frame building part 1010, a band dividing part 3050, a signal coding part 3030, a signal decoding part 3031, a local decoding coefficient searching part 3000, and a code multiplexing part 1540. The frame building part 1010 and the code multiplexing part 1540 are the same as those of the coding device 150 of the second embodiment. The band dividing part 3050 divides a frequency-domain signal sequence S[k] (k=0, . . . , L−1) into multiple sub-band frequency-domain signal sequences S(w)[k] (w=0, . . . , W−1 and k=0, . . . , L′−1) as illustrated in
The signal coding part 3030 performs processing similar to the processing by the signal coding part 1030 of the first embodiment, with the only difference being that sub-band frequency-domain signal sequences are coded instead of frequency-domain signal sequences. The signal coding part 3030 outputs code indices IC(w) for the sub-band frequency-domain signal sequences S(w)[k] (S3030).
The signal decoding part 3031 performs the processing similar to the processing by the signal decoding part 1031 of the first embodiment with the only difference being that sub-band frequency-domain signal sequences are coded for the code indices Ic(w) instead of frequency-domain signal sequences. The signal decoding part 3031 outputs decoded signal sequences Ŝ(w)[k] (w=0, . . . , W−1 and k=0, . . . , L′−1) (S3031).
The local decoding coefficient searching part 3000 outputs replication shift information τr(w) and replication determination flags Flagd(w) from the sub-band frequency-domain signal sequence S(w)[k] and the decoded signal sequence Ŝ(w)[k] (S3000). As illustrated in
The replication determining part 3001 is similar to that of the second embodiment, with the only difference being the number of signals contained in a source signal sequence. Specifically, the replication determining part 3001 determines whether or not a candidate replication shift signal sequence {dot over (S)}τ(w)[k](τ=τ0, . . . , τM, where M is the number of candidate signal shift amounts τ) is to be generated from the power of a difference signal between the sub-band frequency-domain signal sequence S(W)[k] and the decoded signal sequence Ŝ(w)[k] and outputs a replication determination flag Flagd(w) (S3001). For example, if the power P of the difference signal (S(w)[k]−Ŝ(w)[k]) between the sub-band frequency-domain signal sequence S(w)[k] and a decoded signal sequence Ŝ(w)[k] exceeds a threshold value, the replication determining part 3001 may output a replication determination flag Flagd(w) indicating that a candidate replication shift signal sequence {dot over (S)}τ(w)[k] is to be generated (for example Flagd(w)=1); if the power P is less than or equal to the threshold value, the replication determining part 3001 may output a replication determination flag Flagd(w) indicating that a candidate replication shift signal sequence {dot over (S)}τ(w)[k] is not to be generated (for example Flagd(w)=0). The power of the difference signal (S(w)[k]−Ŝ(w)[k]) may be calculated according to Equation (9), for example.
P=Σ
k=0
L−1(S(w)[k]−Ŝ(w)[k])2 (13)
If the replication determination flag Flagd(w) indicates that a candidate replication shift signal sequence is not to be generated (when Flagd(w)=0), the candidate replication shift signal sequence generating part 3002 does not perform processing. If the replication determination flag Flagd(w) indicates that a candidate replication shift signal sequence is to be generated (when Flagd(w)=1), the candidate replication shift signal sequence generating part 3002 generates a candidate replication shift signal sequence {dot over (S)}τ(w)[k] for each predetermined candidate signal shift amount τ=τ0, . . . , τM (S3002). For example, candidate sub-band replication shift signal sequences {dot over (S)}(w)[k] are generated from decoded signal sequences of the neighboring sub-bands as:
According to Equation (14), candidate replication shift signal sequences {dot over (S)}τ(w)[k] are generated from decoded signal sequences corresponding to sub-band frequency-domain signal sequences provided by dividing the same original frequency-domain signal sequence. Because sub-band frequency-domain signal sequences provided by dividing the same frequency-domain signal sequence generally have a strong correlation to one another, candidate sub-band replication shift signal sequences {dot over (S)}τ(w)[k] close in distance can be obtained.
The distance calculating part 3003 and the minimum distance shift amount finding part 3004 are similar to those of the first and second embodiments, with the only difference being the number of signals in a signal sequence. The code multiplexing part 1540 is the same as that of the second embodiment.
Decoding Device
The decoding device 400 includes a code demultiplexing part 4041, a signal decoding part 4031, a local decoding coefficient replicating part 4100, a sub-band combining part 4051, a frequency-time transform part 2021, and an overlap-add part 2011. The combination of the sub-band combining part 4051, the frequency-time transform part 2021 and the overlap-add part 2011 will be referred to as a recovered signal generating part 4012. The code demultiplexing part 4041 reads code indices Ic(w), replication shift information τr(w) and replication determination flags Flagd(w) from a received signal and outputs them (S4041). The signal decoding part 4031 decodes the code indices Ic(w) and outputs sub-band decoded signal sequences Ŝ(w)[k] (k=0, . . . , L−1) (S4031).
The local decoding coefficient replicating part 4100 generates sub-band complementary decoded signal sequences {tilde over (S)}(w)[k] (k=0, . . . , L−1) from the sub-band decoded signal sequences Ŝ(w)[k], the replication shift information τr(w) and the replication determination flags Flagd(w) (S4100). As illustrated in
The replication shift signal sequence generating part 4002 outputs sub-band replication shift signal sequences {dot over (S)}[k] (w=0, . . . , W−1 and k=0, . . . , L′−1) in the same way as the candidate replication shift signal sequence generating part 3002 does (S4002). For example, if the candidate replication shift signal sequence generating part 3002 has generated candidate replication shift signal sequences {dot over (S)}τ(w)[k] according to Equation (14), the replication shift signal sequence generating part 4002 may generate the sub-band replication shift signal sequences {dot over (S)}(w)[k] according to Equation (15).
The complementary decoded signal sequence generating part 4005 adds the sub-band replication shift signal sequence {dot over (S)}(w)[k] and the decoded signal sequence Ŝ(w)[k] to generate and output a sub-band complementary decoded signal sequence {tilde over (S)}(w)[k] (S4005).
The sub-band combining part 4051 combines sub-band complementary decoded signal sequences to generate a complementary decoded signal sequence as illustrated in
With the configuration described above, the coding device and the decoding device of the third embodiment have the same effects as the coding and decoding devices of the first and second embodiments. In addition, the coding and decoding device of the third embodiment can further reduce auditory noise because they can reduce errors in frequency bands in which high distortion is caused by coding.
[Variation]
The coding device 300′ and the decoding device 400′ are similar to the coding device 300 and the decoding device 400, respectively, with the only difference being source signal sequences. Accordingly, only processes performed by the source signal sequence generating part 3012′ and the recovered signal generating part 4012′ differ from those in the coding and decoding devices 300 and 400.
The source signal sequence generating part 3012′ includes a frame building part 1010′ and a frame dividing part 3050′. The frame building part 1010 converts an audio signal captured through a sensor such as a microphone to audio signal samples in digital form and combines a predetermined number L of audio signal samples into a frame. The frame building part 1010′ outputs signal sequences s[k] (k=0, . . . , L−1) in frames (hereinafter referred to as “frame signal sequences”) (S1010′). The frame dividing part 3050′ divides a frame signal sequence into sub-frame signal sequences s(w)[k] (w=0, . . . , W−1 and k=0, . . . , L′−1) (S3050′). The processes performed by the other components of the coding device 300′ are the same as those in the coding device 300.
In the decoding device 400′, a complementary sub-frame decoded signal sequence {tilde over (s)}(w)[k] (w=0, . . . , W−1 and k=0, . . . , L′−1) corresponds to a sub-frame signal sequence s(w)[k]. That is, a complementary sub-frame decoded signal sequence {tilde over (s)}(w)[k] in the variation is a time-domain signal sequence. Accordingly, the recovered signal generating part 4012′ does not require a frequency-time transform part and includes only a sub-frame combining part 4051′ and an overlap-add part 2011. The sub-frame combining part 4051′ combines the complementary sub-frame decoded signal sequences {tilde over (s)}(w)[k] to generate a complementary decoded signal sequence {tilde over (s)}[k] (S4051′). The overlap-add part 2011 overlaps a half of each frame length of a signal obtained by multiplying the complementary decoded signal sequence {tilde over (s)}[k] by a window function with a half of the next frame and adds the overlapped portions together to calculate a recovered signal and provides the recovered signal (S2011).
With the configuration described above, the coding device and the decoding device of the variation have the same effects as the coding and decoding devices of the third embodiments.
Coding Device
The coding device 500 includes a frame building part 1010, a band dividing part 3050, a signal coding part 5030, a signal decoding part 5031, a local decoding coefficient searching part 5000, and a code multiplexing part 5040. The frame building part 1010 and the band dividing part 3050 are the same as those of the coding device 300 of the third embodiment.
As illustrated in
The wth sub-band average amplitude indicator can be used to calculate the wth sub-band average amplitude A′[w] according to the following equation.
A′[w]=2Ã[w]
Then the first coding part 5033 quantizes the wth sub-band first parameter (w=0, . . . , W−1) and outputs a first signal code index IA. If the wth sub-band average amplitude indicator Ã[w] (w=0, . . . , W−1) is used as the wth sub-band first parameter, the first coding part 5033 assumes the wth sub-band average amplitude indicator Ã[w] to be a W-dimensional vector and applies vector quantization to the wth sub-band average amplitude indicator Ã[w] and outputs the index of a selected codevector as the first signal code index IA. Alternatively, binary coding or Huffman coding may be used to encode the wth sub-band first parameter for each sub-band.
The first local decoding part 5034 decodes the first signal code index IA and outputs a wth sub-band first decoded parameter (w=0, . . . , W−1). For example, if the first coding part 5033 has encoded the wth sub-band average amplitude indicator Ã[w], the first local decoding part 5034 outputs a wth sub-band decoded average amplitude indicator Â[w] (w=0, . . . , W−1) as the wth sub-band first decoded parameter.
The dynamic bit allocation part 5035 calculates the number of bits to be allocated to each sub-band from the wth sub-band first decoded parameter and outputs wth sub-band bit allocation information. For example, if the wth sub-band average amplitude indicator Ã[w] is used as the wth sub-band first decoded parameter, bit allocation information B[w] (w==0, . . . , W−1) for the wth sub-band is calculated as follows. First, a wth sub-band perceptual importance ip[w] (w=0, . . . , W−1) is calculated from the wth sub-band average amplitude indicator Â[w] according to the following equation.
ip[w]=Â[w]/2
Then, a binary search algorithm is used with the wth sub-band perceptual importance ip[w] and a bit allocation table R to output bit allocation information B[w] for the wth sub-band. In the dynamic bit allocation, a “water level” is selected using the binary search algorithm based on the equation given below and the “water level λ” and the wth sub-band perceptual importance ip[w] are used to calculate wth sub-band bit allocation information B[w] according to the following equation.
Specifically, a method illustrated in
The second coding part 5036 uses the bit allocation information B[w] to quantize the wth sub-band frequency-domain signal sequence S(w)[k] and outputs a wth sub-band second signal code index IB(w) (w=0, . . . , W−1). It is assumed here that the bit counts in the bit allocation table are in a one-to-one correspondence with search ranges in the codebook as illustrated in
If the inner product between vectors is used as the parameter representing the distance, the codevector is selected according to Equation (18).
Here, the pth codevector contained in the codebook is denoted as C(p)=(C0(p), C1(p), . . . , CL′−1(p)). Here, Ck(p) represents the kth element of the pth vector.
The local code multiplexing part 5037 arranges wth sub-band first signal code indices IA(w) and wth sub-band second signal code indices IB(w) in a predetermined order to generate a dataset and outputs the dataset as a code index IC.
The signal decoding part 5031 decodes the code index IC and outputs a decoded signal sequence Ŝ(w)[k] (k=0, . . . , L′−1) and bit allocation information B[w] (S5031). The signal decoding part 5031 includes a local code demultiplexing part 5038, a first local decoding part 5034, a dynamic bit allocation part 5035, a second decoding part 5039, and a decoded parameter processing part 5044. The local code demultiplexing part 5038 reads a bit count in a predetermined position in the code index IC to output the wth sub-band first signal code index IA(w) and the wth sub-band second signal code index IB(w).
The first local decoding part 5034 decodes the wth sub-band first signal code index IA(w) and outputs a wth sub-band first decoded parameter. Operation of the first local decoding part 5034 is the same as the operation of the first local decoding part 5034 of the signal coding part 5030. The dynamic bit allocation part 5035 calculates the number of bits to be allocated to each sub-band from the wth sub-band first decoded parameter and outputs the number of bits as bit allocation information for the wth sub-band. Operation of the dynamic bit allocation part 5035 is the same as the dynamic bit allocation part 5035 of the signal coding part 5030.
The second decoding part 5039 uses the bit allocation information B[w] of the wth sub-band to decode the wth sub-band second signal code index IB(w) and outputs a wth sub-band second decoded parameter. It is assumed here that the bit counts in the bit allocation table and the search ranges in the codebook are in a one-to-one correspondence as in the second coding part 5036 of the signal coding part 5030. Decoding is performed as follows. First, the bit allocation information B[w] of the wth sub-band is used to determine a codebook search range. Then, a codevector corresponding to the wth sub-band second signal code index IB(W) is selected from the codebook search range determined from the bit allocation information B[w]. A codevector C(p)=(C0(p), C1(p), . . . , CL′−1(p)) corresponding to the selected codevector is output as the wth sub-band second decoded parameter.
The decoded parameter processing part 5044 uses the wth sub-band first decoded parameter and the wth sub-band second decoded parameter to output a decoded signal sequence Ŝ(w)[k]. For example, if the average amplitude indicator Ã[w] of the wth sub-band is used as the wth sub-band first decoded parameter and a codevector normalized so that an average amplitude of 1 is yielded is used as the wth sub-band second decoded parameter, each coefficient of the wth sub-band second decoded parameter is multiplied by the wth sub-band average amplitude calculated from the wth sub-band average amplitude indicator to calculate a decoded signal sequence Ŝ(w)[k].
The local decoding coefficient searching part 5000 outputs replication shift information τγ(w) from the sub-band frequency-domain signal sequence S(w)[k] and the decoded signal sequence Ŝ(w)[k] (S5000). As illustrated in
The candidate replication shift signal sequence generating part 3002, the distance calculating part 3003, and the minimum distance shift amount finding part 3004 are the same as those of the coding device 300 of the third embodiment.
The code multiplexing part 5040 multiplexes code indices and replication shift information τr(w) to generate a transmitter signal (S5040). Specifically, the code multiplexing part 5040 receives code indices Ic and replication shift information τr(w) as inputs and arranges them in a predetermined order to generate one dataset. If the signal is transmitted through a network such as an IP network, the code multiplexing part 5040 adds required header information to generate packets.
Decoding Device
The decoding device 600 includes a code demultiplexing part 6041, a signal decoding part 6031, a local decoding coefficient replicating part 6100, a sub-band combining part 4051, a frequency-time transform part 2021, and an overlap-add part 2011. The combination of the sub-band combining part 4051, the frequency-time transform part 2021, and the overlap-add part 2011 will be referred to as a recovered signal generating part 4012. The code demultiplexing part 6041 reads a code index IC and replication shift information τr(w) from a received signal and outputs them (S6041). The signal decoding part 6031 decodes the code index IC and outputs a decoded signal sequence Ŝ(w)[k] (k=0, . . . , L−1) and bit allocation information B[w] (S6031). The process performed by the decoding part 6031 is the same as the process performed by the signal decoding part 5031.
The local decoding coefficient replicating part 6100 generates a sub-band complementary decoded signal sequence {tilde over (S)}(w)[k] from the decoded signal sequence Ŝ(w)[k] and the replication shift information τr(w) (S6100). As illustrated in
The replication shift signal sequence generating part 4002 and the complementary decoded signal sequence generating part 4005 are the same as those of the decoding device 400 of the third embodiment. The sub-band combining part 4051, the frequency-time transform part 2021 and the overlap-add part 2011 are the same as those of the decoding device 400 of the third embodiment.
With the configuration described above, the coding device and the decoding device of this embodiment have the same effects as the coding and decoding devices of the third embodiments.
[Variation]
The coding device 500′ and the decoding device 600′ are similar to the coding device 500 and the decoding device 600, respectively, with the only difference being source signal sequences. Accordingly, only processes performed by a source signal sequence generating part 3012′ and a recovered signal generating part 4012′ are different from those in the coding and decoding devices 500 and 600. The source signal sequence generating part 3012′ is the same as that of the coding device 300′ of the variation of the third embodiment. The recovered signal generating part 4012′ is the same as that of the decoding device 400′ of the variation of the third embodiment.
With the configuration described above, the coding device and the decoding device of the variation have the same effects as the coding and decoding devices of the fourth embodiment.
Referring to
Coding Device
The coding device 700 includes a frame building part 1010, a band dividing part 3050, a signal coding part 7030, a signal decoding part 7031, a local decoding coefficient searching part 5000, and a code multiplexing part 7040. The frame building part 1010 and the band dividing part 3050 are the same as those of the coding device 300 of the third embodiment and the coding device 500 of the fourth embodiment.
As illustrated in
The signal decoding part 7031 decodes the first signal code index IA and the second signal code index IB(w) and outputs a decoded signal sequence Ŝ(w)[k] (k=0, . . . , L′−1) and bit allocation information B[w] (S7031). As illustrated in
The local decoding coefficient searching part 5000 is the same as that of the coding device 500 of the fourth embodiment. The code multiplexing part 7040 multiplexes the first signal code index IA, the second signal code index IB(w), the bit allocation information B[w] and replication shift information τr(w) to generate a transmitter signal (S7040). For example, the code multiplexing part 7040 outputs the first signal code index IA as a dataset consisting of a bit string of a fixed number of bits as illustrated in
Decoding Device
The decoding device 800 includes a code demultiplexing part 8041, a signal decoding part 8032, a local decoding coefficient replicating part 6100, a sub-band combining part 4051, a frequency-time transform part 2021, and an overlap-add part 2011. The combination of the sub-band combining part 4051, the frequency-time transform part 2021 and the overlap-add part 2011 will be referred to as a recovered signal generating part 4012. The code demultiplexing part 8041 reads a first signal index IA and a second signal code index IB(w) from a received signal and outputs them (S8041).
The signal decoding part 8032 decodes the first signal code index IA and the second signal code index IB(w) and outputs a sub-band decoded signal sequence Ŝ(w)[k] (k=0, . . . , L′−1), bit allocation information B[w] and replication shift information τr(w) (S8032). The signal decoding part 8032 includes a first local decoding part 8043, a dynamic bit allocation part 5035, a second decoding part 8042, and a decoded parameter processing part 5044. First, the first local decoding part 8043 decodes the first signal code index IA and outputs a wth sub-band first decoded parameter. The dynamic bit allocation part 5035 outputs bit allocation information from the sub-band first parameter. The dynamic bit allocation part 5035 is the same as that of the decoding device 600 of the fourth embodiment. The second decoding part 8042 uses the bit allocation information B[w] of the wth sub-band to decode the wth sub-band second signal code index IB(w) and outputs a wth sub-band second decoded parameter and replication shift information τr(w). For example, the second decoding part 8042 performs the following operation for each w (w=0, . . . , W−1). If the bit allocation information B[w] for the wth sub-band is less than or equal to a threshold value, the second decoding part 8042 reads and decodes a bit string of B[W] bits from the second signal code index IB(w) to output sub-band replication shift information τr(w). If the bit allocation information B[w] for the wth sub-band is greater than the threshold value, the second decoding part 8042 reads and decodes a bit string of B[w] bits from the second signal code index IB(W) to output a second decoded parameter. The decoded parameter processing part 5044 is the same as that of the decoding device 600 of the fourth embodiment.
The local decoding coefficient replicating part 6100, the sub-band combining part 4051, the frequency-time transform part 2021, and the overlap-add part 2011 are the same as those of the decoding device 600 of the fourth embodiment.
With the configuration described above, the coding device and the decoding device of the embodiment have the same effects as the coding and decoding devices of the fourth embodiment.
[First Variation]
In a first variation, a dynamic bit reallocation part 9060 is used in combination with the dynamic bit allocation part 5035.
As illustrated in
The dynamic bit reallocation part 9060 generates bit allocation information as described below and illustrated in
With the configuration described above, the coding device and the decoding device of the variation have the same effects as the coding and decoding devices of the fifth embodiment. In addition, because more appropriate numbers of bits can be allocated to sub-bands, the subjective quality can be further improved.
[Second Variation]
The decoding device 700′ and the decoding device 800′ are similar to the coding device 700 and the decoding device 800, respectively, with the only difference being source signal sequences. Accordingly, only processes performed by a source signal sequence generating part 3012′ and a recovered signal generating part 4012′ are different from those in the coding and decoding devices 700 and 800. The source signal sequence generating part 3012′ is the same as that of the coding device 300′ of the variation of the third embodiment and the recovered signal generating part 4012′ is the same as that of the decoding device 400′ of the variation of the third embodiment.
With the configuration described above, the coding device and the decoding device of the variation have the same effects as the coding and decoding devices of the fifth embodiment.
Number | Date | Country | Kind |
---|---|---|---|
2009-148793 | Jun 2009 | JP | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP10/60522 | 6/22/2010 | WO | 00 | 1/31/2012 |