1. Field of the Invention
This invention relates to a method, an apparatus, and a computer program for processing a digital audio signal to improve a related audio quality.
2. Description of the Related Art
In some cases, an analog audio signal is digitized at a prescribed sampling frequency and a prescribed quantization bit number. During the digitizing, signal components having frequencies equal to or higher than a half of the sampling frequency are cut off, and quantization errors occur depending on the quantization bit number. The cutoff of the high-frequency signal components, and the quantization errors cause a reduction in audio quality related to the resultant digital audio signal.
Japanese patent number 3659489 discloses a method of processing a digital audio signal to improve a related audio quality. The digital audio signal has a sequence of samples. In the method of Japanese patent 3659489, a periodically-updated current sample of the digital audio signal and an immediately-preceding sample thereof are compared to detect every local maximum value and every local minimum value of the waveform represented by the digital audio signal. Detection is made as to the number of samples between the position of the occurrence of every local maximum value and the position of the occurrence of a subsequent local minimum value, and the number of samples between the position of the occurrence of every local minimum value and the position of the occurrence of a subsequent local maximum value. Calculation is made as to the difference between every local maximum value and a value represented by a sample immediately-preceding the sample corresponding to the local maximum value, and the difference between every local minimum value and a value represented by a sample immediately-preceding the sample corresponding to the local minimum value. Coefficients are determined in accordance with the detected sample numbers by referring to a coefficient table. The calculated differences and the determined coefficients are multiplied to get a first multiplication result for every local maximum value and a second multiplication result for every local minimum value. The first multiplication result is added to every local maximum value. The second multiplication result is subtracted from the every local minimum value. As a result of the addition and the subtraction, the digital audio signal is corrected.
Japanese patent application publication number 2004-21224 corresponding to US patent application publication number US-2003/0236584 A1 discloses a method of processing a digital audio signal to improve a related audio quality. The digital audio signal has a sequence of samples. In the method of Japanese application 2004-21224, extreme values in an audio waveform represented by the digital audio signal are detected. The extreme values include maximum values and minimum values. An audio frequency represented by the digital audio signal is detected in response to the number of samples between two temporally-adjacent extreme-corresponding samples. A difference between each extreme value and a value of a sample which immediately precedes the present extreme-corresponding sample is calculated. The calculated differences are multiplied by selected one of predetermined coefficients to get corrective values respectively. A decision is made as to whether or not the detected audio frequency is in one selected from predetermined frequency bands. When the detected audio frequency is in the selected frequency band, a corresponding corrective value is added to the maximum value and a corresponding corrective value is subtracted from the minimum value. As a result of the addition and the subtraction, the digital audio signal is corrected.
Usual digital audio signals transmitted in digital television broadcasting or through the Internet result from encoding inclusive of lossy compression that cuts off high-frequency signal components. Examples of such compressively encoding are AAC (Advanced Audio Coding) and MP3. In AAC used by digital television broadcasting, signal components having frequencies of 16 kHz or higher are cut off. On the other hand, MP3 used by portable terminals cuts off signal components having frequencies of 8 kHz or higher. In the case where the method in Japanese patent 3659489 or Japanese application 2004-21224 is applied to the processing of such a compressed digital audio signal (for example, an AAC signal or an MP3 signal), the cut-off of high-frequency signal components can not be sufficiently compensated for. Therefore, a correction-resultant digital audio signal generated by the method tend to appreciably differ from an original analog or digital audio signal in audio quality.
There is a recording medium which stores an analog audio signal recorded many years ago. Generally, the analog audio signal currently reproduced from the recording medium is considerably lower in audio quality than the analog audio signal occurring at the time of the recording. In the case where the method in Japanese patent 3659489 or Japanese application 2004-21224 is applied to the processing of a PCM signal generated by conversion of the currently-reproduced analog audio signal, since only signal samples corresponding to respective extreme values (maximum values and minimum values) are corrected, a correction-resultant digital audio signal appreciably differs in audio quality from the analog audio signal occurring at the time of the recording.
There is an analog audio signal resulting from repetitively dubbing. Generally, the present analog audio signal is considerably lower in audio quality than the original analog audio signal. In the case where the method in Japanese patent 3659489 or Japanese application 2004-21224 is applied to the processing of a PCM signal generated by conversion of the present analog audio signal, since only signal samples corresponding to respective extreme values (maximum values and minimum values) are corrected, a correction-resultant digital audio signal appreciably differs in audio quality from the original analog audio signal.
It is a first object of this invention to provide a method of processing a digital audio signal which can make a related audio quality close to that of an original audio signal.
It is a second object of this invention to provide an apparatus for processing a digital audio signal which can make a related audio quality close to that of an original audio signal.
It is a third object of this invention to provide a computer program for processing a digital audio signal which can make a related audio quality close to that of an original audio signal.
A first aspect of this invention provides a method of processing a digital audio signal having a sequence of samples. The method comprises the steps of detecting every extreme value in an audio waveform represented by the digital audio signal, the extreme value being either a maximum value or a minimum value; detecting a number of samples between samples corresponding to the first and second latest detected extreme values to get a detected inter-extreme sample number; calculating a difference between the first and second latest detected extreme values to get a calculated inter-extreme difference; generating a corrective value in response to the detected inter-extreme sample number and the calculated inter-extreme difference, the generated corrective value being updated each time a new extreme value is detected; designating ones among samples in response to the detected inter-extreme sample number as objects to be corrected, the designated samples including at least (1) a sample adjacently following the sample corresponding to the second latest detected extreme value, (2) a sample adjacently preceding the sample corresponding to the first latest detected extreme value, and (3) one of the sample corresponding to the first latest detected extreme value and the sample corresponding to the second latest detected extreme value; and correcting the designated samples in response to at least one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) a generated corrective value next to the currently-generated corrective value.
A second aspect of this invention is based on the first aspect thereof, and provides a method wherein the correcting is such that one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is subtracted from a value of the sample adjacently following the sample corresponding to the second latest detected extreme value and one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is added to a value of the sample adjacently preceding the sample corresponding to the first latest detected extreme value when the first and second latest detected extreme values are a maximum value and a minimum value respectively, and that one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is added to the value of the sample adjacently following the sample corresponding to the second latest detected extreme value and one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is subtracted from the value of the sample adjacently preceding the sample corresponding to the first latest detected extreme value when the first and second latest detected extreme values are a minimum value and a maximum value respectively.
A third aspect of this invention is based on the first aspect thereof, and provides a method wherein the generated corrective value and the designated samples are selectable from candidate ones designed to compensate for different degrees of degradation in audio quality of the digital audio signal.
A fourth aspect of this invention provides an apparatus for processing a digital audio signal having a sequence of samples. The apparatus comprises means for detecting every extreme value in an audio waveform represented by the digital audio signal, the extreme value being either a maximum value or a minimum value; means for detecting a number of samples between samples corresponding to the first and second latest detected extreme values to get a detected inter-extreme sample number; means for calculating a difference between the first and second latest detected extreme values to get a calculated inter-extreme difference; means for generating a corrective value in response to the detected inter-extreme sample number and the calculated inter-extreme difference, the generated corrective value being updated each time a new extreme value is detected; means for designating ones among samples in response to the detected inter-extreme sample number as objects to be corrected, the designated samples including at least (1) a sample adjacently following the sample corresponding to the second latest detected extreme value, (2) a sample adjacently preceding the sample corresponding to the first latest detected extreme value, and (3) one of the sample corresponding to the first latest detected extreme value and the sample corresponding to the second latest detected extreme value; and means for correcting the designated samples in response to at least one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) a generated corrective value next to the currently-generated corrective value.
A fifth aspect of this invention is based on the fourth aspect thereof, and provides an apparatus wherein the correcting is such that one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is subtracted from a value of the sample adjacently following the sample corresponding to the second latest detected extreme value and one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is added to a value of the sample adjacently preceding the sample corresponding to the first latest detected extreme value when the first and second latest detected extreme values are a maximum value and a minimum value respectively, and that one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is added to the value of the sample adjacently following the sample corresponding to the second latest detected extreme value and one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is subtracted from the value of the sample adjacently preceding the sample corresponding to the first latest detected extreme value when the first and second latest detected extreme values are a minimum value and a maximum value respectively.
A sixth aspect of this invention is based on the fourth aspect thereof, and provides an apparatus wherein the generated corrective value and the designated samples are selectable from candidate ones designed to compensate for different degrees of degradation in audio quality of the digital audio signal.
A seventh aspect of this invention provides a computer program stored in a computer readable medium for processing a digital audio signal having a sequence of samples. The computer program comprises the steps of detecting every extreme value in an audio waveform represented by the digital audio signal, the extreme value being either a maximum value or a minimum value; detecting a number of samples between samples corresponding to the first and second latest detected extreme values to get a detected inter-extreme sample number; calculating a difference between the first and second latest detected extreme values to get a calculated inter-extreme difference; generating a corrective value in response to the detected inter-extreme sample number and the calculated inter-extreme difference, the generated corrective value being updated each time a new extreme value is detected; designating ones among samples in response to the detected inter-extreme sample number as objects to be corrected, the designated samples including at least (1) a sample adjacently following the sample corresponding to the second latest detected extreme value, (2) a sample adjacently preceding the sample corresponding to the first latest detected extreme value, and (3) one of the sample corresponding to the first latest detected extreme value and the sample corresponding to the second latest detected extreme value; and correcting the designated samples in response to at least one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) a generated corrective value next to the currently-generated corrective value.
An eighth aspect of this invention is based on the seventh aspect thereof, and provides a computer program wherein the correcting is such that one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is subtracted from a value of the sample adjacently following the sample corresponding to the second latest detected extreme value and one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is added to a value of the sample adjacently preceding the sample corresponding to the first latest detected extreme value when the first and second latest detected extreme values are a maximum value and a minimum value respectively, and that one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is added to the value of the sample adjacently following the sample corresponding to the second latest detected extreme value and one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is subtracted from the value of the sample adjacently preceding the sample corresponding to the first latest detected extreme value when the first and second latest detected extreme values are a minimum value and a maximum value respectively.
A ninth aspect of this invention is based on the seventh aspect thereof, and provides a computer program wherein the generated corrective value and the designated samples are selectable from candidate ones designed to compensate for different degrees of degradation in audio quality of the digital audio signal.
A tenth aspect of this invention provides a method of pre-emphasizing a digital audio signal having a sequence of samples to generate a pre-emphasized digital audio signal before the pre-emphasized digital audio signal is compressed by an encoder. The pre-emphasizing is designed to compensate for audio quality degradation caused by the compression by the encoder. The method comprises the steps of detecting every extreme value in an audio waveform represented by the digital audio signal, the extreme value being either a maximum value or a minimum value; detecting a number of samples between samples corresponding to the first and second latest detected extreme values to get a detected inter-extreme sample number; calculating a difference between the first and second latest detected extreme values to get a calculated inter-extreme difference; generating a corrective value in response to the detected inter-extreme sample number and the calculated inter-extreme difference, the generated corrective value being updated each time a new extreme value is detected; designating ones among samples in response to the detected inter-extreme sample number and the degree of the audio quality degradation as objects to be corrected, the designated samples including at least (1) a sample adjacently following the sample corresponding to the second latest detected extreme value, (2) a sample adjacently preceding the sample corresponding to the first latest detected extreme value, and (3) one of the sample corresponding to the first latest detected extreme value and the sample corresponding to the second latest detected extreme value; and correcting the designated samples in response to at least one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) a generated corrective value next to the currently-generated corrective value.
An eleventh aspect of this invention is based on the tenth aspect thereof, and provides a method wherein the correcting is such that one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is subtracted from a value of the sample adjacently following the sample corresponding to the second latest detected extreme value and one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is added to a value of the sample adjacently preceding the sample corresponding to the first latest detected extreme value when the first and second latest detected extreme values are a maximum value and a minimum value respectively, and that one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is added to the value of the sample adjacently following the sample corresponding to the second latest detected extreme value and one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is subtracted from the value of the sample adjacently preceding the sample corresponding to the first latest detected extreme value when the first and second latest detected extreme values are a minimum value and a maximum value respectively.
A twelfth aspect of this invention is based on the tenth aspect thereof, and provides a method wherein the generated corrective value and the designated samples are selectable from candidate ones designed to compensate for different degrees of degradation in audio quality of the digital audio signal.
A thirteenth aspect of this invention provides an apparatus for pre-emphasizing a digital audio signal having a sequence of samples to generate a pre-emphasized digital audio signal before the pre-emphasized digital audio signal is compressed by an encoder. The pre-emphasizing is designed to compensate for audio quality degradation caused by the compression by the encoder. The apparatus comprises means for detecting every extreme value in an audio waveform represented by the digital audio signal, the extreme value being either a maximum value or a minimum value; means for detecting a number of samples between samples corresponding to the first and second latest detected extreme values to get a detected inter-extreme sample number; means for calculating a difference between the first and second latest detected extreme values to get a calculated inter-extreme difference; means for generating a corrective value in response to the detected inter-extreme sample number and the calculated inter-extreme difference, the generated corrective value being updated each time a new extreme value is detected; means for designating ones among samples in response to the detected inter-extreme sample number and the degree of the audio quality degradation as objects to be corrected, the designated samples including at least (1) a sample adjacently following the sample corresponding to the second latest detected extreme value, (2) a sample adjacently preceding the sample corresponding to the first latest detected extreme value, and (3) one of the sample corresponding to the first latest detected extreme value and the sample corresponding to the second latest detected extreme value; and means for correcting the designated samples in response to at least one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) a generated corrective value next to the currently-generated corrective value.
A fourteenth aspect of this invention is based on the thirteenth aspect thereof, and provides an apparatus wherein the correcting is such that one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is subtracted from a value of the sample adjacently following the sample corresponding to the second latest detected extreme value and one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is added to a value of the sample adjacently preceding the sample corresponding to the first latest detected extreme value when the first and second latest detected extreme values are a maximum value and a minimum value respectively, and that one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is added to the value of the sample adjacently following the sample corresponding to the second latest detected extreme value and one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is subtracted from the value of the sample adjacently preceding the sample corresponding to the first latest detected extreme value when the first and second latest detected extreme values are a minimum value and a maximum value respectively.
A fifteenth aspect of this invention is based on the thirteenth aspect thereof, and provides an apparatus wherein the generated corrective value and the designated samples are selectable from candidate ones designed to compensate for different degrees of degradation in audio quality of the digital audio signal.
A sixteenth aspect of this invention provides a computer program stored in a computer readable medium for pre-emphasizing a digital audio signal having a sequence of samples to generate a pre-emphasized digital audio signal before the pre-emphasized digital audio signal is compressed by an encoder. The pre-emphasizing is designed to compensate for audio quality degradation caused by the compression by the encoder. The computer program comprises the steps of detecting every extreme value in an audio waveform represented by the digital audio signal, the extreme value being either a maximum value or a minimum value; detecting a number of samples between samples corresponding to the first and second latest detected extreme values to get a detected inter-extreme sample number; calculating a difference between the first and second latest detected extreme values to get a calculated inter-extreme difference; generating a corrective value in response to the detected inter-extreme sample number and the calculated inter-extreme difference, the generated corrective value being updated each time a new extreme value is detected; designating ones among samples in response to the detected inter-extreme sample number and the degree of the audio quality degradation as objects to be corrected, the designated samples including at least (1) a sample adjacently following the sample corresponding to the second latest detected extreme value, (2) a sample adjacently preceding the sample corresponding to the first latest detected extreme value, and (3) one of the sample corresponding to the first latest detected extreme value and the sample corresponding to the second latest detected extreme value; and correcting the designated samples in response to at least one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) a generated corrective value next to the currently-generated corrective value.
A seventeenth aspect of this invention is based on the sixteenth aspect thereof, and provides a computer program wherein the correcting is such that one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is subtracted from a value of the sample adjacently following the sample corresponding to the second latest detected extreme value and one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is added to a value of the sample adjacently preceding the sample corresponding to the first latest detected extreme value when the first and second latest detected extreme values are a maximum value and a minimum value respectively, and that one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is added to the value of the sample adjacently following the sample corresponding to the second latest detected extreme value and one of (1) the currently-generated corrective value, (2) the previously-generated corrective value, and (3) the generated corrective value next to the currently-generated corrective value is subtracted from the value of the sample adjacently preceding the sample corresponding to the first latest detected extreme value when the first and second latest detected extreme values are a minimum value and a maximum value respectively.
An eighteenth aspect of this invention is based on the sixteenth aspect thereof, and provides a computer program wherein the generated corrective value and the designated samples are selectable from candidate ones designed to compensate for different degrees of degradation in audio quality of the digital audio signal.
A nineteenth aspect of this invention provides a method of processing a digital audio signal having a sequence of samples. The method comprises the steps of detecting every extreme value in an audio waveform represented by the digital audio signal, the extreme value being either a maximum value or a minimum value; repetitively detecting a local period of the audio waveform; repetitively detecting a local amplitude of the audio waveform; and correcting a sample corresponding to the detected extreme value, a sample adjacently preceding the sample corresponding to the detected extreme value, and a sample adjacently following the sample corresponding to the detected extreme value in response to the detected local period and the detected local amplitude.
A twentieth aspect of this invention provides an apparatus for processing a digital audio signal having a sequence of samples. The apparatus comprises means for detecting every extreme value in an audio waveform represented by the digital audio signal, the extreme value being either a maximum value or a minimum value; means for repetitively detecting a local period of the audio waveform; means for repetitively detecting a local amplitude of the audio waveform; and means for correcting a sample corresponding to the detected extreme value, a sample adjacently preceding the sample corresponding to the detected extreme value, and a sample adjacently following the sample corresponding to the detected extreme value in response to the detected local period and the detected local amplitude.
This invention has advantages as indicated hereafter. Not only a signal sample corresponding to an extreme value but also signal samples adjacently preceding and adjacently following the extreme-value-corresponding sample are corrected. Therefore, it is possible to sufficiently compensate for audio quality degradation caused by compression or repetitively dubbing of an original audio signal. In addition, it is possible to enhance the audio quality of a degraded audio signal to a level close to an original audio quality.
The apparatus of
The decoder 2 receives compressed audio data (a first digital audio signal) which results from compressing an original audio signal according to a predetermined compression scheme such as AAC (Advanced Audio Coding) or MP3. Thus, the compressed audio data is, for example, an AAC signal or an MP3 signal. The decoder 2 expands the compressed audio data into a first PCM signal (a before-correction PCM signal or a second digital audio signal) according to a predetermined expansion scheme inverse with respect to the predetermined compression scheme. The first PCM signal has a sequence of samples related to a predetermined sampling frequency. Every sample in the first PCM signal has a predetermined number of bits. The decoder 2 applies the first PCM signal to the extreme detector 3 and the adder/subtractor 8.
The extreme detector 3 detects every local maximum value and every local minimum value (that is, every local peak and every local valley) in the audio waveform represented by the applied first PCM signal. The maximum and minimum values are also referred to as the extremes or extreme values. The extreme detector 3 identifies samples in the first PCM signal which represent the detected maximum values and the detected minimum values. The identified samples are referred to as the extreme-representing samples, or the maximum-representing samples and the minimum-representing samples. The extreme detector 3 notifies the extreme-representing samples to the inter-extreme sample number detector 4. In addition, the extreme detector 3 passes the first PCM signal to the inter-extreme sample number detector 4. The extreme detector 3 notifies the extreme values and the extreme-representing samples to the inter-extreme difference calculator 6.
The inter-extreme sample number detector 4 repetitively counts samples in the first PCM signal between two temporally-adjacent extreme-representing samples notified by the extreme detector 3. Accordingly, the device 4 repetitively detects the number of samples in the first PCM signal between two temporally-adjacent extreme-representing samples. The detected sample number is called the detected inter-extreme sample number SN. The detected sample number is equal to the number of samples between a maximum-representing sample and a minimum-representing sample subsequent thereto or the number of samples between a minimum-representing sample and a maximum-representing sample subsequent thereto. The inter-extreme sample number detector 4 notifies every detected inter-extreme sample number SN to the table 5.
Since the detected inter-extreme sample number SN has a fixed relation with a local period or a local frequency (an instantaneous period and an instantaneous frequency) of the audio waveform represented by the first PCM signal, the detection of the inter-extreme sample number SN means detection of the local period or the local frequency of the audio waveform.
Specifically, the inter-extreme sample number SN is equal to one of (1) the number of samples starting from a first extreme-representing sample and ending at a sample immediately preceding a second extreme-representing sample after the first extreme-representing sample, (2) the number of samples starting from the first extreme-representing sample and ending at the second extreme-representing sample, (3) the number of samples starting from a sample immediately following the first extreme-representing sample and ending at the second extreme-representing sample, and (4) the number of samples starting from the sample immediately following the first extreme-representing sample and ending the sample immediately preceding the second extreme-representing sample.
The inter-extreme difference calculator 6 repetitively computes the difference between two extremes represented by temporally-adjacent extreme-representing samples notified by the extreme detector 3. The computed difference is called the computed inter-extreme difference. The computed difference is equal to the difference between a maximum value and a minimum value subsequent thereto or the difference between a minimum value and a maximum value subsequent thereto. The inter-extreme difference calculator 6 notifies every computed inter-extreme difference to the multiplier 7. In addition, the inter-extreme difference calculator 6 informs the multiplier 7 whether the last extreme is a maximum value or a minimum value. It should be noted that the inter-extreme difference means a local amplitude (an instantaneous amplitude) of the audio waveform represented by the first PCM signal.
The table 5 is provided in a memory. With reference to
One among the rows in the table 5 is accessed in response to the inter-extreme sample number notified by the inter-extreme sample number detector 4. Specifically, the accessed row has a predetermined inter-extreme sample number equal to the notified inter-extreme sample number. The table 5 informs the multiplier 7 of a predetermined coefficient in the accessed row. The coefficient sent from the table 5 to the multiplier 7 is denoted by the character “α”. The table 5 notifies the adder/subtractor 8 of a predetermined correction sample number in the accessed row.
The multiplier 7 receives the inter-extreme difference from the inter-extreme difference calculator 6. The device 7 multiplies the inter-extreme difference by the coefficient “α” to get a corrective value. The multiplier 7 notifies the corrective value to the adder/subtractor 8. In addition, the multiplier 7 passes, to the adder/subtractor 8, the information about whether the last extreme is a maximum value or a minimum value.
The adder/subtractor 8 selects samples from the first PCM signal in response to the correction sample number notified by the table 5. The selected samples are objects to be corrected. The number of the selected samples is equal to the notified correction sample number. Preferably, the selected samples are (1) the first latest extreme-representing sample, (2) ones immediately preceding the first latest extreme-representing sample, and (3) ones immediately following the second latest extreme-representing sample.
In the case where the first latest extreme and the second latest extreme are a maximum value and a minimum value respectively, the adder/subtractor 8 subtracts the preceding corrective value notified by the multiplier 7 from the values of the selected samples immediately following the second latest extreme-representing sample to get correction-resultant values and correction-resultant samples representing the respective correction-resultant values. In this case, the adder/subtractor 8 adds the current corrective value notified by the multiplier 7 to the values of the first latest extreme-representing sample and the selected samples immediately preceding the latest extreme-representing sample to get correction-resultant values and correction-resultant samples representing the respective correction-resultant values.
In the case where the first latest extreme and the second latest extreme are a minimum value and a maximum value respectively, the adder/subtractor 8 adds the preceding corrective value notified by the multiplier 7 to the values of the selected samples immediately following the second latest extreme-representing sample to get correction-resultant values and correction-resultant samples representing the respective correction-resultant values. In this case, the adder/subtractor 8 subtracts the current corrective value notified by the multiplier 7 from the values of the first latest extreme-representing sample and the selected samples immediately preceding the first latest extreme-representing sample to get correction-resultant values and correction-resultant samples representing the respective correction-resultant values.
It should be noted that all the selected samples may be corrected in response to the current corrective value.
The adder/subtractor 8 replaces the selected samples in the first PCM signal with the correction-resultant samples to correct the first PCM signal into a second PCM signal (an after-correction PCM signal or a third digital audio signal). In general, the adder/subtractor 8 includes delay devices and memories for providing desired timing relations among the first PCM signal, the correction sample number notified by the table 5, and the corrective value notified by the multiplier 7. The adder/subtractor 8 outputs the second PCM signal to a later stage (not shown).
With reference back to
When the inter-extreme sample number is equal to 5, the correction sample number and the coefficient are equal to 1 and 1/16 respectively. Thus, in this case, only the current extreme-representing sample in the first PCM signal is corrected in response to the coefficient “ 1/16” being greater than the coefficient “ 1/32”.
When the inter-extreme sample number is equal to 6, the correction sample number and the coefficient are equal to 5 and 1/14 respectively. Thus, in this case, the first latest extreme-representing sample in the first PCM signal, two samples immediately preceding the first latest extreme-representing sample, and two samples immediately following the second latest extreme-representing sample are corrected. The correction of the two samples immediately following the second latest extreme-representing sample is responsive to the preceding coefficient. The correction of the first latest extreme-representing sample and the two samples immediately preceding the first latest extreme-representing sample is responsive to the coefficient “ 1/14” being greater than the coefficient “ 1/16”. In addition, the correction of next selected samples immediately following the first latest extreme-representing sample will be responsive to the coefficient “ 1/14”.
When the inter-extreme sample number is equal to 7, the correction sample number and the coefficient are equal to 9 and ⅛ respectively. Thus, in this case, the first latest extreme-representing sample in the first PCM signal, four samples immediately preceding the first latest extreme-representing sample, and four samples immediately following the second latest extreme-representing sample are corrected. The correction of the four samples immediately following the second latest extreme-representing sample is responsive to the preceding coefficient. The correction of the first latest extreme-representing sample and the four samples immediately preceding the first latest extreme-representing sample is responsive to the coefficient “⅛” being greater than the coefficient “ 1/14”. In addition, the correction of next selected samples immediately following the first latest extreme-representing sample will be responsive to the coefficient “⅛”.
At least one of the correction sample numbers listed in the table 5 may be equal to 3. When the correction sample number equal to 3 is continuously used, the current extreme-representing sample in the first PCM signal, one sample immediately preceding the current extreme-representing sample, and one sample immediately following the current extreme-representing sample are corrected.
With reference to
With reference to
At least one of the correction sample numbers listed in the table 5 may be equal to 7. With reference to
The apparatus of
The signal processing device 20 corrects the first PCM signal into the second PCM signal. The I/O port 21 outputs the second PCM signal to a later stage (not shown).
With reference to
A step 32 following the step 31 accesses the RAM 24, and retrieves information about the inter-sample difference SD(−1) immediately preceding the current one SD(0). The step 32 decides whether or not the sign of the current inter-sample difference SD(0) is opposite to that of the immediately-preceding inter-sample difference SD(−1). When the sign of the current inter-sample difference SD(0) is opposite to that of the immediately-preceding inter-sample difference SD(−1), the step 32 recognizes the immediately-preceding sample S(−1) as the latest extreme-representing sample. The step 32 stores information about the latest extreme-representing sample into the RAM 24 for later use.
Specifically, the step 32 decides whether the opposite-sign condition corresponds to a negative-to-positive change or a positive-to-negative change. When the opposite-sign condition corresponds to a negative-to-positive change, the step 32 recognizes the immediately-preceding sample S(−1) as the latest maximum-representing sample. When the opposite-sign condition corresponds to a positive-to-negative change, the step 32 recognizes the immediately-preceding sample S(−1) as the latest minimum-representing sample.
A step 33 subsequent to the step 32 is executed provided that the latest extreme-representing sample has just been detected by the step 32. Otherwise, the step 33 is skipped. The step 33 accesses the RAM 24, and retrieves information about the second latest extreme-representing sample (the extreme-representing sample immediately preceding the latest extreme-representing sample). The step 33 counts samples between the first latest extreme-representing sample and the second latest extreme-representing sample. The count result is defined as the inter-extreme sample number.
A step 34 following the step 33 is executed provided that the latest extreme-representing sample has just been detected by the step 32. Otherwise, the step 34 is skipped. The step 34 accesses the RAM 24, and retrieves the information about the second latest extreme-representing sample. The step 34 computes the difference between the extreme represented by the first latest extreme-representing sample and the extreme represented by the second latest extreme-representing sample. The computed difference is defined as the computed inter-extreme difference.
A step 35 subsequent to the step 34 is executed provided that the latest extreme-representing sample has just been detected by the step 32. Otherwise, the step 35 is skipped. The step 35 accesses the table in response to the inter-extreme sample number given by the step 33, and thereby reads out, from the table, a coefficient “α” and a correction sample number assigned to the inter-extreme sample number.
A step 36 following the step 35 multiplies the inter-extreme difference by the coefficient “α” to get a corrective value. The inter-extreme difference is given by the step 34. The step 36 stores information about the corrective value into the RAM 24 for later use.
A step 37 subsequent to the step 36 accesses the RAM 24 to retrieve information about the first latest extreme-representing sample and the second latest extreme-representing sample, and information about the preceding corrective value. The step 37 designates ones among samples in response to the correction sample number given by the step 35, the first latest extreme-representing sample, and the second latest extreme-representing sample. The designated samples are objects to be corrected. The number of the designated samples is equal to the correction sample number. The designated samples are the first latest extreme-representing sample, samples immediately preceding the first latest extreme-representing sample, and samples immediately following the second latest extreme-representing sample. The step 37 decides whether or not the first latest extreme-representing sample and the second latest extreme-representing sample correspond to a maximum value and a minimum value respectively. In the case where the first latest extreme-representing sample and the second latest extreme-representing sample correspond to a maximum value and a minimum value respectively, the step 37 subtracts the preceding corrective value from the value of each of the designated samples immediately following the second latest extreme-representing sample to correct the target sample. In this case, the step 37 adds the current corrective value to the value of each of the first latest extreme-representing sample and the designated samples immediately preceding the first latest extreme-representing samples to correct the target sample. On the other hand, in the case where the first latest extreme-representing sample and the second latest extreme-representing sample correspond to a minimum value and a maximum value respectively, the step 37 adds the preceding corrective value to the value of each of the designated samples immediately following the second latest extreme-representing sample to correct the target sample. In this case, the step 37 subtracts the current corrective value from the value of each of the first latest extreme-representing sample and the designated samples immediately preceding the first latest extreme-representing samples to correct the target sample. The step 37 maintains each of samples other than the designated samples as it is. The step 37 outputs either the corrected sample or the uncorrected sample to an external device (not shown) as a sample of the second PCM signal. After the step 37, the current execution cycle of the program segment ends.
It should be noted that all the designated samples may be corrected in response to the current corrective value.
As previously mentioned, the program segment in
With reference to
A decision is made as to whether or not the sign of the current inter-sample difference SD(0) is opposite to that of the immediately-preceding inter-sample difference SD(−1) for each of sample periods E1, E2, E3, . . . The decision is performed by the step S32 in
During the interval G between the first extreme-representing sample and the second extreme-representing sample (corresponding to, for example, the extremes F1 and F2 in
A computation is made as to the difference H between the extreme F1 represented by the first extreme-representing sample and the extreme F2 represented by the second extreme-representing sample. The computation is performed by the step 34 in
Ones are designated among samples in response to the correction sample number, the first extreme-representing sample, and the second extreme-representing sample. The number of the designated samples is equal to the correction sample number. The designated samples are the second extreme-representing sample, samples immediately preceding the second extreme-representing sample, and samples immediately following the first extreme-representing sample. In
A third embodiment of this invention is similar to the first or second embodiment thereof except that the decoder 2 (see
The apparatus of
Compressed audio data results from signal compression based on a compression scheme selectable from different ones. The decoders 2a are designed in harmony with the different compression schemes, respectively. The tables 5a are also designed in harmony with the different compression schemes, respectively.
The selector 1 receives a signal representing which of the different compression schemes the compressed audio data relates to. The device 1 selects one from the decoders 2a and one from the tables 5a in response to the received signal. The selected decoder 2a and the selected table 5a are those in harmony with the compression scheme to which the compressed audio data relates. The selected decoder 2a and the selected table 5a are activated and used in the apparatus of
The selected decoder 2a expands the compressed audio data into a first PCM signal according to a predetermined expansion scheme inverse with respect to the compression scheme to which the compressed audio data relates. The selected decoder 2a applies the first PCM signal to the extreme detector 3 and the adder/subtractor 8.
The inter-extreme sample number detector 4 notifies the inter-extreme sample number to the selected table 5a so that a coefficient “a” and a correction sample number assigned to the inter-extreme sample number are read out from the selected table 5a. The read-out coefficient “α” is sent to the multiplier 7. The read-out correction sample number is sent to the adder/subtractor 8.
With reference to
A consideration is given to a recording medium which stores an analog audio signal recorded many years ago. Generally, the analog audio signal currently reproduced from the recording medium is considerably lower in audio quality than the analog audio signal occurring at the time of the recording. The currently-reproduced analog audio signal is converted into a PCM signal in a conventional way. Generally, an analog audio signal resulting from repetitively dubbing is considerably lower in audio quality than the original one. The analog audio signal is converted into a PCM signal in the conventional way. One of the above-indicated PCM signals may be inputted to the extreme detector 3. The tables 5a may be designed to compensate for different degrees of audio-quality degradation, respectively. One may be selected from the tables 5a in accordance with user's request. In this case, the user can select, from the tables 5a, one suited to sufficiently compensate for audio-quality degradation of a PCM signal to be processed.
The apparatus of
The signal processing device 20A receives an output signal from the selector 1 which depends on which of the different compression schemes the compressed audio data relates to. The signal processing device 20A receives the first PCM signal from selected one of the decoders 2a. The signal processing device 20A processes the first PCM signal into the second PCM signal in response to the output signal from the selector 1.
In a segment of a control program for the signal processing device 20A, a step 35 (see
The apparatus of
A first PCM signal representative of audio information is applied to the extreme detector 3 and the adder/subtractor 8. The combination of the devices 3-8 processes the first PCM signal into a second PCM signal as that in
The signal compression by the encoder 10 causes audio-quality degradation which can be compensated for by the foregoing pre-emphasis. Therefore, the compression-resultant signal generated by the encoder 10 is relatively high in audio quality.
Specifically, the table 5 is designed to sufficiently compensate for the audio-quality degradation caused by the signal compression in the encoder 10. Accordingly, predetermined coefficients and predetermined correction sample numbers listed in the table 5 are chosen in view of a degree of the audio-quality degradation. Thus, the combination of the devices 3-8 implements the pre-emphasis which sufficiently compensates for the audio-quality degradation.
A decoder 2 in the receiver side receives the compression-resultant signal from the transmitter side. The decoder 2 expands the compression-resultant signal into an expansion-resultant signal. The operation of the decoder 2 is inverse with respect to the operation of the encoder 10.
It should be noted that the combination of the devices 3-8 may be replaced by a signal processing device 20 similar to that in
A seventh embodiment of this invention is similar to one of the first to sixth embodiments thereof except for design changes mentioned hereafter.
With reference to
It should be noted that the first extreme-representing sample S0, three samples S5, S6, and S7 immediately following the first extreme-representing sample S0, and three samples S2, S3, and S4 immediately preceding the second extreme-representing sample S1 may be selected and designated as objects to be corrected. In this case, the first extreme-representing sample S0, designated samples immediately preceding the first extreme-representing sample S0, and the samples S5, S6, and S7 immediately following the first extreme-representing sample S0 are corrected in response to the corrective value depending on the current coefficient “α(1)”. Alternatively, all the designated samples S0, S2, S3, S4, S5, S6, and S7 may be corrected in response to the corrective value depending on the current coefficient “α(1)”.
Number | Date | Country | Kind |
---|---|---|---|
2006-271293 | Oct 2006 | JP | national |
2007-086005 | Mar 2007 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
6449519 | Kuwaoka | Sep 2002 | B1 |
20020075777 | Kuwaoka | Jun 2002 | A1 |
20030236584 | Kuwaoka | Dec 2003 | A1 |
Number | Date | Country |
---|---|---|
3659489 | Mar 2005 | JP |
2004-021224 | Jan 2007 | JP |
Number | Date | Country | |
---|---|---|---|
20080082189 A1 | Apr 2008 | US |